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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    53 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    34 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    100 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    181 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    170 views
    0 likes
    Last Post CarlTrading  
    Working...
    X