Measuring the success of a Pop Gun pattern
- This topic has 1 reply, 2 voices, and was last updated 4 years ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
Forums › ProRealTime English forum › ProScreener support › Measuring the success of a Pop Gun pattern
Like a time ago we designed a screener for Pop Gun patterns. For the sake of simplicity here is the screener for PG Long
1 2 3 4 5 6 7 8 9 10 11 12 13 |
PG = High[2]>High[1] and Low[2]<Low[1] and High>High[1] and Low<Low[1] PGLong = PG and close>open x = 0 IF PGLong Then x = 1 Endif SCREENER[x](x as "PG Long") |
and the indicator
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 51 52 53 54 55 56 57 58 59 60 |
// PopGun Indikator // coded by JohnScher //for the graphics PIP = 10*pipsize LIN = 6 //percentrange = Support or Resistance in Percent og the Range High-Low = 25% default //percentrange = 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 // timewindow to show the popgun // tstart = 080000 fefautl // tend = 220000 //IF time >= tstart and time <= tend then IF PGLong Then rL=250 gL=0 bL=0 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 rs=0 gs=0 bs=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=0 gS=0 bS=250 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=250 gL=0 bL=0 DRAWARROWUP(barindex,LOW-PIP)coloured(rL,gL,bL) DRAWSEGMENT(barindex,LOW-SUPPORT,barindex+LIN, LOW-SUPPORT )coloured(rL,gL,bL) ENDIF //ENDIF return |
To check the result see: See at ScreenShot_a
…………….
My question is:
Does the following code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
p = 5 PG = High[p+2]>High[p+1] and Low[p+2]<Low[p+1] and High [p]>High[p+1] and Low [p]<Low[p+1] PGLong = PG and Close>open d = 0.25 // distance 0.1 0.25 0.5 0.75 ... distance = (High [p] - Low [p]) *d q = p-1 c = Highest [q] (high) < (High [p] + distance) x = 0 IF PGLong and c Then x = 1 Endif SCREENER[x](x as "PG") |
screen all (long) PopGuns of the last 5 weeks that broke out above the high of the trigger candle and exceeded 25% of the range high-low of the trigger candle?
In use of the screener PG Long5 please see at ScreenShot_b
And if not, how would it be to program correctly?
Lines 10-13 should read (not tested):
1 2 |
distance = range *d c = (Highest[p](high[1]) + distance) < High |