Here the Code for the PopGun correctly.
The error is that for a PG you don’t have take the “Close” – but the “Low”.
That´s all.
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
|
// PopGun Indikator // Created by JohnScher PIP = 0.3*pipsize LIN = 3 Support = (High-Low)*0.5 Resistance = (High-Low)*0.5 r=0 g=0 b=0 //indicator PopGun PG = High[2]>High[1] and Low[2]<Low[1] and High>High[1] and Low<Low[1] IF PG Then DRAWARROWUP(barindex,LOW-PIP)coloured(r,g,b) DRAWSEGMENT(barindex,LOW-SUPPORT,barindex+LIN, LOW-SUPPORT )coloured(r,g,b) DRAWARROWDOWN(barindex,HIGH+PIP)coloured(r,g,b) DRAWSEGMENT(barindex,High+Resistance,barindex+LIN, High+Resistance )coloured(r,g,b) ENDIF return |