MODE_MAIN in mql5

 

I'm very new to MQL5. I am trying to migrate an indicator to mql5 from mql4. While using iStochastic I'm getting following errors.

Error:

'MODE_MAIN' - undeclared identifier    BFS_Stoc.mq5    107    87

'iStochastic' - wrong parameters count    BFS_Stoc.mq5    107    17

fastMAnow=iStochastic(NULL, 0, KPeriod, DPeriod, Slowing,MA_Method, PriceField, MODE_MAIN, i);

1. How to mention the shift?

2. What is the alternate for MODE_MAIN and for MODE_SIGNAL in mql5.

I have so many errors. If anyone helps me means it will be very useful for me.

Thanks in advance.

 
krishna_gopal_2:

I'm very new to MQL5. I am trying to migrate an indicator to mql5 from mql4. While using iStochastic I'm getting following errors.

Error:

'MODE_MAIN' - undeclared identifier    BFS_Stoc.mq5    107    87

'iStochastic' - wrong parameters count    BFS_Stoc.mq5    107    17

1. How to mention the shift?

2. What is the alternate for MODE_MAIN and for MODE_SIGNAL in mql5.

I have so many errors. If anyone helps me means it will be very useful for me.

Thanks in advance.

Do you see the green link in your post ? Follow it and read the documentation. This article would be useful too.
 
angevoyageur:
Do you see the green link in your post ? Follow it and read the documentation. This article would be useful too.
I read it. But I couldn't find the explanation for MODE in iStochastic() too. Can you please give me direct answer? Thanks in advance.
 
krishna_gopal_2:
I read it. But I couldn't find the explanation for MODE in iStochastic() too. Can you please give me direct answer? Thanks in advance.
You have to read better, all is there, including explanation of MODE for stochastic. The MODE isn't use with iStochastic() but when you use CopyBuffer().
Documentation on MQL5: Timeseries and Indicators Access / CopyBuffer
Documentation on MQL5: Timeseries and Indicators Access / CopyBuffer
  • www.mql5.com
Timeseries and Indicators Access / CopyBuffer - Documentation on MQL5