In Thinkorswim, I wrote the script like:
input length = 50;
def AverageCandle = Average(Candlesize, length);
The script will calculate an average Candlesize in a 50 bars look back period from current bar. And then I can use AverageCandle to compare with the current Candle size.
How can I do that in Ninjas? I can not find a function like "Candlesize" in Ninjas and do not know how to write it.
Any help will be greatly appreciated.
Comment