I need to use some kind of single.dimensional array, such as a normal Dataseries variable, which could be able to store a past calculation cumulative value for future use in coming OnBarUpdate. Let me explain by a simple example:
Let's suppose a simple variable "pvar1" (double) for price variations. With every OnBarUpdate, there will be a new value for this "pvar1". Imagine that I want to accumulate every single variation in one position in a single-array, as following:
pvar1=Close[0]-Close[1]; if ( pvar1 != 0.0 ) { for (int x = 1; x <= 1; x++) { acu[x]=acu[x]+pvar1; Print(acu[x].ToString());; } }
Thanks
Comment