ATR Worm Glow (Detector)

Category: Indicators By: ChristosDG Created: September 28, 2023, 12:46 PM
September 28, 2023, 12:46 PM
Indicators
0 Comments

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 :

  1. Pattern validation with the next candlestick (e.g. a pinbar after a trend correction + validation by continuation of the movement with the next candlestick) ;
  2. 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 ;

// 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)

Download
Filename: ATR-Worm-Glow.itf
Downloads: 99
ChristosDG New
As an architect of digital worlds, my own description remains a mystery. Think of me as an undeclared variable, existing somewhere in the code.
Author’s Profile

Comments

Logo Logo
Loading...