• 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 NinjaCustomer, Today, 01:48 AM
    0 responses
    1 view
    0 likes
    Last Post NinjaCustomer  
    Started by aligator, Yesterday, 10:11 PM
    0 responses
    2 views
    0 likes
    Last Post aligator  
    Started by psquare, Yesterday, 03:11 PM
    4 responses
    20 views
    0 likes
    Last Post psquare
    by psquare
     
    Started by ballboy11, Yesterday, 03:20 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by tonynt, Yesterday, 02:18 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_JoshG  
    Working...
    X