EA Should Open trade Once per Signal...

 

Hello Every one i am new here.i am not a programmer.i have a problem with my ea..can any one help

The problem is: EA Should open trade only Once when it gets a New Signal.  it wont open any New trade unless it gets the Opposite Signal.

i am posting the code that i have find in a post..

https://forum.mql4.com/62858


and the final code that i have find is below..i haved attached my ea...just plz enter this code in my ea...thanks



Static bool Buy_Once=false,Sell_Once=false;

   if(Buy Condition Met && !Buy_Once)
     {
      Buy=Open Buy Trade function;
      if(Buy>0)
        {
         Print("Buy Order Opened");
         Buy_Once=true;
         Sell_Once=false;
        }
     }
   if(Sell Condition Met && !Sell_Once)
     {
      Sell=Open Sell Trade function;
      if(Buy>0)
        {
         Print("Sell Order Opened");
         Sell_Once=true;
         Buy_Once=false;
        }
     }
Files:
arjsystem.mq4  23 kb
Reason: