• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Group Multi-Instruments orders into one

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

    Group Multi-Instruments orders into one

    Is it possible to Group Multi-Instruments orders into one?
    I also want the orders to be filled or kill. (FOK)
    I do not want partial fill.
    I want BOTH orders to be accepted, not one, and nothing less.

    Basically, I want BOTH EURUSD and GBPUSD to be filled at the quantity specified,
    or not to place the orders at all.

    Code:
    if (
    // conditions are true...
    )
    {
                    EnterShort(0,Quantity,"EURUSD");
                    EnterLong(1,Quantity,"GBPUSD");
    }

    #2
    Hello johnnybegoode,

    Thank you for the post.

    The following links are publicly available.

    There is no way of knowing that you are getting partially filled for a given order until you detect a partial fill in OnOrderUpdate. You will know a partial fill has occurred if order.OrderState == OrderState.PartFilled. There is no guarantee you will be filled at the specified quantity at a specified price. If you do get a partial fill on an order, it is best to cancel the remaining order and then either add to or close out the existing position received from the partial fill.

    Below is a relevant reference sample where OnOrderUpdate and OnExecution update is used to submit protective orders. You can use this to get a feel for how to use OnOrderUpdate properly.

    https://ninjatrader.com/support/help...ghtsub=onorder

    Please let me know if I can assist further.
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by blinx18, Today, 09:54 AM
    0 responses
    1 view
    0 likes
    Last Post blinx18
    by blinx18
     
    Started by Eloi_, Today, 09:48 AM
    0 responses
    4 views
    0 likes
    Last Post Eloi_
    by Eloi_
     
    Started by Longhornmark, Today, 08:22 AM
    2 responses
    12 views
    0 likes
    Last Post anon84
    by anon84
     
    Started by Stok, Today, 08:44 AM
    2 responses
    11 views
    0 likes
    Last Post Stok
    by Stok
     
    Started by akuntysh, Today, 12:02 AM
    3 responses
    12 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X