OPEN-SOURCE SCRIPT

Mean-Reverse ATR Strategy[15min]

701
The strategy is designed to work on a 15-minute timeframe, using a combination of Bollinger Bands, Simple Moving Averages (SMA), and the Average True Range (ATR) to determine trade entries and exits.

Indicators Used in the Strategy:

Bollinger Bands consist of three lines:
Middle Band (EMA or SMA): A moving average that represents the market's average price over a set period.
Upper Band: The middle band plus a multiple (mult) of the standard deviation.
Lower Band: The middle band minus a multiple of the standard deviation.
When the price touches or crosses below the lower band, it suggests an oversold condition (potential buying opportunity).
When the price touches or crosses above the upper band, it suggests an overbought condition (potential selling opportunity).
A narrowing of bands indicates low volatility, while a widening of bands indicates increased volatility.

2. Simple Moving Averages (SMA)
Purpose: Identifies the overall trend direction by averaging past prices.

SMA1 (100-period): A medium-term moving average that reacts relatively quickly to price changes.
SMA2 (200-period): A long-term moving average that reacts slower to price changes.
Uptrend Confirmation: If SMA1 is above SMA2, the market is in an uptrend.
Downtrend Confirmation: If SMA1 is below SMA2, the market is in a downtrend.
Golden Cross: When SMA1 crosses above SMA2, it signals a bullish trend.
Death Cross: When SMA1 crosses below SMA2, it signals a bearish trend.

3. Average True Range (ATR)
Purpose: Measures market volatility and is used for setting stop-loss levels.

ATR calculates the average range between the high and low of each candlestick over a set period.
A higher ATR indicates more volatility, while a lower ATR indicates less volatility.
Used to set dynamic stop-loss levels:
For long positions: Stop-loss is set below the entry price based on ATR.
For short positions: Stop-loss is set above the entry price based on ATR.
Traders often use an ATR multiplier (e.g., 2× ATR) to define reasonable stop levels based on market conditions.

Bollinger Bands generate potential entry signals based on price crossing the upper/lower bands.
SMA (100 & 200) confirms the market trend and filters false signals.
ATR dynamically calculates stop-loss levels to manage risk effectively.
This combination ensures that trades are entered at optimal points while following the overall market trend and managing risk with volatility-based stops.

Strategy uses additional baisc stop-loss at 2.5% to avoid higher lose

to determine the level of stop loss and target point I used a piece of code by RafaelZioni, here is the script from which a piece of code was taken
https://pl.tradingview.com/script/xGk5K4DE-BTC-15-min/
Enjoy !

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.