Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Issue: SubmitOrderUnmanaged SyncronizingObject

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

    Issue: SubmitOrderUnmanaged SyncronizingObject

    I am migrating from NT7 to NT8 and have run into a compatibility problem that is affecting the new SubmitOrderUnmanaged (and not the old SubmitOrder on NT7).

    I believe it is a threading issue. If an unmanaged order object is created via a thread using SubmitOrderUnmanaged the order will fail with the order object exception of not initialized (exists). During debugging, I can confirm that SubmitOrderUnmanaged returns null in the thread.

    A traditional managed order works fine. The SubmitOrderUnmanaged works fine as long as it is not submitted via a thread.

    I have been searching for a strategy syncronizingobject that can be associated with my thread or some way to invoke back to the main strategy thread to allow unmanagedorders without luck.

    Has anyone been able to submit unmanaged orders from a thread?

    Regards,

    Number1

    #2
    Hello number1,

    I'm not entirely certain what kind of script you are running or how you are trying to place an order.

    If you are attempting to place an order from an Addon, this is done with Account.CreateOrder().
    http://ninjatrader.com/support/helpG...reateorder.htm

    If you are placing an unmanaged order in a strategy, IsUnmanaged must be set to true first so that backend changes understand the types of orders that will be submitted and to turn the managed order control off.
    Then SubmitOrderUnmanaged() should work fine. This would not be submitted in a new thread but must remain within the NinjaScript thread.
    http://ninjatrader.com/support/helpGuides/nt8/en-us/submitorderunmanaged.htm
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Kaledus, Today, 01:29 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by frankthearm, Yesterday, 09:08 AM
    13 responses
    45 views
    0 likes
    Last Post frankthearm  
    Started by PaulMohn, Today, 12:36 PM
    2 responses
    16 views
    0 likes
    Last Post PaulMohn  
    Started by Conceptzx, 10-11-2022, 06:38 AM
    2 responses
    55 views
    0 likes
    Last Post PhillT
    by PhillT
     
    Started by yertle, Yesterday, 08:38 AM
    8 responses
    37 views
    0 likes
    Last Post ryjoga
    by ryjoga
     
    Working...
    X