Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Difference in two instruments

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

    Difference in two instruments

    Hi there.
    How do I code to create a new data series which takes difference between primary series /ES and secondary series /NQ ? I also want apply MACD indicator to this newly created difference series.
    thanks for you help.

    #2
    Hello judysamnt7,

    To make a new data series you can see the following page which shows how to make a Series<double> and set it and use it. https://developer.ninjatrader.com/docs/desktop/seriest

    To pass the data to the MACD you can supply that as the first parameter when calling the macd, MACD(yourSeriesHere

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    87 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    128 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    65 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    117 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X