How to get MQ5 HistorySelect() to retrieves the history of deals and orders for only a specific Magic number?
Don Baechtel: Is there a way to get MQ5's HistorySelect() to retrieves the history of deals and orders for only a specific Magic number?
No, you retrieve it all (for the date/time range), then scan the records for the matching magic numbers.
I also recommend you study the following article ...
Orders, Positions and Deals in MetaTrader 5
MetaQuotes, 2011.02.01 16:13
Creating a robust trading robot cannot be done without an understanding of the mechanisms of the MetaTrader 5 trading system. The client terminal receives the information about the positions, orders, and deals from the trading server. To handle this data properly using the MQL5, it's necessary to have a good understanding of the interaction between the MQL5-program and the client terminal.
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
I have an EA that assigns a different magic number to a particular strategy or setup within the single EA.
Is there a way to get MQ5's HistorySelect() to retrieves the history of deals and orders for only a specific Magic number?
Does HistorySelect use a Magic number when it creates its lists of orders and trades? How is that Magic number set for HistorySelect?
If HistorySelect creates a list including all Magic numbers, how do I reduce that list to only the magic number of interest?
Thanks.