Hi,

I've written this bit of code to add a delay between buystop orders once a buystop has only been deleted. It doesn't work although it complies without error. Any ideas?

Inserted Code // Time Delay for the next Buy Stop Order after buystop is deleted. If ((kind == _OP_BUY) (MayOpenDeferOrder NextBuyStop_Order_Minutes !) =0))//Time Delay for the next Buy Stop Order int ordersHistoryTotal = OrdersHistoryTotal(); for (int o=ordersHistoryTotal;olt;=0;o--) //Count down until it strikes the total trades in history if(OrderSelect(I,SELECT_BY_POS,MODE_HISTORY)) //Obtaining all historical trades if ((Symbol() == OrderSymbol()) (OrderComment() == Buy Cease.)) Continue; // Buy Cease. Is your consumer comment //added when a buystop order is deleted. if(((TimeCurrent() - OrderOpenTime())/60) lt; NextBuyStop_Order_Minutes) MayOpenDeferOrder = false; break; //MayOpenDeferOrder==BuyStop Order