remove expert dal grafico
-
salve a tutti.
quando l' EA ha terminato voglio remove expert dal grafico in automatico. come si fa?
grazie mille -
@luca-9 Hello everyone.
when the EA finished I want to remove expert from the chart automatically. how you do it?
A thousand thanks -
Deleted by L luca 9
-
Restored by L luca 9
-
@luca-9 You can use this block where appropriate:

-
hello, i tried with terminate but that's not what i want. I intend to remove it from the chart because if I close and reopen the mt4 it re-enters the orders again while if I delete it from the chart the orders will not be entered. I hope I was clear
-
I just tested it, and it seems that when you decide to close MetaTrader 4, just before it closes it calls the Deinit event on EAs. I just placed "Pass -> Play sound" in "on Deinit", closed my MetaTrader and I heard a sound.
However, when I tested "Pass -> Terminate" in "on Deinit", it didn't really worked. After I stared it again, the EA was still in the chart.
I also noticed that MetaTrader hanged for a while at the Terminate block, which is probably because it has additional
ChartRedraw()function there, so I tested the native functionExpertRemove()in a "Custom MQL code" and this time it didn't hang, but still, after restart the EA was still in the chart. I don't really know how to remove EAs from the charts when you close MetaTrader. -
Thanks for the reply. if i forget the ea on the chart and by mistake i restart the mt4, the orders will be re-entered: how can i avoid this? Thank you
this is my project.
shared/3QhyEL6U
Is this right or do I need to change something? -
HELLO, I SOLVED THIS WAY: WHEN THE EA TERMINATED, THE TRADES EQUAL TO 0, A MESSAGE ON THE GRAPH WARNED ME TO REMOVE THE EA
-
THESE ARE THE TWO PROJECTS. IN REALITY THEY DO THE SAME THING BUT WITH A DIFFERENT STRUCTURE. RECOMMEND WHICH OF THE TWO IS MORE RELIABLE? WHAT IF I MAKE ANY CHANGES? THANK YOU
https://fxdreema.com/shared/rT5tkIXgd
https://fxdreema.com/shared/4qu3GazOd