Code: Select all
inputs:
PriceValueArray[MaxSize]( numericarray ),
Size( numericsimple ) ;
variables:
var0( 0 ) ;
var0 = 0 ;
for Value1 = 1 to Size
begin
var0 = var0 + PriceValueArray[Value1] ;
end ;
SummationArray = var0 ;
An Array starts at „0“ and not at „1“.
You can clearly see the „for- command” for the index of the array starts at „1“ which results on an delay of all following calling code of this function to be delayed one bar.
I noticed this since the function AverageArray keept on having a bar delay compared to its counterpart Average.