Strange division problem - page 2

 
Alain Verleyen:
Fixed. There was typos and wrong characters.

I think i know what the problem is.

Surely is the typo, which is the minus sign, and I have corrected it right at the beginning. 

The problem could be the fact that I don't have this code

void OnInit()
  {
   SetIndexBuffer(0,iVWAD,INDICATOR_DATA);
  }

Because I take the OnCalculate function and put it into my code and it gave me the error of not found in custom indicator

 
luckyvictor:

Hi All


I am coding the following, the code returns no error but doesn't seem to do the calculation. 

I tried to debug it by adding the following alert, it doesn't run. However, if I change the WVAD[] = Top or Bottom, it runs.

The code just doesn't do the division. Why?

Files:
iVWAD.mq5  3 kb
Reason: