Download MetaTrader 5

iStochastic Indicator Coding Advice

To add comments, please log in or register
algo7134
22
algo7134  

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

To add comments, please log in or register