PopGun Indicator

v10.3
PopGun Indicator

Jeffrey Kennedy from Elliot Wave International shared the PopGun Bar Pattern. He meant it as a way to find impulse waves for Elliot wave  traders.

To trade the Popgun bar pattern, you must know what is an inside bar and an outside bar. (see attached screenshot)

An insidebar  is one that is completely engulfed by the bar before it. It represents a contraction in range and a pause in directional trading activity.

An outside bar is one that completely engulfs the bar before it. It shows strength in both directions. Depending on the context, it is a sign of strength or a precursor to erratic movements.

The Popgun bar pattern consists of an inside bar followed by an outside bar.

Trading Rules – Popgun Bar Pattern

Long Trading Setup

  1. An inside bar
  2. An outside bar that closed higher than it opened
  3. Buy on close of outside bar

Short Trading Setup

  1. An inside bar
  2. An outside bar that closed lower than it opened
  3. Sell on close of outside bar

(In my opinion, if you want you can also trade the just direct reversal of the second outside. Maybe take profit with first close after second outside.)

In this way you have to go long direct after a red candle and you have to go direct short on green candle. Possible to close the trade with close of reversal candle.)

until then

JohnScher

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. JohnScher • 06/25/2018 #

    It seems a little mistake has crept in.
    Here is the code in plain text.

    // PopGun Indikator
    // coded by JohnScher

    //for the graphics
    PIP = 10*pipsize
    LIN = 3

    //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]High[1] and Lowopen // greencandle = long , as rerversal short
    PGShort = PG and Close= tstart and time <= tend then

    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=0
    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

    If you have any problems, please feel freee to contact me again.

  2. Carlos Garcia • 06/25/2018 #

    Doesn´t work on PRT V10.3

  3. Alai-n • 06/25/2018 #

    Hello … Error Syntax Line 14

  4. JohnScher • 06/25/2018 #
  5. JohnScher • 06/25/2018 #

    // PopGun Indikator
    // coded by JohnScher
    // without timewindow, working on prt10.3
    //for the graphics
    PIP = 10*pipsize
    LIN = 5

    //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]High[1] and Lowopen // 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 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
    rL=250
    gL=0
    bL=0
    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

    return

  6. Alai-n • 06/25/2018 #

    Re … Error syntax line 14 (Low [2] (<) High [1]) I guess. And how to define lowopen and pglong ???

    • JohnScher • 06/25/2018 #

      //indicator PopGun
      PG = High[2]>High[1] and Low[2]High[1] and LowHigh[1] and Low[2]High[1] and Lowopen // 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 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
      rL=250
      gL=0
      bL=0
      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

      return

  7. JohnScher • 06/25/2018 #

    @nicolas

    Here are some problems with the code.
    Can you put in the correct code as attached?

    // PopGun Indikator
    // coded by JohnScher

    //for the graphics
    PIP = 10*pipsize
    LIN = 5

    //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 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
    rL=250
    gL=0
    bL=0
    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

    return

    • Nicolas • 06/25/2018 #

      Hi, please send it to contact[at]prorealcode.com . Many thanks.

  8. JohnScher • 06/25/2018 #

    @nicolas
    done, in this moment

  9. JohnScher • 06/25/2018 #

    After a small error crept in, a correct itf.file has been uploaded.

  10. dougie80 • 06/25/2018 #

    Great Indicator, Is there a way to use this as an alert ?

    • JohnScher • 06/25/2018 #

      I created the screener with some help here from PRT. It is surely somewhere in one of the forum posts.On the start page of the ProRealcode-website there is a search function. In the library it is not to be found.
      Helpful are the PopGuns the higher the time unit is. In stocks best daily and higher up.

avatar
Register or

Likes

avatar avatar avatar avatar
Related users ' posts
Vonasi Thanks for your thanks Real Pro and yes everyone should import the itf file to make sure tha...
Pepsmile Good job, which could be applied for a spectrum of another indicators.
Pepsmile As to better understand which parameters are better for an indicators in a specific period (...
Bard I was talking to a Machine Learning coder today who's algos have apparently managed to get 7...
FULVIO09 Attualmente non c'è sufficiente volatilità : la condizione "C0 = AverageTrueRange[1500](Clos...
vlongobardo67 Ma io intendevo in backtest ! Scusa non l’ho menzionato.
ciniselloftse salve fulvio .il trading sistem e sempre profittevole?
Bard Hi Violet, Thanks so much for making this screener. Bulkowski's work is thorough. I though...
Gregg Hi all, is there anyone who is using this pattern? It's been 3 days I'm trying it and I'm ...
Violet Hi Gregg, TP and SL? There are no variables by those names. The signal appears/disapp...
Marcus Quartus Aurius Thanks great job !
tommygtb what does the criteria mean in the box on the screen is it the time frame the screener sear...
Saberi2023 Hello dear Can you please write it also in java script?
Diamant Bonjour Léo, est t'il possible d'avoir le code de l'indicateur ton Double haut et double fo...
parthapersonal Great job Leo. Dear Zen83, how do you, "return them into the very last line"?
steve_ Hi! This thread is quite old, but let’s try… I’m new with Prorealcode and I’ve just di...
steve_ Hi! I've created a topic in french (translatable with Google function) here : https://www.p...
777dks hi this doesnot seem to work on forex, any ideas? thanks.
4example excellent, thank you
avatar
Anonymous Found: just remove "T coloured(r,g,b) as "Top", Bo coloured(r,g,b) as "Bottom"... after return
darbes Hi I tried to use indicator in a strategy code. But backtesting is asking to define Signalb...
getset Hello, I like this indicator, it's small and very nice to use. So i changed the code a littl...
avatar
Anonymous Thanks for sharing! On the other hand can we remove the vertical gray lines?
ShaunG Appreciated! Thanks 100%
tonbijl good afternoon when i enter the code i get an error message Syntax error
rispardin no entiendo como funciana este indicador, por favor alguien podria explicar como utilizarlo???
AVT No se trata de un solo indicador, pero cada linea muestra otra información, de abajo hacia ...
IV Mcm Your indicator is interesting, I evaluated its relevance with the squeeze to detect the phas...
dzim0032 J'avais oublié de mettre un commentaire pour la vente du scalper dont les règles sont justes...
andreag76 Thank you Francesco78 !
juanj What happened after August 21?
jpgcreatestrading Hi Manel, i have found this same issue, some strategies (but not all) that are written with ...
Nicolas Sorry but we do not provide any help for mt4 users. Our website is dedicated to ProRealTime ...
rginvest44 Bonjour Messieurs et félicitations pour votre travail. De mon coté, lorsque je souhaite e...
Nicolas Bonjour, il s'agit d'un code d'indicateur et non d'un screener. Cet autre code par exemple e...
Elsborgtrading By adding the inside bar breakout failure candle, which is the next bar after the inside bar...
DegoodBoby very nice indicator but pls how can we use the indicator without the text (inside bar/brea...
ShaunG Hi Elsborgtrading thanks for this indicator. I was initially looking for a "IDnr4" which I c...
Maxime Leleux Nice screener but the 2 candelsticks around the doji should be long sticks (red and green). ...
Nicolas EDIT: identifying pattern number in the ProScreener window: https://www.prorealcode.com/to...
pyhrus Nicolas ,       Could you communicate to us the indicator you have used to draw patterns ...
Nicolas Description of falling/rising wedges: https://www.centralcharts.com/en/gm/1-learn/7-technica...
Wilko This code is the work of a simple genius! Profitability lies in simplicity and repetition.
Nicolas Good joke. FYI, you'll find many identified recurring patterns there: http://paststat.com G...
Yngve i added a MA as a filter, that improved the equity curve quit nice actually
Doctrading Hello,  The strategy should be improved, no doubt. But it was just one of my ideas, which h...
ALEALE Yes Nicolas is very difficult, macro economic data can destroy any work!!  
styrke depends which.. I personally think that it's much more easier to trade on XBTUSD, try to co...

Top