Parabolic SAR Trailing Stop Strategy Based on ATR Indicator
This strategy is named "Parabolic SAR Trailing Stop Strategy Based on ATR Indicator". It uses the ATR indicator to adjust the acceleration factor of Parabolic SAR for adapting to changing market volatility.
The acceleration factor of traditional Parabolic SAR remains fixed and cannot adapt to increased volatility. This strategy makes the SAR curve contract faster as ATR value expands, so the stop can tighten quicker around prices when volatility rises to effectively control risks.
Specifically, after determining price trend, an adaptive acceleration factor is calculated based on ATR value to plot the Parabolic SAR trailing stop curve. When prices breach the stop level, the stop loss is triggered.
The advantage of this strategy is making traditional Parabolic SAR stops dynamic based on market volatility. But ATR parameters need optimization, and the stop line can be prone to premature breach.
In general, adaptive stops are important for protecting profits and limiting risks. Traders should choose suitable stop indicators based on market conditions, and test and optimize parameters, in order to maximize the utility of stop loss strategies.
/*backtest
start: 2023-08-13 00:00:00
end: 2023-09-12 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy(title="ATR Parabolic SAR Strategy [QuantNomad]", shorttitle="ATR PSAR Strategy [QN]", overlay=true, default_qty_type = strategy.percent_of_equity, default_qty_value = 100)
atr_length = input(14)- 1
