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

Is there an indicator that can measure the correlation between two instruments?

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

    Is there an indicator that can measure the correlation between two instruments?

    I'd like a lower level indicator that would measure what is the correlation, in the mathematical sense of the word, between two data points, in this case between the price of two instruments, say the Emini S&P and the 30 year bond.

    The math for such correlation is :



    (from wiki)

    So, if there is some inverse correlation for those two instruments say for the last 3000 periods, it would show as -.89 for the current bar, as it compares the prices of those two instruments.

    Not asking anyone to code this for me, but could someone point me in the right direction--where to start?

    #2
    To get started for this project, you could check into the Correlation indicator work already shared here on the forums - http://www.ninjatrader.com/support/f...elation&desc=1

    All the best,
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Forgot to thank you for this. Thanks

      Comment


        #4
        Hmmm, this works like a charm. I thought this would be difficult, but I'm off to an awesome start with this.

        This software is really powerful.

        Comment


          #5
          Thanks for the indicator. I have another question. I would like to study the correlation between an instrument and its indicator, e.g: 30 mins price chart with its 30 mins ADL.

          Here is my set up.

          Under the indicator window, I add
          ADL(symbol (30Min))

          After that, I add Correlation, under the parameters window,
          Symbol 2, I entered ADL("symbol" (30Min))
          Correlation Type, Pearson
          Period, 30
          PeriodPctChange, 1

          And the updated Indicator window shows
          ADL(symbol (30Min))
          Correlation(symbol,,Pearson,30,1)

          However, no correlation value is shown on the chart, can anyone help me?
          Thanks very much!

          Comment


            #6
            Thomas, as far as I'm aware on this custom study, you could really only create correlations between instruments.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by andrewtrades, Today, 04:57 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by chbruno, Today, 04:10 PM
            0 responses
            5 views
            0 likes
            Last Post chbruno
            by chbruno
             
            Started by josh18955, 03-25-2023, 11:16 AM
            6 responses
            436 views
            0 likes
            Last Post Delerium  
            Started by FAQtrader, Today, 03:35 PM
            0 responses
            7 views
            0 likes
            Last Post FAQtrader  
            Started by rocketman7, Today, 09:41 AM
            5 responses
            19 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X