Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1197
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
For display in the tester? Yes. Create a template with all the indicators you need and save it with the EA name or tester name and the test will open with these settings.
On the real and demo account charts.
Greetings!
Does anyone know how to contact Maxim Gutman?
Trader, developer of an automated trading system
On the real and demo account charts.
Here is the MACD, for example
All the others are the same.
Good afternoon, please advise or throw me a link to see
I need to select from the open positions those that have a lifetime exceeding a certain period.
How do I correctly compare the time a position opens with the current time?
I threw this function, what to do next I can not think (little experience), how to compare the time?
Good afternoon, please advise or throw me a link to see
I need to select from the open positions those that have a lifetime exceeding a certain period.
How do I correctly compare the time a position opens with the current time?
I named this function, but I have no idea what to do next (lack of experience), how do I compare times?
In the loop, select a position and get its ticket.
Next, get the opening time of the position
and compare with the reference time ±.Select a position in the loop and get a ticket for it
Then get the opening time of position
And compare with the reference time ±.Just this comparison procedure throw up please, with the ticket position, time of opening and server time, I think I figured it out, I can not compare. I looked through the comment, I just get dates.
This is exactly the comparison procedure please, with the position ticket, opening time and server time I think I figured it out, I can't compare. I looked through the comment, I just get the dates.
So you compare the dates. But you have to consider the discrepancy. It's better to compare the difference between the opening time and the reference time with an allowable deviation.
So compare the dates. But you have to consider the discrepancy. It's better to compare the difference between the opening time and the reference time with a tolerance deviation.
So compare the dates. But you have to consider the discrepancy. It's better to compare the difference between the opening time and the reference time with the tolerance.
Roger that, thanks, I'll try it as soon as I'm at my computer (I'm on my mobile at the moment).
Good afternoon.
I want to sort the vertical lines by time on the chart. I've written a little script. But the result is not what I want.
Please advise what i am doing wrong.
The result:
Good afternoon.
I want to sort the vertical lines by time on the chart. I've written a little script. But the result is not what I want.
Please advise what i am doing wrong.
The result:
Logically, you first need to collect all the lines in an array, I would do immediately two-dimensional, well, or array structure, in the first dimension add a time of creation, in the second - the name of the line.
In the loop for one run, fill the array, outside the loop after filling the array is sorted by the first dimension, that is, the time.
The result is printed in the second loop.
As a result, we have 2 cycles and sorting between them.
That's all, if I understood the problem correctly :)