EnterShortStop (0,true,1000,1.61828,"EURAUD_N33233962")
TraceOrders produces the following:
Entered internal PlaceOrder() method at 28-Sep-18 00:12:33: BarsInProgress=0 Action=SellShort OrderType=Limit Quantity=1,000 LimitPrice=1.6182'8 StopPrice=0 SignalName='EURAUD_N33233962' FromEntrySignal=''
A call such as this works:
EnterShortLimit (0,true,1000,1.61948,"EURAUD_N72483291")
TraceOrders produces the following:
Entered internal PlaceOrder() method at 28-Sep-18 00:12:33: BarsInProgress=0 Action=SellShort OrderType=Limit Quantity=1,000 LimitPrice=1.6194'8 StopPrice=0 SignalName='EURAUD_N72483291' FromEntrySignal=''
EnterLongLimit (0,true,1000,1.61828,"EURAUD_N68177395")
TraceOrders produces the following:
Entered internal PlaceOrder() method at 28-Sep-18 00:19:24: BarsInProgress=0 Action=Buy OrderType=Limit Quantity=1,000 LimitPrice=1.6182'8 StopPrice=0 SignalName='EURAUD_N68177395' FromEntrySignal=''
EnterLongStop (0,true,1000,1.61948,"EURAUD_N28732522")
TraceOrders produces the following:
Entered internal PlaceOrder() method at 28-Sep-18 00:19:24: BarsInProgress=0 Action=Buy OrderType=Stop Quantity=1,000 LimitPrice=0 StopPrice=1.6194'8 SignalName='EURAUD_N28732522' FromEntrySignal=''
- Calls to EnterLongLimit and EnterShortLimit both work and TraceOrders correctly shows a Limit Price
- Calls to EnterLongStop work and TraceOrders correctly shows a Stop Price
- Calls to EnterShortStop FAIL and TraceOrders shows that a LIMIT Price has INCORRECTLY been set rather than a Stop Price.
The order management code for entering a ShortStop order appears to fail because it is using a zero Stop Price as a result of the LIMIT price being INCORRECTLY set instead of the STOP price.
Please advise and fix.
Thanks.
Comment