Question - does this work?

 

I am coding a grid trading EA. as I need to replenish my pending orders. I was thinking of using OrderDelete to remove all pending orders then use a for loop and OrderSend to set them up again. This is one a tick by tick timeframe.

 Just wondering, at which part of the code does the tick by tick movement exist? If I code the above, will trades ever get executed(since they are deleted and replenish each time)? 

 
yuan83:

I am coding a grid trading EA. as I need to replenish my pending orders. I was thinking of using OrderDelete to remove all pending orders then use a for loop and OrderSend to set them up again. This is one a tick by tick timeframe.

 Just wondering, at which part of the code does the tick by tick movement exist? If I code the above, will trades ever get executed(since they are deleted and replenish each time)? 

start() is called for each tick,  does that answer your question ?   I think your Broker will get a little annoyed if you delete and re-send all you pending orders for each tick.
 
RaptorUK:
 I think your Broker will get a little annoyed if you delete and re-send all you pending orders for each tick.


not only that every pending has to be set a distance from price so there is no chance it get ever executed.

Some brokers Ask money if you keep holding the server busy for trading some system