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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        67 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        60 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X