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 carnitron, Today, 08:42 PM
    0 responses
    5 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Today, 07:51 PM
    0 responses
    7 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,974 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Today, 06:48 PM
    0 responses
    8 views
    0 likes
    Last Post rbeckmann05  
    Started by rhyminkevin, Today, 04:58 PM
    4 responses
    58 views
    0 likes
    Last Post dp8282
    by dp8282
     
    Working...
    X