// PopGun Indikator
// coded by JohnScher
//for the graphics
PIP = 10*pipsize
LIN = 3
//percentrenage = Support or Resistance in Percent og the Range High-Low = 25% default
Support = (High-Low)*percentrange/100
Resistance = (High-Low)*percentrange/100
//indicator PopGun
PG = High[2]>High[1] and Low[2]<Low[1] and High>High[1] and Low<Low[1]
// the second outside candle
PGLong = PG and Close>open // greencandle = long , as rerversal short
PGShort = PG and Close<Open //redcandle = short, as reversal long
IF PGLong Then
rL=0
gL=0
bL=250
DRAWARROWUP(barindex,LOW-PIP)coloured(rL,gL,bL)
DRAWSEGMENT(barindex,LOW-SUPPORT,barindex+LIN, LOW-SUPPORT )coloured(rL,gL,bL)
// to trade as reversal red candle = Long
rL=250
gL=0
bL=250
DRAWARROWDOWN(barindex,HIGH+PIP)coloured(rs,gs,bs)
DRAWSEGMENT(barindex,High+Resistance,barindex+LIN, High+Resistance )coloured(rs,gs,bs)
Endif
IF PGShort then
rS=250
gS=0
bS=00
DRAWARROWDOWN(barindex,HIGH+PIP)coloured(rs,gs,bs)
DRAWSEGMENT(barindex,High+Resistance,barindex+LIN, High+Resistance )coloured(rs,gs,bs)
// to trade as reversal red candle = Long
rL=0
gL=0
bL=250
DRAWARROWUP(barindex,LOW-PIP)coloured(rL,gL,bL)
DRAWSEGMENT(barindex,LOW-SUPPORT,barindex+LIN, LOW-SUPPORT )coloured(rL,gL,bL)
ENDIF
return