Slow stochastic calculation!

 

Does anyone here know how to calculate slow stochastic in MT4?

I have no problem using date (i.e. high, low & close) showed in MT4 to calculate fast stochastic and the result is the same as shown in MT4. However, I can't do the same thing for slow stochastic.

I searched lots of websites regarding slow stochastic and the help page in MT4, using many methods provided by them and I still can't get the same figures as shown in MT4. Some websites tell that %D of fast stochastic is the %k of slow stochastic but it is incorrect in MT4. What I can confirm is %k of fast stochastic in MT4 is RSV, %d of fast stochastic is 3 bars simple moving average of %k of fast stochastic.

As I am new to MT4, although someone suggest me to check Meta Editor but I don't know what those programme language means for stochastic in it.

If anyone who know how to calculate slow stochastic in MT4, please help me!

 
wing :

Does anyone here know how to calculate slow stochastic in MT4?

I have no problem using date (i.e. high, low & close) showed in MT4 to calculate fast stochastic and the result is the same as shown in MT4. However, I can't do the same thing for slow stochastic.

I searched lots of websites regarding slow stochastic and the help page in MT4, using many methods provided by them and I still can't get the same figures as shown in MT4. Some websites tell that %D of fast stochastic is the %k of slow stochastic but it is incorrect in MT4. What I can confirm is %k of fast stochastic in MT4 is RSV, %d of fast stochastic is 3 bars simple moving average of %k of fast stochastic.

As I am new to MT4, although someone suggest me to check Meta Editor but I don't know what those programme language means for stochastic in it.

If anyone who know how to calculate slow stochastic in MT4, please help me!

Straight out of Meta Editor - have you tried this in a custom indicator?

double iStochastic( string symbol, int timeframe, int %Kperiod, int %Dperiod, int slowing, int method, int price_field, int mode, int shift)
Calculates the Stochastic oscillator and returns its value.

Parameters:

symbol - Symbol the data of which should be used to calculate indicator. NULL means the current symbol.
timeframe - Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.
%Kperiod - %K line period.
%Dperiod - %D line period.
slowing - Slowing value.
method - MA method. It can be any ofMoving Average method enumeration value.
price_field - Price field parameter. Can be one of this values: 0 - Low/High or 1 - Close/Close.
mode - Indicator line index. It can be any of the Indicators line identifiers enumeration value.
shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:
  if(iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,0)>iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,0))
    return(0);
 

CrispinScruby,

Thanks for your reply.

I have tried seeking the answer from Meta Editor but I can't understand what those programme language means.

Therefore, it would be much appreciate if you or anybody can simply show me the formula of calculation of slow %k in MT4 like:

"%K = (CLOSE-LOW(%K))/(HIGH(%K)-LOW(%K))*100"

Any way, thanks again for your help.

Wing

 

The slow stochastic is a smoothed %K.

https://www.mql5.com/en/code/7792