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 wjadevries, Today, 12:58 AM
    0 responses
    5 views
    0 likes
    Last Post wjadevries  
    Started by JoeyBoy, Yesterday, 04:05 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Marco  
    Started by bruhnrp, Yesterday, 05:56 PM
    2 responses
    15 views
    0 likes
    Last Post NinjaTrader_Marco  
    Started by NtFan, 04-10-2020, 04:05 PM
    5 responses
    57 views
    0 likes
    Last Post jeronymite  
    Started by Chfasano, Yesterday, 06:00 PM
    1 response
    9 views
    0 likes
    Last Post s.kinra
    by s.kinra
     
    Working...
    X