Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Instrument determine Instrument for entry

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

    Multi Instrument determine Instrument for entry

    I am running one (!) multi-timeframe strategy now with a) JPN225 and JPYUSD and b) HKD33 and HKDUSD. The respective currency depends on the index selected.

    With the latter order entries are executed for the HKDUSD instead of the index instrument. With the JPN225 orders are executed for the index as desired.

    How is this determined when the trigger is GetCurrentAsk(0) for both? And more importantly how can I change that to a reliable execution of orders on the index?

    #2
    Hello P-Sionic,

    Thank you for writing in.

    Just to clarify, when adding multiple series to a strategy, each will have their own index; no two series will have the same index.

    So, for example, if you're running the strategy on a JPN225 chart, and you have added JPYUSD, HKD33, and HKDUSD (in this order in Initialize()), each instrument will have the following indexes:

    JPN225: 0
    JPYUSD: 1
    HKD33: 2
    HKDUSD: 3

    If you would like to refer to a specific instrument with GetCurrentAsk(), you'll use one of the indexes shown above.

    GetCurrentAsk(0) would be referring to the current ask price of JPN225. GetCurrentAsk(1) would be referring to JPYUSD, so on and so forth.

    If you would like to submit an entry to a specific index, you'll want to use the overload of your entry method that asks for a barsInProgressIndex.

    For example, with EnterLong():
    Code:
    // first parameter asks for the barsInProgressIndex, second parameter asks for the
    // quantity, and the last parameter asks for a signal name
    EnterLong(1, 1, "Entry");


    I would highly suggest taking a look at this help guide for further information about working with multiple time-series/multiple instruments in one script: https://ninjatrader.com/support/help...nstruments.htm

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X