pmk07

Trend SR based strategy

pmk07 Uppdaterad   
It is a logical continuation of my Trend SR based indicator

Algo of strategy is next
1)Detect SR levels
2)Calculate separate channels for SR made by highs and lows
3)it takes position if the current SR is breaking and close price is not in opposite channel zone
4)It closes position if prise leave current channel zone or as an option (stoploss) if SR is breaking in an opposite direction

-uses //@version=4
-no volume needed for detecting SR breaking and entering a long position
-volume confirmation of SR breaking may be used in the option section
-volume has an option to use smoothing with MA: SMA, AHMA, VIDYA
-volume has option to use volume pump as confirmation of SR breaking (simple dev function)
-stoploss as option
-uses barstate.isconfirmed (returns true if the script is calculating the last (closing) update of the current bar) for entering position on current bar close
-as an option, all or only current SR levels detected by algo can be plotted
-option to plot SR as a channel - as FILTERED whole SR history, in a long or short position it plots only stoploss level and entering opposite position level, in no position it plots long and short entering levels

It works well on 1D
For using on 4h or lower timeframes - Volume confirmation with VIDYA or AHMA may give better results
For better work especially on LTF algo needs better detection of highs and lows, now it uses fractal filter of last bars
Versionsinformation:
fixed: plotting SR channel did not take into account stoploss option
Versionsinformation:
Changed channel plotting option. Now it plots differences in channels made on highs and lows separately. And additionally, in long/short position closing_position_level and opening_opposite_position level plots by circles, in no position opening_long/short position level plots by circles.
Versionsinformation:
added: calc_on_order_fills=true, calc_on_every_tick=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100
changed: channel option visual
fixed: wrong open/close long/short order execution
Skyddat skript
Detta skript publiceras med stängd källkod och du kan använda det fritt. Du kan ange den som favorit för att använda den i ett diagram. Du kan inte visa eller ändra dess källkod.
Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?