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 , so we can evaluate those pin bars are strong or weak.
is a popular price action trading strategy.
It is based on quick price rejection.
Most of existing scripts only determine if a bar is a 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 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 , price range and trend strength, which can help us to determine where are worthy for us to open trades.
: current low is lower than ( previous high or current open ) and current close.
gravestone : current high is higher than ( previous low or current open ) and current close.
and harami : ( current low or previous low ) is lower than ( previous 2nd high or previous open ) and current close.
and harami : ( current high or previous high ) is higher than ( previous 2nd low or previous open ) and current close.
Smoothing : the type of computing average.
Length of ATR : determines the number of true ranges for computing .
ATR multiplier line : the threshould that a is strong enough. For example, if this value is 0.5, it means a with 0.5*atr or more is considered a strong .
one direction : set to 1 if you want the strength of pin bars and pin bars are cancelled. Set to 0 if you want to keep both strength of pin bars and pin bars; in this case, you may need to change the plot style to make both strength visible.
Evaluate the strength of trend against pin bars. After all, a single reverse 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.
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 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.
Most of related knowledge can be searched from the internet.
I cannot say the exact references because they may violate the rules of Tradingview.