Support-Resistance breakout
1
Follow
1781
Followers
Strategy based on longing resistance breakout and shorting support breakout.
It defines highs and lows using fractal with 2 bars for confirming high/lows. So it has 2 bars lag.
It calculates the difference between sma with defined length (21 by default) of highs and of lows and uses it as alt SR level. This idea I took from synapticEx's indicator Nebula-Advanced-Dynamic-Support-Resistance.
Position enter is the breakout of SR, defined by fractals.
Position exit is: bar change in opposite to position direction > difference is sma of highs and of lows.
Source
Pine
/*backtest
start: 2022-04-30 00:00:00
end: 2022-05-29 23:59:00
period: 4h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("SR TREND STRATEGY", shorttitle="SR TREND", overlay=true, calc_on_order_fills=true)
//based on by synapticEx SR indicator https://www.tradingview.com/script/O0F675Kv-Nebula-Advanced-Dynamic-Support-Resistance/
length = input(title="SR lookbak length", type=input.integer, defval=21)Strategy parameters
Related strategies
Comment
All comments (0)
No data
- 1

