Trigun1127
Member
I'm trying to get this code made by SleepyZ to draw an arrow when a red candles high (wick/tail) 2x,3x,4x bigger then its low at the minimum and the candle closing at a certain % near its low like 85%. Vice versa for green candles Close>Open with Low tail 2x bigger then the high and the candle closing at a certain percentage of the candle.
plot retracement_bull = if close > open and
close > low + (.50 * (high - low))
then 1 else 0;
retracement_bull.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
plot retracement_bear = if close < open and
close < high - (.50 * (high - low))
then 1 else 0;
retracement_bear.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
##Testing Bull Code
input testing = yes;
plot retrace_bull = if close > open
then low + (.50 * (high - low))
else Double.NaN;
retrace_bull.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
retrace_bull.SetDefaultColor(Color.WHITE);
retrace_bull.SetLineWeight(3);
retrace_bull.SetHiding(!testing);
##Testing Bear Code
plot retrace_bear = if close < open
then high - (.50 * (high - low))
else Double.NaN;
retrace_bear.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
retrace_bear.SetDefaultColor(Color.WHITE);
retrace_bear.SetLineWeight(3);
retrace_bear.SetHiding(!testing);
;
plot retracement_bull = if close > open and
close > low + (.50 * (high - low))
then 1 else 0;
retracement_bull.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
plot retracement_bear = if close < open and
close < high - (.50 * (high - low))
then 1 else 0;
retracement_bear.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
##Testing Bull Code
input testing = yes;
plot retrace_bull = if close > open
then low + (.50 * (high - low))
else Double.NaN;
retrace_bull.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
retrace_bull.SetDefaultColor(Color.WHITE);
retrace_bull.SetLineWeight(3);
retrace_bull.SetHiding(!testing);
##Testing Bear Code
plot retrace_bear = if close < open
then high - (.50 * (high - low))
else Double.NaN;
retrace_bear.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
retrace_bear.SetDefaultColor(Color.WHITE);
retrace_bear.SetLineWeight(3);
retrace_bear.SetHiding(!testing);
;
Last edited: