Problem with duplicate trades

 

Hi,

I want to ask you how can I use and trades only one trade.

I used ontick this code:

  switch(EA_ModeStrategy)
     {         
      case Trade1:
         {  
          UpdateComment="TRADE1";
          Trade1();
         }  
      }

     

I have selected Trade1 in my dropdownlist in expert settings and its works,

but always when go from Mt4 and open once again again I got new trades.

I have tried also to check if trade exists or not but its the same problem.


How can I used Switch only when go under settings expert and click OK?

Documentation on MQL5: Integration / MetaTrader for Python / order_calc_margin
Documentation on MQL5: Integration / MetaTrader for Python / order_calc_margin
  • www.mql5.com
order_calc_margin - MetaTrader for Python - Integration - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Dejan Krapez: I have tried also to check if trade exists or not but its the same problem.

Do or do not, there is no try. That is your problem.

Reason: