Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Coding using specific ETF's

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

    Coding using specific ETF's

    Hello,
    To introduce myself, I'm new to NinjaTrader; I have the free version now but plan on purchasing once I become more familiar with NinjaScript. I have a basic grasp so far, and have experience using MATLAB and Excel. As for my question:
    I'm trying to develop a contrarian strategy using the VIX. I want to use VIX performance to produce orders on SPY. I'm getting a coding error on an if command.
    CrossAbove("VIX", (Bollinger(Sdev, SMA)), 1)
    EnterLong("SPY")

    I'm getting a few errors but can't figur out what's wrong. Am I approaching this incorrectly? Should I declare SPY and VIX somewhere else? Let me know if you need more information.

    Thanks

    #2
    smcclendon3, thanks for the post and glad to see you using NinjaTrader for your strategy works.

    What you would want to create is a so called MultiSeries strategy in our NinjaScript, we ship a dedicated example with the 'SampleMultiInstrument' script installed per default with NT - I would suggest to closely review it's structure first to get started.

    More documentation on this topic can also be found here introducing the framework you would operate in : http://www.ninjatrader.com/support/h...nstruments.htm

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    164 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    319 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    246 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    350 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    179 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X