porting of DTOSC indicator from MT4

 

Hello all,

 

I'm trying to port this indicator, It's my first attempt on MQL5,

I have attached here the original and my attempt, anyone can help me?

 it compiles but I get and out of range error. or, I don't know, it just doesn't work...

 

 

Thanks in advance,

Gal 

Documentation on MQL5: MQL5 programs / Runtime Errors
  • www.mql5.com
MQL5 programs / Runtime Errors - Documentation on MQL5
Files:
DTOSC.mq4  3 kb
DTOSC.mq5  8 kb
 

Done

 

Files:
DTOSC.mq5  8 kb
Reason: