TradingView
clocks156t174
15 ตุลา 2020 เวลา 12 นาฬิกา 49 นาที

quantized pin bar indicator with ATR 

Euro Fx/U.S. DollarFXCM

คำอธิบาย

Abstract
This script computes the strength of pin bars.
This script uses the corrent and the previous two bars to compute the strength of pin bars.
The strength of pin bars can be also comared with average true range, so we can evaluate those pin bars are strong or weak.

Introduction
Pin bar is a popular price action trading strategy.
It is based on quick price rejection.
Most of existing pin bar scripts only determine if a bar is a pin bar or not.
However, evaluating the strength of pin bars is important.
If price rejection is too weak, it is difficult to trigger trend reversal.
If a pin bar is too strong, we may enter the trade too late and cannot have good profit.
In this script, it provides a method to compute to strength of pin bars.
After the strength of pin bars are quantized, they can compare with average true range, price range and trend strength, which can help us to determine where are worthy for us to open trades.

Computation
Bullish hammer : current low is lower than ( previous high or current open ) and current close.
Bearish gravestone : current high is higher than ( previous low or current open ) and current close.
Bullish engulfing and harami : ( current low or previous low ) is lower than ( previous 2nd high or previous open ) and current close.
Bearish engulfing and harami : ( current high or previous high ) is higher than ( previous 2nd low or previous open ) and current close.

Parameters
Smoothing : the type of computing average.
Length of ATR : determines the number of true ranges for computing average true range.
ATR multiplier line : the threshould that a pin bar is strong enough. For example, if this value is 0.5, it means a pin bar with 0.5*atr or more is considered a strong pin bar.
one direction pinbar : set to 1 if you want the strength of bullish pin bars and bearish pin bars are cancelled. Set to 0 if you want to keep both strength of bullish pin bars and bearish pin bars; in this case, you may need to change the plot style to make both strength visible.

Trading Suggestions
Evaluate the strength of trend against pin bars. After all, a single reverse pin bar may be too weak to reverse the trend.
Timeframe : if atr is higher than 4*spread, the timeframe is high enough. However, if strong pin bars appear too frequent or price range is too small, going to higher fimeframe may be more safe.
Entry and exit : according to personal flavors.

Conclusion
The strength of pin bars can be quantized.
With this indicator, we can find more potential pin bars which human eyes and binary pattern detectors were leaked.
In my opinion, 0.5*atr is the most suitable streng of a pin bar for my trade entry but I still need to consider the direction of the trend.
You are welcome to share your settings and related trading strategy.

References
Most of related knowledge can be searched from the internet.
I cannot say the exact references because they may violate the rules of Tradingview.
ความคิดเห็น
mrflyly
This is Genius Bro.....you figured out something in my opinion that's priceless .... I have been trading for 5 years now and It took at least 3 to get over the hump of swing trading using the 4hour, then eventually down to the 30m, 5m and now I have been trading the 1 minute with amazing success and just the other day I figured out I should trade when I only only see 1 pattern and that pattern was a Pin bar....... So since I have created a zigzag with values that alerts me when prices is 200% more then the last 10 average swings ... most zigzag indicators are defaulted to 14,3,3 like what a lot of traders use for stochastics ..... So I am thinking .. this would be great to use on the 1 minute and set the atr to 1 instead of .5?
Eroodeet
@mrflyly, can you teach me your strategy?
เพิ่มเติม