• 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 lavalampmj, Today, 05:25 PM
    0 responses
    4 views
    0 likes
    Last Post lavalampmj  
    Started by Antares66, Today, 05:19 PM
    0 responses
    2 views
    0 likes
    Last Post Antares66  
    Started by jmneto, Today, 05:18 PM
    0 responses
    4 views
    0 likes
    Last Post jmneto
    by jmneto
     
    Started by Bobbyj78, Today, 02:21 PM
    2 responses
    14 views
    0 likes
    Last Post bltdavid  
    Started by EnveousColnago, Today, 02:10 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Ariana  
    Working...
    X