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
Question: Is the min delay between calls documented
then it's strange that error code = 4754 is the same as for a known non-existent ticket
I think I could have come up with a different code (busy for example) - someone gave me the ticket number result.orderthen it is strange that the error code = 4754 is the same as that of a known non-existent ticket
Yeah, the event hasn't been processed by the terminal yet.
Here we have:
Correspondingly, the order cannot be found in the base of the terminal . And that's why 4754 is returned. Even if the ticket is known.
Have a look at the articles:
Orders, Positions and Trades in MetaTrader 5;
Trade Events in MetaTrader 5
How many times a request will be made to the terminal database: 2 or 1
In other words, do I need to monitor the frequency ofOrderSelect( tiket20 ) calls not in terms of relevance of information, but in terms of time spent on the frequency of consecutive requests to the terminal base for the same question? (the question is not directly related to the previous one)
Thanks for studying it, but I don't quite understand - with this code
How many times a request will be made to the terminal database: 2 or 1
In other words, do I need to monitor the frequency ofOrderSelect( tiket20 ) calls not in terms of relevance of information, but in terms of time spent on the frequency of consecutive requests to the terminal base for the same question? (the question is not directly related to the previous one)
A100:
Спасибо изучил, но не совсем понял - при таком коде
How many times will the terminal base be queried: 2 or 1
Two consecutive calls to the OrderSelect() function will result in two consecutive requests to the terminal database, regardless of which ticket is specified as a function parameter. Another thing is that if our order (order details) still does not appear in the terminal database during those consecutive requests, the function will still return the "order not found" error code.
Yes, I need to control the frequency of one-type calls to the terminal database. Roche already suggested one of the options. I'm not used to OnTradeTransaction() function yet (too lazy to filter all trade events), therefore I act in an old fashioned way - using event-driven, if I may say so. I.e., I access the terminal's base when a next tick comes; if the order is not detected at a next tick, I simply "skip the turn" regarding that order.
m_handle=iMA(m_strategy_symbol,(ENUM_TIMEFRAMES)m_period,maperiod,0,MODE_EMA,PRICE_CLOSE); - the question is why if the optimization picks up m_period then with some periods it goes on and with some not?
AndreyS:
- question why if optimisation selects m_period, then some periods are damped and some are not???
1. Insert your code correctly.
2. How is the m_period parameter optimized/selected? I.e. what is its value during your optimization?