My strategy enters a limit order based upon my condition, then changes the limit price if my condition changes. Works fine on history, but when real time, the new order with change is ignored with the Output window stating: Reason='Exceeded entry signals limit based on EntryHandling and EntriesPerDirection properties
Here is my entry:
if (my condition)
entryOrder = EnterLongLimit(0,true,NumContracts,DonchianChannel (DonchianPeriod)[0]+TickSize,"Monkey Long");
Here is where I change the limit price
if(my conditions changes)
CancelOrder(entryOrder);
entryOrder = null;
entryOrder = EnterLongLimit(0,true,NumContracts,DonchianChannel (DonchianPeriod)[0]+TickSize,"Monkey Long");
I've got the following code in Initialize()
EntriesPerDirection = 1;
EntryHandling = EntryHandling.AllEntries;
I've tried just commenting out the Entries code, but still get the same results. It ignores the order. Why does it tell my I'm exceeding my limit, when I first cancel the existing order, before placing the new order?
Thanks.
Comment