Candle Wick Price Movement Rejection
A novel method for finding hidden support and resistanceIDEA
When a candle opens, moves a great deal either higher or lower, and then returns to near the original position, it leaves a signifigant 'wick'. That rejection of price movement forms the basis for this indicator.
while doji candles are obvious to the eye, the rejections this indicator attempts to capture are less so. They are obviously more important on longer timeframes, but are also interesting to observe on shorter timeframes as well. See illustrations below.
SETTINGS
The indicator has only a single setting. The required ratio of this candle wick to the wicks of the previous 5 candles. Ratios of 3 to 6 seem to be good places to start. If you find too many levels to be useful, increase the ratio. Conversely, if you find it not showing you much you didn't already know, decrease the ratio.
LINK
http://tos.mx/PPUP5fi
Eye Candy
I often try to annotate these, but will leave that for later.
Code:
#############################################
#
# CANDLE WICK PRICE MOVEMENT REJECTION
# Hidden Support and Resistance
#
# (c) Mashume 2022
#
# Released to the usethinkscript.com
# community under gpl 3
#
##############################################
declare upper;
input rejection_ratio = 5.0;
def range = high - low;
def body_top = max(open, close);
def body_bot = min(open, close);
def upper_wick = high - body_top;
def lower_wick = body_bot - low;
def upper_ratio = round(upper_wick / range * 100, 0);
def lower_ratio = round(lower_wick / range * 100, 0);
addLabel(yes, " LAST Upper Wick: " + upper_ratio[1] + " % vs " + average(upper_ratio[1], 5) + " ", color.dark_green);
addLabel(yes, " LAST Lower Wick: " + lower_ratio[1] + " % vs " + average(lower_ratio[1], 5) + " ", color.dark_red);
def upward_rejected = if upper_ratio[0] > rejection_ratio * average(upper_ratio[1], 5) then 1 else 0;
def downward_rejected = if lower_ratio[0] > rejection_ratio * average(lower_ratio[1], 5) then 1 else 0;
AddLabel(upward_rejected == 1, " Upward Rejection ", color.red);
AddLabel(downward_rejected == 1, " Downward Rejection ", color.green);
plot upward_rejection = if upward_rejected == 1 then high + 5 * tickSize() else double.nan;
upward_rejection.SetPaintingStrategy(PaintingStrategy.SQUARES);
upward_rejection.SetDefaultColor(color.red);
plot downward_rejection = if downward_rejected == 1 then low - 5 * tickSize() else double.nan;
downward_rejection.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
downward_rejection.SetDefaultColor(color.green);
def upper_rejection_top = if upward_rejected == 1 then max(close, open) else upper_rejection_top[1];
def upper_rejection_btm = if upward_rejected == 1 then high else upper_rejection_btm[1];
def down_rejection_top = if downward_rejected == 1 then min(open,close) else down_rejection_top[1];
def down_rejection_btm = if downward_rejected == 1 then low else down_rejection_btm[1];
plot urt = upper_rejection_top;
plot urb = upper_rejection_btm;
plot drt = down_rejection_top;
plot drb = down_rejection_btm;
urt.hide();
urb.hide();
drt.hide();
drb.hide();
DefineGlobalColor(name = "Resistance", color = Color.LIGHT_RED);
DefineGlobalColor(name = "Support", color = Color.LIGHT_GREEN);
AddCloud(urt, urb, GlobalColor(name = "Resistance"), GlobalColor(name = "Resistance"));
AddCloud(drt, drb, GlobalColor(name = "Support"), GlobalColor(name = "Support"));
As always, happy trading,
-mashume