limiting EA for order sending

Back to topics list To post a new topic, please log in or register
avatar
3
ailanshi_7 2016.04.30 19:37
 


Can we control iEA ordersending function it is sending a lot of orders in a second.


avatar
12992
WHRoeder 2016.05.02 19:31 #
 
  1. That is what you coded. Fix your broken code.
  2. Check for open orders or a change in signals.
    int start(){
       static datetime time0; datetime prev0=time0; time0=Time[0]; bool isNewBar = prev0 != time0;
       if(isNewBar){
          static double level; double prev = level; level = ...;
          bool wasSignal = prev  > x;
          bool  isSignal = level > x
          if(isSignal && ! wasSignal) ...

Back to topics list  

To add comments, please log in or register