This gives bullish / bearish sentiment by looking at wick length vs body size. Potential pivots are indicated with green or red dots.
I got tired of looking at candles and wondering if they should be telling me something. This is not perhaps the clearest indicator and should not be used in isolation, but the turning points can be good indications that something is about to happen.
Happy Trading!
Code:
# Experiment # 3
# Candle Wick Sentiment Indicator
# Seth Urion
# November 2019
declare lower;
input reversal = 33;
input trend_length = 5;
def total = high - low;
def upper_candle = high - Max(open, close);
def lower_candle = Min(open, close) - low;
def trend_mult = if close >= open then 1 else -1;
plot zero = 0;
zero.SetLineWeight(1);
zero.AssignValueColor(Color.WHITE);
zero.SetStyle(Curve.MEDIUM_DASH);
def Upper_Sentiment = if total != 0 then 100 - ((upper_candle / total) * 100) else 0;
def Lower_Sentiment = if total != 0 then -100 + (( lower_candle / total) * 100) else 0;
plot Trend = ExpAverage(Upper_Sentiment + Lower_Sentiment, length = trend_length);
Trend.SetLineWeight(3);
Trend.AssignValueColor(Color.WHITE);
plot UpperWickReversal = if Upper_Sentiment <= reversal and Upper_Sentiment != 0 then Upper_Sentiment else Double.NaN;
UpperWickReversal.SetPaintingStrategy(PaintingStrategy.POINTS);
UpperWickReversal.SetLineWeight(4);
UpperWickReversal.AssignValueColor(Color.RED);
plot LowerWickReversal = if Lower_Sentiment >= -reversal and Lower_Sentiment != 0 then Lower_Sentiment else Double.NaN;
LowerWickReversal.SetPaintingStrategy(PaintingStrategy.POINTS);
LowerWickReversal.SetLineWeight(4);
LowerWickReversal.AssignValueColor(Color.Green);
I got tired of looking at candles and wondering if they should be telling me something. This is not perhaps the clearest indicator and should not be used in isolation, but the turning points can be good indications that something is about to happen.
Happy Trading!