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 Tim-c, Today, 03:54 AM
    0 responses
    3 views
    0 likes
    Last Post Tim-c
    by Tim-c
     
    Started by FrancisMorro, Today, 03:24 AM
    0 responses
    2 views
    0 likes
    Last Post FrancisMorro  
    Started by Segwin, 05-07-2018, 02:15 PM
    10 responses
    1,771 views
    0 likes
    Last Post Leafcutter  
    Started by Rapine Heihei, 04-23-2024, 07:51 PM
    2 responses
    31 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by Shansen, 08-30-2019, 10:18 PM
    24 responses
    945 views
    0 likes
    Last Post spwizard  
    Working...
    X