Measuring the success of a Pop Gun pattern

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #147627 quote
    JohnScher
    Participant
    Veteran

     

    Like a time ago we designed a screener for Pop Gun patterns. For the sake of simplicity here is the screener for PG Long

     

    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

     

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

    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?

    Screenshot_a.png Screenshot_a.png Screenshot_b.png Screenshot_b.png
    #147647 quote
    robertogozzi
    Moderator
    Master

    Lines 10-13 should read (not tested):

    distance = range *d
    c = (Highest[p](high[1]) + distance) < High
    
    JohnScher thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Measuring the success of a Pop Gun pattern


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
JohnScher @johnscher Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
5 years, 5 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 10/17/2020
Status: Active
Attachments: 2 files
Logo Logo
Loading...