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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    569 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 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
    548 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    548 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X