Aggregate of x bars
Created at 09 Nov 2015, 21:59
Aggregate of x bars
09 Nov 2015, 21:59
I need to calculate aggregate values on candle heights for the last x periods.
How to do that with:
a) Functions.Sum()
b) for loop ?
Thanks
Spotware
10 Nov 2015, 15:40
Dear Trader,
You can sum up the values of the bars using several approaches. One approach is to write a for loop which will decrease the number of periods and by using the Last method you can retrieve the values you want. Then, you could sum up these values in a variable.
@Spotware