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 don't get it. If something has changed in the database, the only way to find out is to compare it with the previous state of the database.
You can compare each corresponding database element. Or you can calculate the hash from them and compare the hashes.
The terminal already knows about this change (OnTrade). That's why I want to know about it in my function.
Especially relevant for MT4, where the time_msc step change is 1000ms.
Too bad, it makes it impossible to use the simplest option I know at the moment.
The terminal already knows about this change(OnTrade). That's why I want to know about it in my function.
There is no Trade event in MT4.
The trade event is not in MT4.
It just hasn't been routed to MKL. The terminal does not update the list of trades on a timer.
It just hasn't been wired into the MCL. The terminal does not update the list of trades on a timer.
Therefore, only through verification.
1. What is the cheapest way to know that the function call is on the same tick as the previous call?
Time (TimeCurrent) can stay the same, time in ms from SymbolInfoTick, theoretically too.
Comparing the bid, ask and ms times is quite expensive.
I do not suggest organizing the control in the Expert Advisor itself, I want to get a universal independent function.
The same question concerns trading operations. How do we know that something has changed in the list of orders/positions (including the open levels, SL and TP) since the last run?
I would need to set some flag in OnTrade (and reset it when done), it's the cheapest way to do it.
But, again, I would like a universal solution.
Who has any ideas?
Right:
Okay:
Thank you.
I don't suggest the option of organizing control in the EA itself, I just want to get a universal independent function.
Thanks.
Since it hasn't been suggested yet, I'll give you an idea where I'd dig, check the time of the last PostMessage or something, probably nonsense, I'm not that versed in Api.
Checking the time of the last PostMessage or something like that is probably nonsense, I don't know that much about Api.
Yes, it looks like nonsense)
Thanks for trying.
Unrealistic without control in the EA itself.
Not only that, it is not necessary. The requested function will be called in the EA, i.e. it is essentially the same control in the EA, only less invasive