Greetings! I'd like to have the TOS scan for doji candle that returns results from x bars back. For example, I'd like to see the dojis that printed 2 bars back.
How would the stock script from TOS below look to include this look back function? Thank you for your help.
How would the stock script from TOS below look to include this look back function? Thank you for your help.
Code:
input length = 20;
input bodyFactor = 0.05;
assert(bodyFactor >= 0, "'body factor' must not be negative: " + bodyFactor);
plot Doji = IsDoji(length, bodyFactor);
Doji.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
Doji.SetDefaultColor(CreateColor(153, 153, 255));
Doji.SetLineWeight(3);
Last edited by a moderator: