Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 cre8able, Yesterday, 01:16 PM
        3 responses
        11 views
        0 likes
        Last Post cre8able  
        Started by ChartTourist, Today, 08:22 AM
        0 responses
        6 views
        0 likes
        Last Post ChartTourist  
        Started by LiamTwine, Today, 08:10 AM
        0 responses
        2 views
        0 likes
        Last Post LiamTwine  
        Started by Balage0922, Today, 07:38 AM
        0 responses
        5 views
        0 likes
        Last Post Balage0922  
        Started by JoMoon2024, Today, 06:56 AM
        0 responses
        6 views
        0 likes
        Last Post JoMoon2024  
        Working...
        X