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 argusthome, 03-08-2026, 10:06 AM
    0 responses
    78 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    45 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    29 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    64 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X