Stochastic formula?

 

I have this

%K = (C−L14/H14−L14) × 100

%D = (Sum of last 3 %K) / 3

Where:
C = The most recent closing price
L14 = The lowest price traded of the 14 previous trading sessions
H14 = The highest price traded during the same 14-day period
%K = The current value of the stochastic indicator

but I see that in MT5 using additional parameter "Slowing" that change result, but I can't find formula with this parameter ... Maybe anybody know or maybe I can see it in the program sources?

 

It is what I found in documentation here:
MQL5 Reference - Technical Indicators - iStochastic 

int  iStochastic(
   string           symbol,          // symbol name
   ENUM_TIMEFRAMES  period,          // period
   int              Kperiod,         // K-period (number of bars for calculations)
   int              Dperiod,         // D-period (period of first smoothing)
   int              slowing,         // final smoothing
   ENUM_MA_METHOD   ma_method,       // type of smoothing
   ENUM_STO_PRICE   price_field      // stochastic calculation method
   );
.. and more on this page (with explanation and example).
MQL5 Reference - How to use algorithmic/automated trading language for MetaTrader 5
MQL5 Reference - How to use algorithmic/automated trading language for MetaTrader 5
  • www.mql5.com
MQL5 Reference - How to use algorithmic/automated trading language for MetaTrader 5
 
sergey087:I have this
%K = (C−L14/H14−L14) × 100

Wrong.

%K = ( (C−L14)/ (H14−L14) ) × 100
 
Sergey Golubev #:

It is what I found in documentation here:
MQL5 Reference - Technical Indicators - iStochastic 

.. and more on this page (with explanation and example).

Thanks, but I can't find how to calculate this, variables is here with comments:

handle=iStochastic(name,period,Kperiod,Dperiod,slowing,ma_method,price_field);

Function  with all parameters that need to calculate, but nothing about how to calculate this ... if I'm setting "Slowing" to 0 - I will lost all data of Stochastic. I think that is multiplier, but I don't know how to set value for exclude their works here (zero is not good, maybe 1 ... )

Get full formula will be better ...

 
Stochastic Oscillator - Oscillators - Indicators - Charts - MetaTrader 5 for Android - MetaTrader 5 Android Help
Stochastic Oscillator - Oscillators - Indicators - Charts - MetaTrader 5 for Android - MetaTrader 5 Android Help
  • www.metatrader5.com
The Stochastic Oscillator Technical Indicator compares where a security’s price closed relative to its price range over a given time period. The...
 
sergey087 #: Thanks, but I can't find how to calculate this ... Get full formula will be better ...

Learn to search the CodeBase: Stochastic Oscillator by MetaQuotes.

 
I was understand that "Slowing" = 1 is neutral value, that no do changes and I get equal values with formula in the first message for MT5 values
Reason: