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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    157 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    91 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    143 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    130 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    107 views
    0 likes
    Last Post CarlTrading  
    Working...
    X