A detector for the indicator “ATR Worm“.
- GREEN = confirmation of pattern ;
- RED = level of breakout reached.
This indicator allows me to define the moment to open a trade.
As well as a safe distance to the next peaks / troughs (that distance not being respected, the considered trade won’t be taken).
With 2 scenarios :
- Pattern validation with the next candlestick (e.g. a pinbar after a trend correction + validation by continuation of the movement with the next candlestick) ;
- Horizontal breakout.
In the case of the first scenario, I take the trade on the blue spot ;
In the case of the second one, I take the trade on the red spot ;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
// General parameters Pips = 0.5 monATR=AverageTrueRange[14](close) monATR2=(AverageTrueRange[14](close)) * 2 // Results display IF Close > Close[1] AND Close >= Low-Pips*pipsize+monatr THEN result = 2 ELSIF Close < Close[1] AND Close <= High+Pips*pipsize-monatr THEN result = -2 ELSIF Close > Close[1] AND Close >= Low[1]-Pips*pipsize+monatr THEN result = 1 ELSIF Close < Close[1] AND Close <= High[1]+Pips*pipsize-monatr THEN result = -1 ELSE result = 0 ENDIF // Colours display IF result = 1 THEN r = 127 g = 255 b = 0 ELSIF result = 2 THEN r = 255 g = 0 b = 0 ELSIF result = -1 THEN r = 127 g = 255 b = 0 ELSIF result = -2 THEN r = 255 g = 0 b = 0 ELSE r = 255 g = 255 b = 255 ENDIF // 0 Line DRAWHLINE (0) COLOURED ("grey") STYLE (line,1) RETURN result COLOURED (r,g,b) STYLE (histogram) |
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 :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials