Hello all, I've lurked for quite some and have found the forums very enlightening, but have only just joined.
I am not good at coding, in fact I'm very poor. I want to make an indicator that colors bar forming a pattern of mother candle > inside candle > candle up/down. The final candle has to close higher or lower than the body of the mother candle but I don't care about the wicks whatsoever.
The only criteria for the inside candle is that its closing price is inside the body of the mother candle. I do not require the entire body inside like a Harami, and I do not care about the wicks of any candle - only the body. Then I want to color all the bars in the formation.
Ideally I would like to be able to include more than 1 consecutive inside candle (a minimum of 1 up to a max of n), and I want to be able to scan for this pattern. Below is the code I have:
I am stuck on coloring the bars of the pattern because SetPaintingStrategy does not color the bars themselves and AssignPriceColor gives me an error when I try to use it. I'm also stuck on how I would include multiple inside bars in the pattern.
Any help is appreciated!
I am not good at coding, in fact I'm very poor. I want to make an indicator that colors bar forming a pattern of mother candle > inside candle > candle up/down. The final candle has to close higher or lower than the body of the mother candle but I don't care about the wicks whatsoever.
The only criteria for the inside candle is that its closing price is inside the body of the mother candle. I do not require the entire body inside like a Harami, and I do not care about the wicks of any candle - only the body. Then I want to color all the bars in the formation.
Ideally I would like to be able to include more than 1 consecutive inside candle (a minimum of 1 up to a max of n), and I want to be able to scan for this pattern. Below is the code I have:
Code:
def Initial = BodyHeight();
def Inside = close < close[1] && close > open[1] ;
def IsUp = close > open && close > close[2];
plot PatternPlot =
Initial[2] and
Inside[1] and
IsUp[0];
PatternPlot.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
PatternPlot.SetDefaultColor(GetColor(0));
I am stuck on coloring the bars of the pattern because SetPaintingStrategy does not color the bars themselves and AssignPriceColor gives me an error when I try to use it. I'm also stuck on how I would include multiple inside bars in the pattern.
Any help is appreciated!