I'm running into an issue where I have a EnterLongStopLimit active, price then moves toward the bottom of the triangle, but the EnterShortStopLimit is ignored. I have TraceOrders set to true, and in the log I get the following message:
"An Enter() method to submit an entry order at '10/25/2011 10:50:43 AM' has been ignored. Please search on the term 'Internal Order Handling Rules' in the Help Guide for detailed explanation."
Here is the code that handles the orders:
{
//monitor price action and submit an entry order for which ever one is closest
if (Close[0] - shortEntry > longEntry - Close[0])
{
if (shortEntryOrder != null)
CancelOrder(shortEntryOrder);
if (shortStopOrder != null)
CancelOrder(shortStopOrder);
if (shortTargetOrder != null)
CancelOrder(shortTargetOrder);
longEntryOrder = EnterLongStopLimit(longEntry, longEntry, "long_entry");
longStopOrder = ExitLongStop(longStop, "long_entry");
longTargetOrder = ExitLongLimit(longPT, "long_entry");
shortOnReversal = true;
}
else
{
if (longEntryOrder != null)
CancelOrder(longEntryOrder);
if (longStopOrder != null)
CancelOrder(longStopOrder);
if (longTargetOrder != null)
CancelOrder(longTargetOrder);
shortEntryOrder = EnterShortStopLimit(shortEntry, shortEntry, "short_entry");
shortStopOrder = ExitShortStop(shortStop, "short_entry");
shortTargetOrder = ExitShortLimit(shortPT, "short_entry");
longOnReversal = true;
}
}
Thanks!

Comment