Hi! thanks for giving my post a click. I'm Stuck on the world easiest problem that I cant find the answer to.
I'm testing a super simple EA that just tells me to buy or sell based on a normal Stochastic Oscillator.
Every time I run it the first for loop gets triggered and the first print command returns 57.00
That's all the code, Thanks!
Hi ...Please click on iStochastics in Your code and press F1 ...then read really properly what this function returns :) , or read documentation
:
https://www.mql5.com/en/docs/indicators/istochastic
and then read how to use indicators in mql code, but first find out if You are using mql5 or mql4 because there is a difference between those two
HINT:
StochPrev // is NOT a value of the schohastic in your case
- www.mql5.com
- You didn't post any for loop.
-
Why did you post your MT4 question in the
Root /
MT5 General section
instead of the MQL4 section,
(bottom of the Root page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon. if (StochPrev > 80.0){ Print("Sell!");
You are looking at a signal. Act on a change of signal.
MQL4 (in Strategy Tester) - double testing of entry conditions - Strategy Tester - Expert Advisors and Automated Trading - MQL5 programming forum
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi! thanks for giving my post a click. I'm Stuck on the world easiest problem that I cant find the answer to.
I'm testing a super simple EA that just tells me to buy or sell based on a normal Stochastic Oscillator.
Every time I run it the first for loop gets triggered and the first print command returns 57.00
That's all the code, Thanks!