OPEN-SOURCE SCRIPT
Popgun Bar Pattern

I created this script to research the trading effectiveness of the Popgun Bar Pattern.
The Popgun Bar Pattern is found when 3 candlesticks in order form the following pattern:
0. Any bar that is then followed by:
1. An inside bar. This is a bar that is completely engulfed by the bar before it. It will have a lower high and a higher low than the previous bar.
2. An outside bar immediately after. This is a bar that completely engulfs the prior inside bar. It will have a higher high and a lower low than the previous bar.
Simply put, the Popgun Bar Pattern is an inside bar followed by an outside bar.
I would highly recommend incorporating this signal as a "trigger" for existing technical analysis. Used in isolation it may not have a high probability of success.
To make it more effective as a trigger to a trading signal I incorporated into my code an Entry, Stop, and a Target dot.
There is an additional alert condition which can be configured at the end of the script.
The Popgun Bar Pattern is found when 3 candlesticks in order form the following pattern:
0. Any bar that is then followed by:
1. An inside bar. This is a bar that is completely engulfed by the bar before it. It will have a lower high and a higher low than the previous bar.
2. An outside bar immediately after. This is a bar that completely engulfs the prior inside bar. It will have a higher high and a lower low than the previous bar.
Simply put, the Popgun Bar Pattern is an inside bar followed by an outside bar.
I would highly recommend incorporating this signal as a "trigger" for existing technical analysis. Used in isolation it may not have a high probability of success.
To make it more effective as a trigger to a trading signal I incorporated into my code an Entry, Stop, and a Target dot.
- The Entry dot is offset from the low of a bearish Popgun Bar Pattern or the high of a bullish Popgun Bar Pattern by a factor of ATR. The default ATR percentage is 33% but can be adjusted.
- The Stop dot is based on the recent highest high (bearish) or lowest low (bullish) of a set range (default is 9 bars) plus/minus the ATR percentage buffer.
- The Target dot is automatically calculated from the entry based on a configurable reward factor (default is 3) from the entry to stop distance. This projects a potential 3:1 reward/risk trade by default.
There is an additional alert condition which can be configured at the end of the script.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
"Be to others the person you needed to meet 10 years ago"
Discord Trading Community: discord.gg/eDfhKvS5AC
Youtube: youtube.com/c/NoroksNotepad
Twitter: twitter.com/noroktrade
Discord Trading Community: discord.gg/eDfhKvS5AC
Youtube: youtube.com/c/NoroksNotepad
Twitter: twitter.com/noroktrade
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
"Be to others the person you needed to meet 10 years ago"
Discord Trading Community: discord.gg/eDfhKvS5AC
Youtube: youtube.com/c/NoroksNotepad
Twitter: twitter.com/noroktrade
Discord Trading Community: discord.gg/eDfhKvS5AC
Youtube: youtube.com/c/NoroksNotepad
Twitter: twitter.com/noroktrade
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.