- Start with the documentation and use the predefined enumerations to make your code readable:
iStochastic(NULL, PERIOD_M5, 7, 2, 2, MODE_SMA, 1, MODE_SIGNAL, 0); // Same as yours.
Then you would see you want the MODE_MAIN. - And next time:
For large amounts of code, attach it.
Thanks for your reply,
I used the following code snippet in order to debug the issue:
double stochastic = iStochastic(NULL, PERIOD_M5, 5, 3, 3, MODE_SMA, 1, MODE_MAIN, 0); Print(stochastic);
22:07:39 2012.10.03 07:35 ExpertAdvisor GER30,M1: 11.7647
22:07:39 2012.10.03 07:35 ExpertAdvisor GER30,M1: 12
22:07:39 2012.10.03 07:35 ExpertAdvisor GER30,M1: 14
22:07:39 2012.10.03 07:35 ExpertAdvisor GER30,M1: 16
22:07:39 2012.10.03 07:35 ExpertAdvisor GER30,M1: 14
22:07:39 2012.10.03 07:35 ExpertAdvisor GER30,M1: 16
22:07:39 2012.10.03 07:35 ExpertAdvisor GER30,M1: 12
Indictator line in Metatrader: (PERIOD M5)
I hope the issue became more clear as I would like to get values such as 35.8209 returned instead of the results I received above.
If there is no possible way to receive the data I would like to have with the function iStochastic I would like to script my own indicator by using my own calculation. Does any of you know how to either get the data I would like to have or the calculation for the common Stochastic indicator?
Well, I am having issues with CLOSE.
%K = (CLOSE-LOW(%K))/(HIGH(%K)-LOW(%K))*100
%K would be 5 in my case.
For LOW(%K) I may use the function iLow (M5).
For HIGH(%K) I may use the function iHigh (M5).
CLOSE would be today's closing price. I do not quite understand what is meant here. What function may I use for that?
FlashX: I hope the issue became more clear as I would like to get values such as 35.8209 returned instead of the results I received above.
Your 35.8 pop up is for what ever candle your mouse is over. Your iStoch call is for the current candle.
Your 35.8 pop up is for what ever candle your mouse is over. Your iStoch call is for the current candle.
Where is the difference? Is it possible to get data every minute according to the blue line in the M5 chart? Or is it somehow possible to get this line somehow transfered into M1? I am in need of the results of this line.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Good evening,
I am currently using the following Stochastic Oszillator:
The issue now is that once I use a Stochastic Oszillator (7, 2, 2) in Metatrader in a M5-chart the values vary enormously in comparison to the coded results.
What I would like to achieve is getting results of the blue indicator line in the Metatrader. Until now I wasn't able to find any possible solution for this issue.
Thanks for your assistance.