Cribbage
Member
Anyone know a way to displace the arrow that a study prints on a chart when the study's conditions are met? Have it pop up on the candle before the candle that makes the study conditions true?
I tried using the EMA displacement code but couldn't find a way to make it work so I took it out.
I want the wedge to appear under candle [1].
I tried using the EMA displacement code but couldn't find a way to make it work so I took it out.
Code:
def IsUp = close > open;
def IsDown = close < open;
def IsDoji = IsDoji();
def avgRange = 0.05 * Average(high - low, 20);
plot PatternPlot =
IsUp[2] and
IsDown[1] and
IsUp[0] and
low[1] < low[0] and
low[1] is equal to Lowest(low[1], 2);
PatternPlot.SetPaintingStrategy(PaintingStrategy.BOOLEAN_WEDGE_DOWN);
PatternPlot.SetDefaultColor(GetColor(5));
I want the wedge to appear under candle [1].
Last edited: