OPEN-SOURCE SCRIPT

Trend Pinbar PT49 by Cuancuan

Updated
Idea Behind:
Buying the short-term trend that shows a pin-bar candlestick pattern. Meant to be traded on a daily chart / higher timeframe.

To determine the short-term trend we use short EMA such as 8-16-30 and check the slope of each one, and definitely, the shorter one must be above the longer one for an uptrend. Vice versa for a downtrend.

To determine a pin-bar candlestick, I calculate that the body size (open to close) is at maximum a-third of the candle size (high to low). Besides that, I ensure that the close of the candle is above the shortest MA for bullish and below it for bearish.

As extra filters to reduce trade numbers:
1. Longer MA Filter = You can turn it off if you think the higher timeframe filter is unnecessary.
2. Slope Filter = To ensure the slope of the shorter MA is steeper rather than the mid-MA.
3. Size Filter = To check whether the overall candle size (high to low) is bigger than the ATR number. When the size filter is turned on, it removes small insignificant candles.

PS: Don't trade anything live unless you find it comfortable after backtesting it by yourself.
Release Notes
Idea Behind:
Buying the short-term trend that shows a pin-bar candlestick pattern. It is meant to be traded on a daily chart / higher timeframe.

To determine the short-term trend, we use short EMA such as 8-16-30 and check the slope of each one, and definitely, the shorter one must be above the longer one for an uptrend. Vice versa for a downtrend.

To determine a pin-bar candlestick, I calculate that the body size (open to close) is at maximum a-third of the candle size (high to low). Besides that, I ensure that the close of the candle is above the shortest MA for bullish and below it for bearish.

As extra filters to reduce trade numbers:
1. Longer MA Filter = You can turn it off if you think the higher timeframe filter is unnecessary.
2. Slope Filter = To ensure the shorter MA slope is steeper than the mid-MA.
3. Size Filter = To check whether the overall candle size (high to low) is bigger than the ATR number. When the size filter is turned on, it removes small insignificant candles.

Latest Update 14-Nov:
Based on my suggestion, I created an extra filter to check whether the body size is located in the upper one-third of the candle size for a long. Vice versa, for short.

PS: Don't trade anything live unless you find it comfortable after backtesting it by yourself.
Release Notes
Apologize I need to update the chart , since I don't know how to edit the chart illustration without doing an update script
Release Notes
Update illustration image.
Candlestick AnalysisCandlestick analysisExponential Moving Average (EMA)Hanging ManInverted HammerPin BarShooting Star

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer