i need only one trade per signal

 
hi all, i need some guide on writing a code, can anyone show me suggestion and how i do it?
what i want is i have a few indicators, and then i only want a signal coming out from each bar for 3 different indicators

so for one bar, maximum signal i get is 3 and then i trade once only with each signal(3trade)

conclusion=1signal got from each indicator for each bar, trade only once with each signal 

 

right now my indicator is opening lots of trade for the same signal,how to prevent this 

and only one signal per bar is needed

is there anything to do with the refreshrate() ?  

 
// you could type something like this...    

   if((indicator1>price1)&&(indicator2>price2)&&(indicator3>price3)){ send an order. }
if(OrdersTotal()<1){ send an order. }

Don't forget to use the OrderSelect() function as well.

Thank you.

 
whoodoo, please refer to this https://www.mql5.com/en/forum/141839.thx
 
shenlongming: trade only once with each signal 

is there anything to do with the refreshrate() ?  

  1. RefreshRates is only necessary when you refer to predefined variables (Bid, Ask, Close[0], ...) after a LONG time (computation, sleep, OrderSend, OrderClose, ...) in the same call to start().
  2. Wait for the signal to fade. Wait for a signal. Open the new order.
    static bool signalCurr; bool signalPrev = signalCurr;
    signalCurr = ... // Your open condition
    if (signalCurr && !signalPrev) ... // Now open

Reason: