Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple instruments programming

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

    Multiple instruments programming

    I wonder if there is any way to program a script that scans all the instruments in a given list of instruments. I need this because I'm programming a system that seeks the best pairs of actions for pair trading (testing for probability of cointegration).

    Thanks,
    PH

    #2
    Hi Ph,

    The best way to scan against a list of instruments, is with a custom indicator and a market analyzer window. You can code an indicator to check for any custom condition. Commonly by setting a plot value to 1 when the condition is true and 0 otherwise.

    Then, you can apply a list of instruments to the market analyzer, and setup a filter condition when the value of this indicator = 1.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_RyanM View Post
      Hi Ph,

      The best way to scan against a list of instruments, is with a custom indicator and a market analyzer window. You can code an indicator to check for any custom condition. Commonly by setting a plot value to 1 when the condition is true and 0 otherwise.

      Then, you can apply a list of instruments to the market analyzer, and setup a filter condition when the value of this indicator = 1.
      But in the Market Analyzer window I can program an indicator that analyzes more than one instrument? For example, an indicator that calculates the sum of closing prices of the two instruments.

      Comment


        #4
        You would do this within the indicator, working with multiseries NinjaScript framework.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        647 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        368 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        571 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        573 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X