OnTrade Tab function is unstable
-
I just did the easiest smallest code possible to check on the on trade function, and it is not detecting trades all the time... about 50% of the trades are missed by this code....
https://fxdreema.com/shared/vAqrYmpMcHere is the link to the code, it just places a log message, when OnTrade function is called...
Then I compile it and run on MT5, I start doing trades manually on a demo account and only about half the times, it prints the log message....
I have attempted buying and selling, to try and find a pattern for the error, but could not find any pattern, the log simply doesn't print on every trade.Does someone know of a workaround for this problem ?
-
@floridabrazil That EA cannot work because theare no trades anywhere. The 'on trade' tab works obkly if there is at least one open trade.
-
Right, I am trying to use the EA to capture trades from manual trading activity, just like the MQL5 original OnTrade function.
When I attempt to do this, it does capture some manual trades, but for some reason, not all trades are captured.... even if i just do "Manual Buy" on MT5, 5 times, during 1 min, it only captures about 50% of the trades... -

Here is a screenshot of the EA activity.... IT prints messages to the log when there is a manual trade, you can see the Experts tab on the bottom of the screen.This screenshot was done right now, and i did about 9 manual trades, the EA only got 2 of them...
-
@floridabrazil Use a 'Position created' block on top of your log block on the 'on trade tab. Be sure you select the manually created option. Then remove the 'Pass' block there.
-
I did use the Position Created, same result.... only works some times.... here is the actual project i was working on, when I noticed the instability.... https://fxdreema.com/shared/Wb5PQFLW
-
@floridabrazil You should duplicate completely both trees. Do not share the same variabe for buys and sells. You need to duplicate both of them for buys and sells. Addiionally, you need to specify when they are reinitialized.
-
That is why I did the SIMPLEST version, sent on the top of this thread, with nothing to go wrong... just a log message.... and it only works sometimes... is unstable
-
@floridabrazil Some times the simplest FUNCTIONAL version needs some complex structures to go.

-
I get it !

This is why I brought this to the attention of FX dreema, to have a chance to make it work.
Is there a workaround, in case I just want to show a log message, every time the on trade function is called ?
-
@floridabrazil Honestly I don't know. Maybe there is one, but I don't know it. Anyone else has an idea about it?
-
is there some sort of special way to report a bug on fxdreema engine or just posting here is enough ?
-
@floridabrazil You'd better contact the admin directly through the support page. He will answer you before two weeks.