Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order entry strategy to manage multi-leg orders?

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

    Order entry strategy to manage multi-leg orders?

    Hi All,

    I would like to be able to place pairs trades on futures (e.g. buy 1c M6E & sell 1c M6B simultaneously) to replicate the price action of non-USD currencies (long EURGBP in the example). I can do this manually, but it also means I need to manually manage the two trades independently, but two separate SLs and TPs don't function the same as a single SL/TP for the two contracts together. Other platforms allow for complex orders where intermarket spreads are treated the same as multi-leg options entries - single limit order entry price for the basket of contracts, with single SL and TP for the basket as well.

    Without a native way of managing complex orders like these in NT8, I'm considering a strategy that would be able to function in a similar way. I'm fairly resigned to the fact that it will lack the optimization and sophistication of other broker's order routing and execution, but something that at least provides the basic functions would be a huge step up.

    Any ideas?

    Thanks!

    #2
    Hello gravenjp,

    Below is a link to a support article with helpful resources on getting started with C# and NinjaScript.


    You can add an additional data series with a different instrument using AddDataSeries().
    Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.


    Then you can place orders to both instruments by using barsInProgressIndex of each series.

    EnterLong(int barsInProgressIndex, int quantity, string signalName)
    Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.


    if (BarsInProgress == 0 /* && my entry conditions */)
    {
    EnterLong(0, 1, "PrimaryInstrumentEntry");
    EnterLong(1, 1, "SecondaryInstrumentEntry");
    }

    You will need to either set EntriesPerDirection to 2 or use EntryHandling.UniqueEntries with unique signal names.
    Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    81 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    68 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    55 views
    0 likes
    Last Post CarlTrading  
    Working...
    X