Afshid Fateminazar / Publications
Forum
Array out of range error for not existing bars
Hi, I wrote a code to calculate the sum of past bar bodies. But in some charts, there is no bar in specific time, like silver/usd. I attached the chart. This is the function I get the error in: double AvBarSize ( int BarAmount) { double SumBar= 0 ; double ABSize; int i; for (i= 3 ;i<BarAmount;i++)