Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy on a list of instrument

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

    Strategy on a list of instrument

    I am currently coding my own strategy which works on a basket asset, but I

    don't find any insight about the way strategy works on multiple instruments in

    the Help Guide ...

    For instance : EnterLong(300, "Buy")

    What it is the corresponding code when we have an instrument list of 5 assets in the strategy ?

    #2
    PulseFive, the help guide contains all the information you need for multi-instrument strategies.

    Here is a link to the main multi-instrument page.
    In this link, take a look at the BarsInProgress portions.

    Basically, you need to specify an additional argument (BarsInProgress - the "instrument index") for your entries:
    Code:
    // to submit an order for the 1nd instrument:
    EnterLong(0, 300, "Buy");
    // to submit an order for the 2nd instrument:
    EnterLong(1, 300, "Buy");
    // to submit an order for the 4th instrument:
    EnterLong(3, 300, "Buy");
    AustinNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

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