Heikin Ashi with WMA/EMA, Target, Stoploss, and Trailing Stop 22If you continue to experience the "Undeclared identifier 'label'" error, an alternative approach is to use the plotshape function instead of label.new. The plotshape function can place markers (such as "Buy" and "Sell") on the chart without directly using label, and it’s widely supported in Pine Script.
インジケーターとストラテジー
UT 3 3 strategythis is for test Ut bot 3 and 3
this have tp and sl persent and show use martingle for manage losses
in table show maximum sequent loss and date that happened
Dynamic Trading Strategy with Key Levels, Entry/Exit Managementjust a strategy tester i dont have any copy right of this indicator
MTF+MA V2 MTF+MA Indicator by ridvansozen1
The MTF+MA Indicator is a multi-timeframe moving average strategy developed by TradingView user ridvansozen1. This tool is designed to assist cryptocurrency traders in identifying potential long and short trading opportunities by analyzing market trends across multiple timeframes.
Key Features:
Multi-Timeframe Analysis: Utilizes fast and slow exponential moving averages (EMAs) on user-defined long, mid, and short-term timeframes to assess market direction.
Signal Generation: Generates long signals when all selected timeframes indicate a positive trend and short signals when all indicate a negative trend.
Customizable Parameters: Allows users to adjust source data, EMA lengths, and timeframes to tailor the strategy to specific trading preferences.
Date Range Filtering: Includes settings to define specific date ranges for signal generation, enabling focused backtesting and analysis.
How to Use:
Configure Moving Averages: Set your preferred lengths for the fast and slow EMAs.
Select Timeframes: Choose the long, mid, and short-term timeframes that align with your trading strategy.
Set Date Range: Define the date range during which the strategy should generate signals.
Interpret Signals: Monitor the indicator plots—green, blue, and red lines representing the EMA differences across timeframes. A long position is suggested when all three lines are above zero, and a short position is suggested when all are below zero.
Disclaimer: This indicator is intended for educational purposes and should not be considered financial advice. Users are encouraged to conduct thorough backtesting and apply proper risk management before utilizing this strategy in live trading.
Cruce de Medias TotalEs una mejora de la estrategia Cruce de Medias Avanzado permitiendo añadir una tercera media móvil y también permitiendo operar en corto.
Al ser una estrategia se puede ir afinando el rendimiento y personalizando no sólo los períodos de las 3 medias móviles sino activando o desactivando la posibilidad de operar con tres medias o sólo con dos, y también activando o desactivando la opción de operar en corto.
En resumen, es una estrategia de cruce de medias, tienes 7 tipos de medías móviles a elegir, y la posibilidad de operar en corto activando pestaña y también la opción de incluir una tercera media móvil. Por defecto sólo aparece la rentabilidad de operaciones largas (de compras) y cruce de 2 medias móviles.
Cruce de Medias AvanzadoLa estrategia es muy simple, es cruce de medias móviles, por defecto la rápida es 50 y la lenta 200 pero se pueden personalizar, es una estrategia a largo plazo que ha demostrado ser muy rentable en cualquiera de sus medias con índices en gráficos diarios.
Se pueden elegir distintos tipos de medias móviles existentes y ajustar la rentabilidad de cada una y ajustar sus medias móviles a para aumentar la rentabilidad.
Aquí tienes una descripción de las medias móviles añadidas al script y sus características:
Simple SMA (Media Móvil Simple):
Calcula el promedio simple de los precios de cierre durante un período específico.
Es la más básica y fácil de interpretar, pero puede ser lenta para reaccionar a los cambios bruscos en el precio.
Exponencial EMA (Media Móvil Exponencial):
Da más peso a los precios recientes, lo que la hace más sensible a los cambios de precio.
Responde más rápidamente a las fluctuaciones del mercado en comparación con la SMA, lo que ayuda a detectar cambios de tendencia más temprano.
Ponderada WMA (Media Móvil Ponderada):
Asigna más peso a los datos más recientes de forma lineal.
Proporciona un balance entre la sensibilidad de la EMA y la suavidad de la SMA, siendo útil para seguir tendencias a corto plazo.
Volumen Ponderada VWMA (Media Móvil Ponderada por Volumen):
Pondera los precios según el volumen de negociación, dándole más importancia a los precios con mayor volumen.
Es útil para analizar si los movimientos de precio están respaldados por un volumen alto, lo que indica mayor relevancia.
Hull HMA (Media Móvil de Hull):
Diseñada para minimizar el retraso y aumentar la sensibilidad al mismo tiempo.
Combina el suavizado y la rápida respuesta al precio, lo que la hace adecuada para traders que necesitan detectar cambios de tendencia rápidamente.
Media Suavizada RMA (Media Móvil Suavizada):
Es similar a la EMA pero con un suavizado diferente, proporcionando un promedio que filtra de forma más efectiva el ruido de precios.
Suele usarse para análisis de tendencias a medio plazo.
Media de Arnaud Legoux ALMA (Media Móvil ALMA):
Utiliza un algoritmo especial de suavizado con control de sesgo para reducir el ruido y mejorar la detección de tendencias.
Permite ajustar los parámetros de sesgo y suavizado para adaptarse a diferentes necesidades de trading.
Es conocida por su capacidad de mantener una respuesta rápida al precio al tiempo que suprime el ruido.
Estas medias móviles ofrecen diferentes enfoques para seguir y analizar las tendencias en los precios. Dependiendo de tu estrategia de trading, puedes elegir la media móvil que mejor se adapte a tus necesidades: desde una respuesta rápida con la HMA o EMA, hasta un enfoque más estable y menos reactivo con la SMA o RMA.
Prame Weekly RSI and EMA Strategy Prame Weekly RSI and EMA Strategy
weekly RSI 14 is above 55
EMA 9 weeks of weekly RSI 14 is more than EMA 21 weeks of weekly RSI 14
price EMA 9 weeks is more than price EMA 21 weeks
EMA Cross + RSI Pullback Strategy with 1H ConfirmationThis strategy combines an ema9 and ema21 cross on the 15min timeframe with a short retest of the RSI 50-line (or close to the RSI 50-line) on the candle before the cross, on the cross, or one or two candles after the cross.
The script uses higher time frame confirmation on the 1 hour. It gives only a buy signal on the 15 minute if on the 1 hour the ema21 is above the ema 50. It gives only a sell signal on the 15 minute if on the 1 hour the ema21 is below the ema50.
It is still in the testing phase. So please backtest this strategy before putting money in the game. I combine my trading with the ATR stoploss finder set on 0.8 (instead of 1.5 default) and aim for RR 1:2 or better.
Please feel free to comment (nicely and polite) ;)
ameer hamza indicator//@version=5
strategy("Simplified EMA + RSI Strategy", overlay=true)
// Input settings
emaShort = input.int(10, title="Short EMA Length", minval=1)
emaLong = input.int(30, title="Long EMA Length", minval=1)
rsiLength = input.int(14, title="RSI Length")
rsiOverbought = input.int(70, title="RSI Overbought Level", minval=50, maxval=100)
rsiOversold = input.int(30, title="RSI Oversold Level", minval=0, maxval=50)
stopLossPct = input.float(1.0, title="Stop Loss Percentage") / 100
takeProfitPct = input.float(2.0, title="Take Profit Percentage") / 100
// Indicators
emaShortLine = ta.ema(close, emaShort)
emaLongLine = ta.ema(close, emaLong)
rsi = ta.rsi(close, rsiLength)
// Plot EMA lines
plot(emaShortLine, color=color.blue, title="Short EMA")
plot(emaLongLine, color=color.red, title="Long EMA")
hline(rsiOverbought, "RSI Overbought", color=color.orange)
hline(rsiOversold, "RSI Oversold", color=color.green)
// Buy and Sell Conditions
longCondition = crossover(emaShortLine, emaLongLine) and rsi < rsiOverbought
shortCondition = crossunder(emaShortLine, emaLongLine) and rsi > rsiOversold
// Debugging
if (longCondition)
label.new(bar_index, high, "Long Entry", color=color.green, textcolor=color.white)
if (shortCondition)
label.new(bar_index, low, "Short Entry", color=color.red, textcolor=color.white)
// Entry Signals
if (longCondition)
strategy.entry("Long", strategy.long)
if (shortCondition)
strategy.entry("Short", strategy.short)
// Stop Loss and Take Profit
longStopLoss = strategy.position_avg_price * (1 - stopLossPct)
longTakeProfit = strategy.position_avg_price * (1 + takeProfitPct)
shortStopLoss = strategy.position_avg_price * (1 + stopLossPct)
shortTakeProfit = strategy.position_avg_price * (1 - takeProfitPct)
if (strategy.position_size > 0)
strategy.exit("Exit Long", stop=longStopLoss, limit=longTakeProfit)
if (strategy.position_size < 0)
strategy.exit("Exit Short", stop=shortStopLoss, limit=shortTakeProfit)
Average Monthly Closing Direction StrategyEstrategia que diseñé, que combina patrones históricos y filtros técnicos para mejorar las probabilidades de éxito en trading. La idea es simple: he identificado ciertos días específicos del mes que, según los datos históricos, tienen tendencia a cerrar en positivo (suben) o en negativo (bajan).
Minkiu Bollinger Band Strategy Convert all Indicator specific code to Strategy specific code. Don't use any code that a TradingView Strategy won't support. Especially timeframes and gaps. Define those in code so they are semantically the same as before.
Ichimoku + RSI + MACD Strategy1. Relative Strength Index (RSI)
Overview:
The Relative Strength Index (RSI) is a momentum oscillator that measures the speed and change of price movements. It ranges from 0 to 100 and is typically used to identify overbought or oversold conditions in a market.
How to Use with Ichimoku:
Long Entry: Look for RSI to be above 30 (indicating it is not oversold) when the price is above the Ichimoku Cloud.
Short Entry: Look for RSI to be below 70 (indicating it is not overbought) when the price is below the Ichimoku Cloud.
2. Moving Average Convergence Divergence (MACD)
Overview:
The MACD is a trend-following momentum indicator that shows the relationship between two moving averages of a security’s price. It consists of the MACD line, signal line, and histogram.
How to Use with Ichimoku:
Long Entry: Enter a long position when the MACD line crosses above the signal line while the price is above the Ichimoku Cloud.
Short Entry: Enter a short position when the MACD line crosses below the signal line while the price is below the Ichimoku Cloud.
Combined Strategy Example
Here’s a brief outline of how to structure a trading strategy using Ichimoku, RSI, and MACD:
Long Entry Conditions:
Price is above the Ichimoku Cloud.
RSI is above 30.
MACD line crosses above the signal line.
Short Entry Conditions:
Price is below the Ichimoku Cloud.
RSI is below 70.
MACD line crosses below the signal line.
Exit Conditions:
Exit long when MACD line crosses below the signal line.
Exit short when MACD line crosses above the signal line.
Zig Zag + Aroon StrategyBelow is a trading strategy that combines the Zig Zag indicator and the Aroon indicator. This combination can help identify trends and potential reversal points.
Zig Zag and Aroon Strategy Overview
Zig Zag Indicator:
The Zig Zag indicator helps to identify significant price movements and eliminates smaller fluctuations. It is useful for spotting trends and reversals.
Aroon Indicator:
The Aroon indicator consists of two lines: Aroon Up and Aroon Down. It measures the time since the highest high and the lowest low over a specified period, indicating the strength of a trend.
Strategy Conditions
Long Entry Conditions:
Aroon Up crosses above Aroon Down (indicating a bullish trend).
The Zig Zag indicator shows an upward movement (indicating a potential continuation).
Short Entry Conditions:
Aroon Down crosses above Aroon Up (indicating a bearish trend).
The Zig Zag indicator shows a downward movement (indicating a potential continuation).
Exit Conditions:
Exit long when Aroon Down crosses above Aroon Up.
Exit short when Aroon Up crosses above Aroon Down.
SLYY BTC Strategy – Dynamische Trend- und Volatilitätsbasierte Die SLYY BTC Strategy ist eine speziell entwickelte Strategie für den BTC-Handel, die durch eine Kombination von gleitenden Durchschnitten und einem ATR-basierten Filter besonders stabile Ein- und Ausstiege ermöglicht. Der Algorithmus nutzt den 111er und 350er gleitenden Durchschnitt, um grundlegende Marktrichtungen zu erkennen und Entry-Trigger zu setzen. Zusätzlich stellt der ATR-Indikator (Average True Range) sicher, dass Trades nur bei optimaler Marktvolatilität ausgeführt werden, wodurch unnötige Risiken minimiert werden.
Funktionen der Strategie:
• Dynamischer Stop-Loss: Der Stop-Loss passt sich automatisch an die aktuelle Volatilität an und wird auf Basis eines variablen ATR-Multiplikators gesetzt, sodass er in volatilen Phasen breiter und in stabilen Phasen enger ist.
• Flexibler Trade-Einstieg: Die Strategie erkennt Long- und Short-Signale basierend auf den gleitenden Durchschnitten und eröffnet Positionen nur, wenn der ATR unter einem definierten Schwellenwert liegt.
• Zuverlässiges Risikomanagement: Die Stop-Loss-Abstände basieren auf einem fixen prozentualen Offset, der in den Strategieeinstellungen angepasst werden kann, um den persönlichen Risikopräferenzen zu entsprechen.
Einsatzgebiet:
Diese Strategie ist für Trader geeignet, die BTC auf mittleren Zeitrahmen handeln und ein risikokontrolliertes System mit dynamischem Volatilitätsmanagement bevorzugen. Die Slice PTC Strategy bietet eine klare, algorithmische Lösung für den Handel in Trendphasen und stabilisiert die Performance durch eine intelligente Volatilitätssteuerung.
Enhanced 1-Hour Strategy for Maximized ReturnsEnhanced 1-Hour Strategy for Maximized Returns
Overview
This is a trend-following and volatility-based breakout strategy designed for trading on the one-hour timeframe. It combines moving average crossovers, RSI for momentum, and Bollinger Bands as a volatility filter to confirm entries and exits. With a focus on maximizing returns, this strategy is tuned to work with leveraged trading and dynamically allocates position sizes based on available equity.
How the Strategy Works
Trend Detection: The strategy uses two moving averages—a short-term and a long-term—to detect trends.
A crossover of the short moving average above the long moving average indicates a potential upward trend.
Conversely, a crossover of the short moving average below the long moving average suggests a downward trend.
Momentum Confirmation with RSI: To avoid entering trades in low-momentum conditions, the strategy employs the Relative Strength Index (RSI).
A long (buy) trade is considered only when RSI is above a set threshold, indicating upward momentum.
A short (sell) trade is considered only when RSI is below a set threshold, indicating downward momentum.
Volatility Filter with Bollinger Bands: Bollinger Bands act as a filter to ensure the strategy enters trades only during periods of higher volatility.
For a long trade, the price must be above the lower Bollinger Band.
For a short trade, the price must be below the upper Bollinger Band.
ATR-Based Stop-Loss and Take-Profit: The strategy uses the Average True Range (ATR) to set stop-loss and take-profit levels dynamically based on market volatility.
The stop-loss level is set at a certain multiplier of the ATR below (for long trades) or above (for short trades) the entry price.
The take-profit level is set at a larger ATR multiplier, allowing the strategy to capture larger movements.
Position Sizing with Leverage: The position size is calculated as a percentage of equity, leveraging it to maximize returns as the account balance grows.
Key Variables and Adjustable Parameters
Here are the adjustable inputs in the strategy, allowing traders to tailor it to their preferences:
Moving Averages:
Short MA Length (shortMaLength): Length of the short-term moving average (default: 14).
Long MA Length (longMaLength): Length of the long-term moving average (default: 50).
These lengths can be adjusted to make the moving average crossovers more or less sensitive.
RSI Settings:
RSI Length (rsiLength): Length of the RSI calculation (default: 14).
RSI Upper Threshold (rsiUpperThreshold): Minimum RSI value required for long trades (default: 60).
RSI Lower Threshold (rsiLowerThreshold): Maximum RSI value allowed for short trades (default: 40).
Adjusting these thresholds can help control the momentum conditions required for trades.
ATR Multipliers for Stop-Loss and Take-Profit:
ATR Stop-Loss Multiplier (atrMultiplierStopLoss): Multiplier for the ATR to set the stop-loss level (default: 1.5).
ATR Take-Profit Multiplier (atrMultiplierTakeProfit): Multiplier for the ATR to set the take-profit level (default: 3.0).
Tuning these multipliers can help in balancing risk and reward, depending on market volatility.
Bollinger Bands Settings:
Deviation (dev): The standard deviation multiplier for Bollinger Bands (default: 2).
Bollinger Bands provide a volatility filter, and this multiplier affects the width of the bands.
Position Sizing and Leverage:
Leverage (leverage): The leverage applied to the position (default: 10).
Allocation Percent (allocationPercent): The percentage of equity allocated to each trade (default: 0.1 or 10%).
Adjusting these settings can increase or decrease the position size relative to your equity, helping control risk exposure.
Long-Term Pivot and Golden Crossover Strategy//@version=5
strategy("Long-Term Pivot and Golden Crossover Strategy", overlay=true)
// Input for moving averages
shortTerm = input.int(100, title="Short-term SMA Period") // 100-period SMA
longTerm = input.int(200, title="Long-term SMA Period") // 200-period SMA
// Calculate moving averages
sma100 = ta.sma(close, shortTerm)
sma200 = ta.sma(close, longTerm)
// Golden crossover: when short-term SMA crosses above long-term SMA
goldenCrossover = ta.crossover(sma100, sma200)
// Calculate daily pivot points (traditional formula)
pivot = (high + low + close) / 3
support1 = pivot - (high - low)
resistance1 = pivot + (high - low)
support2 = pivot - 2 * (high - low)
resistance2 = pivot + 2 * (high - low)
// Plot SMAs and pivot points on the chart
plot(sma100, color=color.blue, title="100-period SMA", linewidth=2)
plot(sma200, color=color.red, title="200-period SMA", linewidth=2)
plot(pivot, color=color.purple, title="Pivot Point", linewidth=2)
plot(support1, color=color.green, title="Support 1", linewidth=1)
plot(resistance1, color=color.green, title="Resistance 1", linewidth=1)
plot(support2, color=color.green, title="Support 2", linewidth=1)
plot(resistance2, color=color.green, title="Resistance 2", linewidth=1)
// Entry Condition: Golden crossover with price above the pivot point
longCondition = goldenCrossover and close > pivot
// Exit Condition: You can use a stop-loss and take-profit, or a bearish crossover
stopLossPercent = input.float(3, title="Stop Loss (%)") / 100 // Wider stop loss for long-term trades
takeProfitPercent = input.float(10, title="Take Profit (%)") / 100 // Higher take profit for long-term trades
// Calculate stop-loss and take-profit prices
longStopLoss = close * (1 - stopLossPercent)
longTakeProfit = close * (1 + takeProfitPercent)
// Execute strategy
if (longCondition)
strategy.entry("Long", strategy.long, stop=longStopLoss, limit=longTakeProfit)
// Optional: Exit strategy based on a bearish crossover
exitCondition = ta.crossunder(sma100, sma200)
if (exitCondition)
strategy.close("Long")
// Strategy exit with custom stop loss and take profit
strategy.exit("Take Profit/Stop Loss", from_entry="Long", stop=longStopLoss, limit=longTakeProfit)
SMC StrategyThis Pine Script strategy is based on Smart Money Concepts (SMC), designed for TradingView. Here's a brief summary of what the script does:
1. Swing High and Low Calculation: It identifies recent swing highs and lows, which are used to define key zones.
2. Equilibrium, Premium, and Discount Zones:
- Equilibrium is the midpoint between the swing high and low.
- Premium Zone is above the equilibrium, indicating a potential resistance area (sell zone).
- Discount Zone is below the equilibrium, indicating a potential support area (buy zone).
3. Simple Moving Average (SMA): It uses a 50-period SMA to determine the trend direction. If the price is above the SMA, the trend is bullish; if it's below, the trend is bearish.
4. Buy and Sell Signals:
- Buy Signal: Generated when the price is in the discount zone and above the equilibrium, with the price also above the SMA.
- Sell Signal: Triggered when the price is in the premium zone and below the equilibrium, with the price also below the SMA.
5. Order Blocks: It detects basic order blocks by identifying the highest high and lowest low within the last 20 bars. These levels help confirm the buy and sell signals.
6. Liquidity Zones: It marks the swing high and low as potential liquidity zones, indicating where price may reverse due to institutional players' activity.
The strategy then executes trades based on these signals, plotting buy and sell markers on the chart and showing the key levels (zones) and trend direction.
FTMO Rules MonitorFTMO Rules Monitor: Stay on Track with Your FTMO Challenge Goals
TLDR; You can test with this template whether your strategy for one asset would pass the FTMO challenges step 1 then step 2, then with real money conditions.
Passing a prop firm challenge is ... challenging.
I believe a toolkit allowing to test in minutes whether a strategy would have passed a prop firm challenge in the past could be very powerful.
The FTMO Rules Monitor is designed to help you stay within FTMO’s strict risk management guidelines directly on your chart. Whether you’re aiming for the $10,000 or the $200,000 account challenge, this tool provides real-time tracking of your performance against FTMO’s rules to ensure you don’t accidentally breach any limits.
NOTES
The connected indicator for this post doesn't matter.
It's just a dummy double supertrends (see below)
The strategy results for this script post does not matter as I'm posting a FTMO rules template on which you can connect any indicator/strategy.
//@version=5
indicator("Supertrends", overlay=true)
// Supertrend 1 Parameters
var string ST1 = "Supertrend 1 Settings"
st1_atrPeriod = input.int(10, "ATR Period", minval=1, maxval=50, group=ST1)
st1_factor = input.float(2, "Factor", minval=0.5, maxval=10, step=0.5, group=ST1)
// Supertrend 2 Parameters
var string ST2 = "Supertrend 2 Settings"
st2_atrPeriod = input.int(14, "ATR Period", minval=1, maxval=50, group=ST2)
st2_factor = input.float(3, "Factor", minval=0.5, maxval=10, step=0.5, group=ST2)
// Calculate Supertrends
= ta.supertrend(st1_factor, st1_atrPeriod)
= ta.supertrend(st2_factor, st2_atrPeriod)
// Entry conditions
longCondition = direction1 == -1 and direction2 == -1 and direction1 == 1
shortCondition = direction1 == 1 and direction2 == 1 and direction1 == -1
// Optional: Plot Supertrends
plot(supertrend1, "Supertrend 1", color = direction1 == -1 ? color.green : color.red, linewidth=3)
plot(supertrend2, "Supertrend 2", color = direction2 == -1 ? color.lime : color.maroon, linewidth=3)
plotshape(series=longCondition, location=location.belowbar, color=color.green, style=shape.triangleup, title="Long")
plotshape(series=shortCondition, location=location.abovebar, color=color.red, style=shape.triangledown, title="Short")
signal = longCondition ? 1 : shortCondition ? -1 : na
plot(signal, "Signal", display = display.data_window)
To connect your indicator to this FTMO rules monitor template, please update it as follow
Create a signal variable to store 1 for the long/buy signal or -1 for the short/sell signal
Plot it in the display.data_window panel so that it doesn't clutter your chart
signal = longCondition ? 1 : shortCondition ? -1 : na
plot(signal, "Signal", display = display.data_window)
In the FTMO Rules Monitor template, I'm capturing this external signal with this input.source variable
entry_connector = input.source(close, "Entry Connector", group="Entry Connector")
longCondition = entry_connector == 1
shortCondition = entry_connector == -1
🔶 USAGE
This indicator displays essential FTMO Challenge rules and tracks your progress toward meeting each one. Here’s what’s monitored:
Max Daily Loss
• 10k Account: $500
• 25k Account: $1,250
• 50k Account: $2,500
• 100k Account: $5,000
• 200k Account: $10,000
Max Total Loss
• 10k Account: $1,000
• 25k Account: $2,500
• 50k Account: $5,000
• 100k Account: $10,000
• 200k Account: $20,000
Profit Target
• 10k Account: $1,000
• 25k Account: $2,500
• 50k Account: $5,000
• 100k Account: $10,000
• 200k Account: $20,000
Minimum Trading Days: 4 consecutive days for all account sizes
🔹 Key Features
1. Real-Time Compliance Check
The FTMO Rules Monitor keeps track of your daily and total losses, profit targets, and trading days. Each metric updates in real-time, giving you peace of mind that you’re within FTMO’s rules.
2. Color-Coded Visual Feedback
Each rule’s status is shown clearly with a ✓ for compliance or ✗ if the limit is breached. When a rule is broken, the indicator highlights it in red, so there’s no confusion.
3. Completion Notification
Once all FTMO requirements are met, the indicator closes all open positions and displays a celebratory message on your chart, letting you know you’ve successfully completed the challenge.
4. Easy-to-Read Table
A table on your chart provides an overview of each rule, your target, current performance, and whether you’re meeting each goal. The table adjusts its color scheme based on your chart settings for optimal visibility.
5. Dynamic Position Sizing
Integrated ATR-based position sizing helps you manage risk and avoid large drawdowns, ensuring each trade aligns with FTMO’s risk management principles.
Daveatt
CCI Threshold StrategyThe CCI Threshold Strategy is a trading approach that utilizes the Commodity Channel Index (CCI) as a momentum indicator to identify potential buy and sell signals in financial markets. The CCI is particularly effective in detecting overbought and oversold conditions, providing traders with insights into possible price reversals. This strategy is designed for use in various financial instruments, including stocks, commodities, and forex, and aims to capitalize on price movements driven by market sentiment.
Commodity Channel Index (CCI)
The CCI was developed by Donald Lambert in the 1980s and is primarily used to measure the deviation of a security's price from its average price over a specified period.
The formula for CCI is as follows:
CCI=(TypicalPrice−SMA)×0.015MeanDeviation
CCI=MeanDeviation(TypicalPrice−SMA)×0.015
where:
Typical Price = (High + Low + Close) / 3
SMA = Simple Moving Average of the Typical Price
Mean Deviation = Average of the absolute deviations from the SMA
The CCI oscillates around a zero line, with values above +100 indicating overbought conditions and values below -100 indicating oversold conditions (Lambert, 1980).
Strategy Logic
The CCI Threshold Strategy operates on the following principles:
Input Parameters:
Lookback Period: The number of periods used to calculate the CCI. A common choice is 9, as it balances responsiveness and noise.
Buy Threshold: Typically set at -90, indicating a potential oversold condition where a price reversal is likely.
Stop Loss and Take Profit: The strategy allows for risk management through customizable stop loss and take profit points.
Entry Conditions:
A long position is initiated when the CCI falls below the buy threshold of -90, indicating potential oversold levels. This condition suggests that the asset may be undervalued and due for a price increase.
Exit Conditions:
The long position is closed when the closing price exceeds the highest price of the previous day, indicating a bullish reversal. Additionally, if the stop loss or take profit thresholds are hit, the position will be exited accordingly.
Risk Management:
The strategy incorporates optional stop loss and take profit mechanisms, which can be toggled on or off based on trader preference. This allows for flexibility in risk management, aligning with individual risk tolerances and trading styles.
Benefits of the CCI Threshold Strategy
Flexibility: The CCI Threshold Strategy can be applied across different asset classes, making it versatile for various market conditions.
Objective Signals: The use of quantitative thresholds for entry and exit reduces emotional bias in trading decisions (Tversky & Kahneman, 1974).
Enhanced Risk Management: By allowing traders to set stop loss and take profit levels, the strategy aids in preserving capital and managing risk effectively.
Limitations
Market Noise: The CCI can produce false signals, especially in highly volatile markets, leading to potential losses (Bollinger, 2001).
Lagging Indicator: As a lagging indicator, the CCI may not always capture rapid market movements, resulting in missed opportunities (Pring, 2002).
Conclusion
The CCI Threshold Strategy offers a systematic approach to trading based on well-established momentum principles. By focusing on overbought and oversold conditions, traders can make informed decisions while managing risk effectively. As with any trading strategy, it is crucial to backtest the approach and adapt it to individual trading styles and market conditions.
References
Bollinger, J. (2001). Bollinger on Bollinger Bands. New York: McGraw-Hill.
Lambert, D. (1980). Commodity Channel Index. Technical Analysis of Stocks & Commodities, 2, 3-5.
Pring, M. J. (2002). Technical Analysis Explained. New York: McGraw-Hill.
Tversky, A., & Kahneman, D. (1974). Judgment under uncertainty: Heuristics and biases. Science, 185(4157), 1124-1131.
Dynamic RSI Mean Reversion StrategyDynamic RSI Mean Reversion Strategy
Overview:
This strategy uses an RSI with ATR-Adjusted OB/OS levels in order to enhance the quality of it's mean reversion trades. It also incorporates a form of trend filtering in an effort to minimize downside and maximize upside. The backtest has fewer trades, as it uses substantial filtering to enhance trade quality. As you can see, I didn't cherry pick the results, so the results aren't the most beautiful thing you'll see in your life. I did this to ensure nobody gets misled. If you need a higher frequency of trades, consider removing the trend filter or increasing the length of the EMAs used for trend detection.
Features:
Dynamic OB/OS Levels: Uses ATR to adjust overbought and oversold thresholds dynamically, making the RSI more responsive in varying volatility conditions. This approach enhances signal strength by expanding the RSI range in high volatility and tightening it in low volatility.
Mean Reversion Focus: Designed for mean reversion but incorporates a trend-following filter to reduce countertrend trades. When the RSI is high, it often indicates an uptrend, so a trend filter prevents shorting in these cases and the same goes for downtrends and longing.
Trend Filtering: A moving average cross trend filter checks for the trend direction, with the RSI signal line color-coded to reflect trend shifts. Entries occur when the RSI crosses above or below the dynamic thresholds and is not a countertrend trade.
Stop Losses: Stop losses are set based on ATR distance from the entry price, providing volatility-adjusted protection.
Note:
If you're using this strategy on assets with a higher price, remember to increase the initial capital in the strategy settings. Otherwise, the strategy won't generate any (or many) trades and you'll end up with some inaccurate results.
Recommended Use:
Test it on different assets and timeframes. I’ve found the best results with standard RSI inputs, a relatively slow ATR, and a slower MA cross for trend filtering. Thus, the defaults are set that way. If the trend metrics are too slow, you’ll filter out too many good trades while allowing crummy ones; if too fast, most trades may be filtered out. As always, this has a lot of configurability so experiment to find the balance that works for your trading style.
VWAP Stdev Bands Strategy (Long Only)The VWAP Stdev Bands Strategy (Long Only) is designed to identify potential long entry points in trending markets by utilizing the Volume Weighted Average Price (VWAP) and standard deviation bands. This strategy focuses on capturing upward price movements, leveraging statistical measures to determine optimal buy conditions.
Key Features:
VWAP Calculation: The strategy calculates the VWAP, which represents the average price a security has traded at throughout the day, weighted by volume. This is an essential indicator for determining the overall market trend.
Standard Deviation Bands: Two bands are created above and below the VWAP, calculated using specified standard deviations. These bands act as dynamic support and resistance levels, providing insight into price volatility and potential reversal points.
Trading Logic:
Long Entry Condition: A long position is triggered when the price crosses below the lower standard deviation band and then closes above it, signaling a potential price reversal to the upside.
Profit Target: The strategy allows users to set a predefined profit target, closing the long position once the specified target is reached.
Time Gap Between Orders: A customizable time gap can be specified to prevent multiple orders from being placed in quick succession, allowing for a more controlled trading approach.
Visualization: The VWAP and standard deviation bands are plotted on the chart with distinct colors, enabling traders to visually assess market conditions. The strategy also provides optional plotting of the previous day's VWAP for added context.
Use Cases:
Ideal for traders looking to engage in long-only positions within trending markets.
Suitable for intraday trading strategies or longer-term approaches based on market volatility.
Customization Options:
Users can adjust the standard deviation values, profit target, and time gap to tailor the strategy to their specific trading style and market conditions.
Note: As with any trading strategy, it is important to conduct thorough backtesting and analysis before live trading. Market conditions can change, and past performance does not guarantee future results.
Demo GPT - Day Trading Scalping StrategyOverview:
This strategy is designed for day trading and scalping, utilizing a combination of technical indicators, candlestick patterns, and volume analysis to determine entry and exit points. It focuses on capturing short-term price movements while ensuring that trades are executed under specific market conditions.
Key Components:
Technical Indicators Used:
Exponential Moving Average (EMA): The strategy uses the 20-period EMA to identify the trend direction. The EMA smooths out price data, helping traders make more informed decisions about potential buy or sell signals.
Volume Weighted Average Price (VWAP): VWAP is used to measure the average price a security has traded at throughout the day, based on both volume and price. This indicator helps assess whether the current price is above or below the average trading price.
Camarilla Pivot Points: The strategy calculates four levels of Camarilla pivots (S2, S3, R2, R3) based on the highest and lowest prices over the last 14 daily candles. These levels act as potential support and resistance zones, guiding entry and exit decisions.
Candlestick Analysis:
Buy Condition: A buy signal is triggered when:
The first candle (previous candle) is green (close > open).
The second candle (current candle) is also green and opens above the first candle.
The volume of the current candle exceeds the 20-period moving average of volume, indicating strong buying interest.
Sell Condition: A sell signal is triggered when:
The first candle is red (close < open).
The second candle opens below the first red candle.
The volume of the current candle also exceeds the 20-period moving average of volume, indicating strong selling pressure.
Position Management:
The strategy enters a long position (buy) when the buy condition is met and closes the long position when the sell condition is met. This approach aims to capture upward momentum while avoiding extended exposure to downside risks.
Trading Settings:
Capital Management: The strategy uses 100% of available capital for each trade, allowing for maximum exposure to potential gains.
Commission and Slippage: The script includes settings for a commission rate of 0.1% and slippage of 3, accounting for trading costs and potential price changes during order execution.
Date Filtering: The strategy allows users to set a start date (January 1, 2018) and an end date (December 31, 2069) for trade execution, providing flexibility in backtesting and live trading.
Visualization:
The script plots the 20 EMA, VWAP, and the Camarilla pivot levels on the chart for visual reference.
Buy and sell signals are visually represented with shapes on the chart, making it easy to identify potential trade opportunities at a glance.
Volume is plotted in a separate pane to assess trading activity, and a horizontal line at zero provides a reference point.
Summary:
This Day Trading Scalping Strategy is designed to exploit short-term price movements by using a combination of EMAs, VWAP, and Camarilla pivot levels, alongside candlestick patterns and volume analysis. It is well-suited for traders looking to make quick trades based on real-time market conditions while maintaining a disciplined approach to entry and exit points. The strategy is highly visual, allowing traders to quickly assess market conditions and make informed trading decisions.
Feel free to modify or adjust any aspects of the strategy according to your specific trading goals or preferences!
PTS - Bollinger Bands with Trailing StopPTS - Bollinger Bands with Trailing Stop Strategy
Overview
The "PTS - Bollinger Bands with Trailing Stop" strategy is designed to capitalize on strong bullish market movements by combining the Bollinger Bands indicator with a dynamic trailing stop based on the Average True Range (ATR). This strategy aims to enter long positions during upward breakouts and protect profits through an adaptive exit mechanism.
Key Features
1. Bollinger Bands Indicator
Basis Moving Average Type: Choose from SMA, EMA, SMMA, WMA, or VWMA for the Bollinger Bands' basis line. Length: Adjustable period for calculating the moving average and standard deviation (default is 20). Standard Deviation Multiplier (StdDev): Determines the width of the bands (default is 2.0). Source: Select the price data used for calculations (default is the closing price).
2. Entry Conditions
The strategy enters a long position when the closing price crosses above the upper Bollinger Band , indicating strong upward momentum.
3. Exit Conditions
Trailing Stop Loss: Implemented using ATR to adjust dynamically with market volatility. ATR Length: Period for calculating ATR (default is 14). ATR Multiplier for Trailing Stop: Determines how closely the trailing stop follows the price (default is 2.0). Close Below Lower Bollinger Band: The strategy exits the long position if the closing price crosses below the lower Bollinger Band .
4. Risk Management
Commission and Slippage: Commission is set at 0.1%; slippage is set to 3. Position Sizing: Uses 100% of equity per trade (adjustable).
5. Date Range Filter
Specify the time period during which the strategy is active. Start Date: January 1, 2018. End Date: December 31, 2069.
Customizable Inputs
BB Length: Adjust the period for Bollinger Bands calculation. BB StdDev: Modify the standard deviation multiplier. Basis MA Type: Select the moving average type. Source: Choose the price data source. Offset: Shift the Bollinger Bands on the chart. ATR Length: Set the period for ATR calculation. ATR Multiplier for Trailing Stop: Adjust the trailing stop sensitivity.
Thought for 1m 7s
Description for the "PTS - Bollinger Bands with Trailing Stop" Strategy
PTS - Bollinger Bands with Trailing Stop Strategy
Overview
The "PTS - Bollinger Bands with Trailing Stop" strategy is designed to capitalize on strong bullish market movements by combining the Bollinger Bands indicator with a dynamic trailing stop based on the Average True Range (ATR). This strategy aims to enter long positions during upward breakouts and protect profits through an adaptive exit mechanism.
Key Features
1. Bollinger Bands Indicator
Basis Moving Average Type: Choose from SMA, EMA, SMMA, WMA, or VWMA for the Bollinger Bands' basis line. Length: Adjustable period for calculating the moving average and standard deviation (default is 20). Standard Deviation Multiplier (StdDev): Determines the width of the bands (default is 2.0). Source: Select the price data used for calculations (default is the closing price).
2. Entry Conditions
The strategy enters a long position when the closing price crosses above the upper Bollinger Band , indicating strong upward momentum.
3. Exit Conditions
Trailing Stop Loss: Implemented using ATR to adjust dynamically with market volatility. ATR Length: Period for calculating ATR (default is 14). ATR Multiplier for Trailing Stop: Determines how closely the trailing stop follows the price (default is 2.0). Close Below Lower Bollinger Band: The strategy exits the long position if the closing price crosses below the lower Bollinger Band .
4. Risk Management
Commission and Slippage: Commission is set at 0.1%; slippage is set to 3. Position Sizing: Uses 100% of equity per trade (adjustable).
5. Date Range Filter
Specify the time period during which the strategy is active. Start Date: January 1, 2018. End Date: December 31, 2069.
Customizable Inputs
BB Length: Adjust the period for Bollinger Bands calculation. BB StdDev: Modify the standard deviation multiplier. Basis MA Type: Select the moving average type. Source: Choose the price data source. Offset: Shift the Bollinger Bands on the chart. ATR Length: Set the period for ATR calculation. ATR Multiplier for Trailing Stop: Adjust the trailing stop sensitivity.
How the Strategy Works
1. Initialization
Calculates Bollinger Bands and ATR based on selected parameters.
2. Entry Logic
Opens a long position when the closing price exceeds the upper Bollinger Band.
3. Exit Logic
Uses a trailing stop loss based on ATR. Exits if the closing price drops below the lower Bollinger Band.
4. Date Filtering
Executes trades only within the specified date range.
Advantages
Adaptive Risk Management: Trailing stop adjusts to market volatility. Simplicity: Clear entry and exit signals. Customizable Parameters: Tailor the strategy to different assets or conditions.
Considerations
Aggressive Position Sizing: Using 100% equity per trade is high-risk. Market Conditions: Best in trending markets; may produce false signals in sideways markets. Backtesting: Always test on historical data before live trading.
Disclaimer
This strategy is intended for educational and informational purposes only. Trading involves significant risk, and past performance is not indicative of future results. Assess your financial situation and consult a financial advisor if necessary.
Usage Instructions
1. Apply the Strategy: Add it to your TradingView chart. 2. Configure Inputs: Adjust parameters to suit your style and asset. 3. Analyze Backtest Results: Use the Strategy Tester. 4. Optimize Parameters: Experiment with input values. 5. Risk Management: Evaluate position sizing and incorporate risk controls.
Final Notes
The "PTS - Bollinger Bands with Trailing Stop" strategy provides a framework to leverage momentum breakouts while managing risk through adaptive trailing stops. Customize and test thoroughly to align with your trading objectives.