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

Spread value (a minus b)

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

    Spread value (a minus b)

    Hi,

    I may be attempting to do something easy in a complex way.

    What I want is to plot the difference between the Nasdaq and S&P500 futures contracts (e.g. NQ 12-10 = 2165.25, ES 12-10 = 1197.75, difference = 967.5.

    I want to be able to plot this for any time period and value (i.e. 1, 3, 5 minute, daily, etc).

    I can open and chart the two instruments but I cannot see how to access both Data Series within an Indicator.

    The alternative is to open one chart and to Add() another instrument. The problem with doing this is that I cannot identify the time period type or value because the original values are not accessible until after the Initialize() section.

    Help !

    Thanks,
    Eric

    #2
    Hello Eric,

    You can see a sample multi series implementation by clicking tools > edit NinjaScript > Strategy > Sample MultiInstrument.

    Documentation is available here:


    There are several spread indicators available in the file sharing section. Perform a search for spread and Pairs Trading Suite to find these.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by hazylizard, Today, 08:38 AM
    3 responses
    10 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by geddyisodin, Today, 05:20 AM
    2 responses
    18 views
    0 likes
    Last Post geddyisodin  
    Started by Max238, Today, 01:28 AM
    5 responses
    47 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by giulyko00, Yesterday, 12:03 PM
    3 responses
    13 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by habeebft, Today, 07:27 AM
    1 response
    16 views
    0 likes
    Last Post NinjaTrader_ChristopherS  
    Working...
    X