RobertPayne
Member
You will need to use a
Here's an example.
fold
loop in thinkScript. More information on this function is available here: https://tlc.thinkorswim.com/center/reference/thinkScript/Reserved-Words/fold.htmlHere's an example.
Ruby:
input length = 60;
def countHighTouches = fold i = 0 to length with internalSum = 0 do if GetValue(high, i) == high then internalSum + 1 else internalSum;
plot arrowUp = counthightouches == 3;
arrowup.setpaintingStrategy(paintingStrategy.BOOLEAN_ARROW_UP);
arrowup.setdefaultColor(color.magenta);
arrowup.setlineWeight(3);