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 Jon17, Today, 04:33 PM
    0 responses
    1 view
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    4 views
    0 likes
    Last Post Javierw.ok  
    Started by timmbbo, Today, 08:59 AM
    2 responses
    10 views
    0 likes
    Last Post bltdavid  
    Started by alifarahani, Today, 09:40 AM
    6 responses
    40 views
    0 likes
    Last Post alifarahani  
    Started by Waxavi, Today, 02:10 AM
    1 response
    19 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Working...
    X