I am new to MQL and I am trying to replicate the code I used to have for Full Stochastic in MT4.
Code I used to have for Full stochastic works as this,
Step 1. Fast Stochastic is given as input to the stochastic function (For e.g say 14, and the output is stored in variable say K)
Step 2. Output of Step 1 is given as input for smoothing and the output here will be smoothed K value, here you will specify the slow period for e. g 6 as input ( function SMA(K, 6))
and the output will be stored in the variable sK .
Step 3: Out put of Step 2 is given as is given as input to determine smoother D line, here you will give the d period value ( function SMA(sK,6)) and the output will be stored in sD variable
For Buy
sK > sD is checked and K should not be more than 80 (Resistance)
For Sell
sD > sK is checked and K should not be less than 20 (Support)
But in MT4, the iStochastic function takes all the parameters in one go.
I just want to know how to get K, sK and sD values out of it to implement my BUY/SELL logic.
Pleasae help
I have questions for other indicators like ADX asa well, which i'll post in another thread
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi All
I am new to MQL and I am trying to replicate the code I used to have for Full Stochastic in MT4.
Code I used to have for Full stochastic works as this,
Step 1. Fast Stochastic is given as input to the stochastic function (For e.g say 14, and the output is stored in variable say K)
Step 2. Output of Step 1 is given as input for smoothing and the output here will be smoothed K value, here you will specify the slow period for e. g 6 as input ( function SMA(K, 6))
and the output will be stored in the variable sK .
Step 3: Out put of Step 2 is given as is given as input to determine smoother D line, here you will give the d period value ( function SMA(sK,6)) and the output will be stored in sD variable
For Buy
sK > sD is checked and K should not be more than 80 (Resistance)
For Sell
sD > sK is checked and K should not be less than 20 (Support)
But in MT4, the iStochastic function takes all the parameters in one go.
I just want to know how to get K, sK and sD values out of it to implement my BUY/SELL logic.
Pleasae help
I have questions for other indicators like ADX asa well, which i'll post in another thread
Thanks
Satheesh Kumar