Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Series

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

    Multiple Series

    I have some questions about multiple data series on two different instruments. My strategy is a statistic arbitrage based on cointegration.

    I would like to know how do I specify that I want long the 1st instrument and short the 2nd instrument. I have already added the 2nd instrument in the Initialize block, but not sure how to specific the instrument to be long/short. Ordinarily, for a single instrument, when a condition is met you simple code something like "EnterLong(DefaultQuantity, "long");". So, I think i need to have some way to specify which instrument to get long and short in multi-series, otherwise, only the main instrument will be in effect.

    #2
    Hello,

    You can either filter this based on the BarsInProgress or use the Last overload method for EnterLong()

    For EnterLong() http://www.ninjatrader.com/support/h...?enterlong.htm

    I strongly recommend you fully read all the documentation here as it will inform you how to filter based on different series: http://www.ninjatrader.com/support/h...nstruments.htm

    Let me know if I can be of further assistance.
    LanceNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    388 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    260 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    218 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    301 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    268 views
    0 likes
    Last Post CarlTrading  
    Working...
    X