I'm trying to understand why the order produced by ExitOnClose was rejected. I would like suggestions for what I should investigate.
The strategy opened a short position with EnterShortStop().
Take profit and Stop loss orders were placed after entry fill.
ExitOnClose = true and ExitOnCloseSeconds = 660 (11 mintues).
The normal exits have been working fine.
ExitOnClose has tested OK on a demo account, but this is the first time ExitOnClose was required to close the position on a live account.
In this case the error stated "The order type is not allowed for the commodity affected Order" BuyToCover 1 Market"
However, the stop loss and take profit executions are also BuyToCover and work fine.
The account is with AMP / CQG.
PC time is set to New Zealand local time.
Cheers
Tony
Here is a section of the log:
13/09/2012 7:49:00|1|128|Exit on close handling for strategy 'Gap11' started. 13/09/2012 7:49:00|1|32|Order='1923921760/86497!AMP!ac86497' Name='Profit target' New state=PendingCancel Instrument='TF 09-12' Action=BuyToCover Limit price=838.2 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='' 13/09/2012 7:49:00|1|32|Order='1923921761/86497!AMP!ac86497' Name='Stop loss' New state=PendingCancel Instrument='TF 09-12' Action=BuyToCover Limit price=0 Stop price=846.5 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='' 13/09/2012 7:49:00|1|32|Order='2cd16e0faa39460e9051079c3d19df 28/86497!AMP!ac86497' Name='Exit on close' New state=PendingSubmit Instrument='TF 09-12' Action=BuyToCover Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error='' 13/09/2012 7:49:00|1|32|Order='2cd16e0faa39460e9051079c3d19df 28/86497!AMP!ac86497' Name='Exit on close' New state=Rejected Instrument='TF 09-12' Action=BuyToCover Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=OrderRejected Native error='The order type is not allowed for the commodity' 13/09/2012 7:49:00|0|32|AMP Live, The order type is not allowed for the commodity affected Order: BuyToCover 1 Market 13/09/2012 7:49:00|0|128|Strategy 'Gap11/cd7055f2e7e749b88edcb152c9347629' submitted an order that generated the following error 'OrderRejected'. Strategy has sent cancel requests, attempted to close the position and terminated itself. 13/09/2012 7:49:00|1|32|Order='1923921760/86497!AMP!ac86497' Name='Profit target' New state=Cancelled Instrument='TF 09-12' Action=BuyToCover Limit price=838.2 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='' 13/09/2012 7:49:00|1|32|Order='1923921761/86497!AMP!ac86497' Name='Stop loss' New state=Cancelled Instrument='TF 09-12' Action=BuyToCover Limit price=0 Stop price=846.5 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='' 13/09/2012 7:49:00|1|32|Order='6322db98c24042799b6ed63707aca5 8f/86497!AMP!ac86497' Name='Close' New state=PendingSubmit Instrument='TF 09-12' Action=BuyToCover Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error='' 13/09/2012 7:49:00|1|32|Order='6322db98c24042799b6ed63707aca5 8f/86497!AMP!ac86497' Name='Close' New state=Rejected Instrument='TF 09-12' Action=BuyToCover Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=OrderRejected Native error='The order type is not allowed for the commodity' 13/09/2012 7:49:00|0|32|AMP Live, The order type is not allowed for the commodity affected Order: BuyToCover 1 Market 13/09/2012 7:49:00|1|128|Disabling NinjaScript strategy 'Gap11/cd7055f2e7e749b88edcb152c9347629'

Comment