Questions from Beginners MQL5 MT5 MetaTrader 5 - page 514
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
Снова нет конкретики. Ладно: пальцем в небо - DebugBreak.
Применять примерно так:
Again, no specifics. OK: finger in the sky -DebugBreak.
Apply like this:
OK, What do you need for specifics? I wrote a little earlier.
The point is this:
two pending orders are opened.
One of them will be executed, and the other one will be deleted as it is not needed.
The first one will also close after a while (plus or minus).
The idea is that we return to the starting point. And everything should repeat.
But no.
Before all this process I put:
If both are zero, we execute the circuit, if not, we don't.
In debugging, I put these two points in the observation. Both of them are 0. But on the second round only one order is placed.
Why is it so?
OK, what do you need for specifics? I wrote earlier.
Here's the idea:
2 pending orders are opened.
One is executed, the other is deleted when it is not needed.
The first one will also close after a while (plus or minus).
The idea is that we return to the starting point. And everything should repeat.
But it does not.
...
Your logic, you have to answer the question yourself.
...
In debugging, I put these two items in the observation. They're both 0. But on the second round, only one order is placed.
Why is it so?
Again, only you can answer, as the logic is yours.
In general, I would like to repeat it once again: a correctly formulated question contains 90% of the answer. So please put breakpoints before the place in the code where you take action with the position. And then step-by-step debugging.
Hello, Could you please suggest the code which performs the action at the beginning of a new day (00.00), or in other words, how to display the condition "If a new day occurs (00.00)" in MQL?
There are two mql languages.
The algorithm is as follows:
Remember the time of the previous candle in TF D1 in a static variable and compare it with the time of the current candle in the same TF. If the time has changed, then perform the action and remember the time of a new candle in the same variable.
Hello, Could you please tell me the code which will cause the EA to execute some action at the beginning of a new day, i.e. 00.00, or in other words, how to display the condition "If it is a new day (00.00)" in MQL?
Alternatively
if (StatTime==1)
{
Time=iTime(NULL,1440,0);
StatTime=0;
}
if(Time!=iTime(NULL,1440,0))
{
StatTime=1;
}
Alternatively
if (StatTime==1)
{
Time=iTime(NULL,1440,0);
StatTime=0;
}
if(Time!=iTime(NULL,1440,0))
{
StatTime==1;
}
It is not quite clear what type of StatTime variable it is?
datetimeTime
intStatTime
There was a misprint in the code: notStatTime==1; butStatTime=1;
if(Time!=iTime(NULL,1440,0))
{
StatTime=1;
}
Your logic, you should answer the question yourself.
Again, only you yourself can answer, because the logic is yours.
In general, I will repeat it once again: a correctly posed question contains 90% of the answer. In general, put breakpoints before the place in the code where you take action with the position. And after that you do step-by-step debugging.
2016.02.15_14:27 GMT+3. Hello, question for the moderators. I am attaching
screenshot. Can't get ZigZag's indicator buffer data. On
I can see in the screenshot that I have the "indicators" folder in the file path. In fact
There is actually a folder "Indicators" in the terminal. Perhaps because of this discrepancy and
I can't open the ZigZag.mq4 file.
And data of Moving Average and Fractals indicators how to get into arrays, not
only the latest values? Any tips. That's all for now. Waiting for an answer. 14:36 GMT+3. 15:25 GMT+3.
Written in procedural programming.