Orders only at close-reopen platform

 

Something strange overhere, only when i close and restart the metatrader 4 platform orders from my EA are placed, immediately.. Has it something to do with connection, or with the EA, but what?


Ed

 
EdwinJ:

Something strange overhere, only when i close and restart the metatrader 4 platform orders from my EA are placed, immediately.. Has it something to do with connection, or with the EA, but what?


Ed

I guess with your EA ;-) But I haven't seen your code therefore I can't answer what is wrong :D
 
EdwinJ:

Something strange overhere, only when i close and restart the metatrader 4 platform orders from my EA are placed, immediately.. Has it something to do with connection, or with the EA, but what?


Ed

Try to disable the " Automated Trading " button before you close your trades and also before you close your MetaTrader 4/5 platform.

As regarding your trade you can close them manually after you have disable your " Automated Trading ".

there could be a code within your EA which check if there are any trades open, and if there is no trade open it will automatically open trades.

 
EAs must be coded to recover. If the power fails, OS crashes, terminal or chart is accidentally closed, on the next tick, any static/global ticket variables will have been lost. You will have an open order but don't know it, so the EA will never try to close it, trail SL, etc. How are you going to recover? Use a OrderSelect loop to recover, or persistent storage (GV+flush or files) of ticket numbers required.
 

Thanks.


I guess it must be the EA, added some lines which i shouldn't, because before that everything was fine...

I wil remove the latest 'thougts', lines so to speak.., and add recover in it isn't a bad idea!


Ed

Reason: