This indicator is using the mean of Ichimoku Kijun of periods 9 and 26. That value is smoothed with a triangular average. Then 89% of the ATR 14 periods is added and subtract to create the long and short stoploss lines you can see on the picture.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
//Zigo //Written in One-Note 26/11/2014 (10:07) //Published in PRT 8/01/2021 //Calculation the Stop losse Long and Short c1=(highest[9](high)+lowest[9](low))/2 C2= (highest[26](high)+lowest[26](low))/2 c3=(c1+c2)/2 //Dynamic for Long positionsx //Dynamic stop for Short positions stlong=TriangularAverage[5](c3- 0.89*AverageTrueRange[14](close)) stshort=TriangularAverage[5](c3+0.89*AverageTrueRange[14](close)) Return stLong coloured(0,255,0) as"StopLong", Stshort coloured(255,0,0) as "StopShort" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Depending the timeframe, a variable could be built in as factor (f) to varies the weight of the ATR. Replace 0.89 in the code at line 12 and 13 to (f).
Thank you very much for sharing great job !!!!
Dear Zigo please can you help me ? it must be easy for you … I need to plot a mid line between these 2 lines …For example if the red line is at 1300 and the green line is at 1250 then the mid line = (1300+1250)/2=1275 The mid line should be very thick and different color
So PLEASE can you tell me what line should i add to your code ? Many Thanks
Best Regards
Dimitris ( from Greece )
Zou je graag helpen, maar mijn computer is in onderhoud. Einde deze week, kan ik hopelijk terug werken!
@ DimKar
Midline = (stlong + stshort)/2
Return stLong coloured(0,255,0) as”StopLong”, Midline coloured (100,255,255,175)style (line ) as ” MeanLine”, Stshort coloured(255,0,0) as “StopShort”
Dear Zigo thank you very much for your answer !!!