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 SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        47 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        22 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        15 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        21 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        23 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X