Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1402
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Are you visually impaired?
What's with the horse text?
Are you visually impaired?
What's with the horse text?
An accident.
What if a person writes for himself or herself?
It's not like he can measure the distance from an invisible point anyway, the intersection will be somewhere else.
It will not measure the distance from an invisible point anyway, the intersection will be in a different place.
I was saying that if a person is writing for himself, he understands what he is doing and understands what will happen.
This is the forum for trading, automated trading systems and strategy testing.
Any questions from newbies on MQL4 and MQL5, help and discussion on algorithms and codes
Taras Slobodyanik, 2021.02.28 09:37
If you do not know how to check the correctness of deals, they will hang in the air, and the user will say - MT4 is a glitchy one)
I was saying that if one writes for oneself, one understands what one is doing and understands what will happen and will not say
that's how Grails are born)
then not into a variable, but into a buffer, because there will be a lot of such points.
At the moment of crossing, the value of the MA was not the same as it became after the bar was closed. Therefore, this value can only be found at the moment of crossing.
It is how you want the value to be memorized.
But keep in mind that
at the opening of a candle.
Therefore, if you need instantaneous, real-time data, you'd better use
It's better to normalize all prices to be compared in the condition, so you won't be surprised :)
It's how you want the value to be remembered.
But keep in mind that
at the opening of a candle.
So if you want instantaneous, real time, it's better to use
It's better to normalise all prices to be compared in the condition, so you won't be surprised :)
Hello all!
When writing code to test an EA, I need to search for the low in real time inside each minute candlestick. To do this, I chose a predefined variable Low[0] with index 0. The index is zero to search for the low in each current candle.
Here is my code
void OnTick()
{
Print("------------", Low[0] );
}
On the first (yellow) candlestick, the variable shows the minimum as I need it to
On all subsequent candlesticks until 2010.01.04 00:30:00 the variable shows -1.6119, i.e. it repeats the minimum of the first candle, rather than looking for minima on every single minute candle.
On the candlestick 2010.01.04 00:30:00 it shows every minimum again
On the next candle after this one it shows -1.6128 , i.e. it repeats the minimum of the first candle instead of looking for lows inside each one-minute cand le.
Instead of Low[0] variable I used the same function iLow(NULL , 0,0) , but the effect was the same.
QUESTION
How to use the mentioned function or variable to search for a minimum in every minute candle, or what other function is it possible to use in MQL4?
Thank you all for your help.