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 judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    59 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    21 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    10 views
    0 likes
    Last Post cre8able  
    Working...
    X