Good day, I can't seem to find what I'm looking for on the forum or in the scripting documentation. I would like to calculate the following looking back 50 bars for the lowest value which would then be the scan pass/fail: MA(VOLUME(),BARS=50, CALC=CLOSE,0) * MA(BARS=50, CALC=Close) > number

I suppose I need a LOOKBACK function which does the calculation for each of the 50 bars but can't seem to find the function I need. Hope someone can help.

Thank you Mathew I appreciate your time. I have attached a copy of a charted version of the formula which is a plot of the 50barMA Vol * 50bar MA Close. On the chart I have marked the lowest value date of that calculation.

What I would like to do is scan for stocks looking back 50 bars from today with a lowest low value (of that calculation) not less than or greater than (number).