Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CL reversal order fails

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    CL reversal order fails

    Hello,

    I am experimenting with a strategy on the Sim account, running in real-time. I have the same strategy running on ES and DAX OK, but for some reason, on CL it stops working after the first order when in real-time mode. So, it starts and there is a position on. When time comes to reverse, the strategy orders fail. This does not appear to happen on the other 2 symbols I am testing it on, so it is a bit odd.

    I have included some log details

    This is the first startup and first order going through

    2017-12-08 17:41:05:585|1|32|Order='55e7293463a44027b424b7f83 fac218d/Sim101' Name='Sell short' New state='Cancel submitted' Instrument='CL 01-18' Action='Sell short' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2017-12-08 17:41:05:694|1|32|Order='55e7293463a44027b424b7f83 fac218d/Sim101' Name='Sell short' New state='Cancelled' Instrument='CL 01-18' Action='Sell short' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2017-12-08 17:45:47:693|1|4|Disabling NinjaScript strategy 'pjsDAXcd/83929977'
    2017-12-08 17:45:53:965|3|4|Strategy 'pjsDAXcd/83929977': An order placed at '03/12/2017 23:00:02' has been ignored since the order was submitted before the strategy property BarsRequiredToTrade had been met.
    2017-12-08 17:45:58:923|1|4|Enabling NinjaScript strategy 'pjsDAXcd/83929977' : On starting a real-time strategy - StartBehavior=ImmediatelySubmitSynchronizeAccount EntryHandling=All entries EntriesPerDirection=1 StopTargetHandling=Per entry execution ErrorHandling=Stop strategy, cancel orders, close positions ExitOnSessionClose=True / triggering 30 seconds before close SetOrderQuantityBy=Strategy ConnectionLossHandling=Keep running DisconnectDelaySeconds=10 CancelEntriesOnStrategyDisable=False CancelExitsOnStrategyDisable=True Calculate=On bar close IsUnmanaged=False MaxRestarts=4 in 5 minutes
    2017-12-08 17:45:58:923|1|4|Syncing account position on starting strategy 'pjsDAXcd/83929977'. Account position=' CL 01-18' Strategy position='S CL 01-18'
    2017-12-08 17:45:58:935|1|32|Order='a293ef0a31394102bb5f86c12 925d606/Sim101' Name='Synchronize' New state='Submitted' Instrument='CL 01-18' Action='Sell' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2017-12-08 17:45:59:037|1|32|Order='a293ef0a31394102bb5f86c12 925d606/Sim101' Name='Synchronize' New state='Accepted' Instrument='CL 01-18' Action='Sell' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2017-12-08 17:45:59:039|1|32|Order='a293ef0a31394102bb5f86c12 925d606/Sim101' Name='Synchronize' New state='Working' Instrument='CL 01-18' Action='Sell' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2017-12-08 17:45:59:042|1|32|Order='a293ef0a31394102bb5f86c12 925d606/Sim101' Name='Synchronize' New state='Filled' Instrument='CL 01-18' Action='Sell' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=1 Fill price=57.31 Error='No error' Native error=''
    2017-12-08 17:45:59:043|1|8|Execution='4dcf1ec0045343d79fe13e 08ecc78f3b' Instrument='CL 01-18' Account='Sim101' Exchange=Default Price=57.31 Quantity=1 Market position=Short Operation=Operation_Add Order='a293ef0a31394102bb5f86c12925d606' Time='12/8/2017 5:46 PM'
    2017-12-08 17:45:59:043|1|64|Instrument='CL 01-18' Account='Sim101' Average price=57.31 Quantity=1 Market position=Short Operation=Operation_Add


    Then, once the strategy tries to enter a position in the other direction, it fails (I do not believe you need to close any existing positions first and this seems to be the case for the exact same strategy running on 2 other symbols)

    Here is the failure to reverse

    017-12-08 19:29:42:481|1|16|NinjaScript strategy 'pjsDAXcd/83929977' submitting order
    2017-12-08 19:29:42:482|1|32|Order='68278355e25d4a3689140acd4 1fe25d3/Sim101' Name='Close position' New state='Submitted' Instrument='CL 01-18' Action='Buy to cover' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2017-12-08 19:29:42:482|1|16|NinjaScript strategy 'pjsDAXcd/83929977' submitting order
    2017-12-08 19:29:42:483|1|32|Order='280ebc78f146499a8b7973af2 4ef4bab/Sim101' Name='Buy' New state='Submitted' Instrument='CL 01-18' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2017-12-08 19:29:42:588|1|32|Order='68278355e25d4a3689140acd4 1fe25d3/Sim101' Name='Close position' New state='Accepted' Instrument='CL 01-18' Action='Buy to cover' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2017-12-08 19:29:42:590|1|32|Order='68278355e25d4a3689140acd4 1fe25d3/Sim101' Name='Close position' New state='Working' Instrument='CL 01-18' Action='Buy to cover' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2017-12-08 19:29:42:591|1|32|Order='280ebc78f146499a8b7973af2 4ef4bab/Sim101' Name='Buy' New state='Accepted' Instrument='CL 01-18' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2017-12-08 19:29:42:591|1|32|Order='68278355e25d4a3689140acd4 1fe25d3/Sim101' Name='Close position' New state='Filled' Instrument='CL 01-18' Action='Buy to cover' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=1 Fill price=57.33 Error='No error' Native error=''
    2017-12-08 19:29:42:592|1|8|Execution='4f5fa672f08948259e1e09 8b59e66933' Instrument='CL 01-18' Account='Sim101' Exchange=Default Price=57.33 Quantity=1 Market position=Long Operation=Operation_Add Order='68278355e25d4a3689140acd41fe25d3' Time='12/8/2017 7:29 PM'
    2017-12-08 19:29:42:592|1|32|Order='280ebc78f146499a8b7973af2 4ef4bab/Sim101' Name='Buy' New state='Working' Instrument='CL 01-18' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2017-12-08 19:29:42:593|1|64|Instrument='CL 01-18' Account='Sim101' Average price=0 Quantity=0 Market position=Flat Operation=Remove
    2017-12-08 19:29:42:594|1|16|Position Updated CL 01-18 : Remove : 0
    2017-12-08 19:29:42:594|1|16|Position Updated CL 01-18 : Remove : 0
    2017-12-08 19:29:42:594|1|16|Order Cancel NT Direct 16128
    2017-12-08 19:29:42:604|1|32|Order='280ebc78f146499a8b7973af2 4ef4bab/Sim101' Name='Buy' New state='Cancel submitted' Instrument='CL 01-18' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2017-12-08 19:29:42:719|1|32|Order='280ebc78f146499a8b7973af2 4ef4bab/Sim101' Name='Buy' New state='Cancelled' Instrument='CL 01-18' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''


    Any idea what I am doing wrong?

    Thanks.

    #2
    Hello,

    Thank you for the post.

    Please send me your full log and trace files so that I may look into what occurred to*platformsupport[at]ninjatrader[dot]com.*
    You can do this by going to the Control Center-> Help-> Mail to Platform Support.
    Please reference the following in the email body:*
    "ATTN ChrisL <Paste the link to this forum post here>"

    I look forward to your reply.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    56 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    133 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    73 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X