Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi instrument strategy

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

    Multi instrument strategy

    Hi, I would like to add a 2nd instrument to a strategy and could use some help. I went to this link http://www.ninjatrader-support.com/H...ameInstruments but it must have been changed because it had nothing about programming. If someone could point me in the right direction it would be appreciated.

    #2
    Hello snotrag12,

    Thank you for your post.

    You can find information on multiple time frames and instruments in NinjaScript at the following link: http://www.ninjatrader.com/support/h...nstruments.htm

    Please let me know if I may be of further assistance.

    Comment


      #3
      Coding problem

      I generated a simple strategy via wizard: If close is greater than previous close plus offset enter short. I then unlocked the code and added the ^Vix daily, line 40. No problem. I then tried to change line 51: If close of ^Vix is greater than previous close of ^Vix plus offset enter short. I tried to add the ^Vix with BarsArray. Didn't work. Perhaps you could straighten out my mistake on this. I've enclosed a screenshot of the offending code.

      thanks for your help
      Attached Files

      Comment


        #4
        Hello snotrag12,

        Thank you for your response.

        You can use Closes to access the additional bar series that have been added to your code: http://www.ninjatrader.com/support/h...nt7/closes.htm

        Please review the link above for information on Closes.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        67 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        60 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X