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 NullPointStrategies, Today, 05:17 AM
    0 responses
    48 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    66 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X