Questions from Beginners MQL5 MT5 MetaTrader 5 - page 424

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
Hello all! Could you please tell me how to select the last closed order in mql4 history? I am using OrderSelect(0,SELECT_BY_POS,MODE_HISTORY); it selects the first closed order, but how can I select the last one?
It is easier to track bar changes by bar time changes rather than by bar prices. At the end of the algorithm, we will remember the current bar time, and at the beginning we will compare it with the current time.
For example, for the M5 bar, the current time will be changed only at the beginning of the bar and every 5 minutes....
Testing of such programs is performed "by opening prices", which greatly speeds up the process of code debugging and optimization.
So I have to find out what TF it is now, do the rounding if the bar doesn't appear in exactly 5 minutes... In my case the code is very easy and not cumbersome. Of course the opening price may not change, but you can check by the sum of the past two bars. In general, if you hadn't written about advantages of your solution, I would have understood it better if I had attached the code - I am not a programmer...
Thank you - easier than I pictured in my mind after reading the comment.
Good afternoon!
Who can tell me how to make a drop-down menu in expert settings?
Like the one in the picture. Thanks.
Good afternoon!
Who can tell me how to make a drop-down menu in expert settings?
Like the one in the picture. Thanks.
So I have to find out what TF it is now, do the rounding if the bar doesn't appear in exactly 5 minutes... In my case the code is very easy and not cumbersome. Of course the opening price may not change, but you can check by the sum of the past two bars. In general, if you hadn't written about advantages of your solution, I would have understood it better if I had attached the code - I am not a programmer...
Where is the mistake?
Where is the mistake?