Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1780

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
As far as I can see, the difference is this:
You can go through the story from the beginning or from the end. There is no difference. Anyway, the function searches for the order with the latest close time. And if you want to delete or close orders, we should search from the end of the list. Otherwise, the loop will skip orders.
as far as I can see, the difference is as follows:
In this case there is no difference. The cycle from OrersTotal to 0 is mandatory only in the case of closing positions or removing orders. In other cases it is up to your liking.
You can go through the story from the beginning or from the end. There is no difference. Anyway, the function searches for the order with the latest closing time. And if you want to delete or close orders, then you need to search from the end of the list. Otherwise, the loop will skip orders.
If the function searches for the order with the latest close time, then the search will obviously be faster from the end - from the current time to the past, rather than from the beginning of the history.
If the function is looking for an order with the latest close time, the search will obviously be faster, not from the beginning of the history, but from the end - from the current time to the past time.
In the opposite direction, the function will find the order with the latest close time faster, it won't change it until the end of the cycle and will return the result. In the forward direction, it will search through all orders and return one of the last orders. The difference is that the variables will be overwritten on every pass of the loop. Yes, there is a difference. But I think it is not very significant. Although I would prefer the loop in the reverse direction to the forward one. Despite the fact that the function will work one way or another.
Hi all, is there any way to switch between chart windows programmatically, i.e. make any chart active from a program?
Check out
Display chart on top of all other charts
bool
Check out
Display chart on top of all other charts
bool
Thank you!
You can go through the story from the beginning or from the end. There is no difference. Anyway, the function searches for the order with the latest closing time. And if you want to delete or close orders, then you need to search from the end of the list. Otherwise, the loop will skip orders.
Anyway, I made two completely identical EAs, except for order lot counting!!! and here is the result:
DOES NOT WORK (i.e. does not open BAY instead of SELL)
WORKING ( (i.e. opens BAY instead of SELL)
Anyway, I made two completely identical EAs, Except for order lot counting!!! and here's the result:
DOES NOT WORK (i.e. does not open BAY instead of SELL)
WORKING (i.e. opens BAY instead of SELL)
Once again I emphasize the difference
1 variant
2 variant
Anyway, I made two completely identical EAs, Except for order lot counting!!! and here's the result:
DOES NOT WORK (i.e. does not open BAY instead of SELL)
WORKING ( (i.e. opens BAY instead of SELL)
Try to understand what you are coding, rather than blindly copyingOrdersTotal,OrdersHistoryTotal,
OrderSelect
pool=MODE_TRADES
[in] Source of the data to select. Used when the select parameter is SELECT_BY_POS. Can be one of the following values:
MODE_TRADES (default) - order is selected among open and pending orders,MODE_HISTORY - order is selected among closed and deleted orders.