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 DJ888, 04-16-2024, 06:09 PM
            4 responses
            12 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by terofs, Today, 04:18 PM
            0 responses
            9 views
            0 likes
            Last Post terofs
            by terofs
             
            Started by nandhumca, Today, 03:41 PM
            0 responses
            6 views
            0 likes
            Last Post nandhumca  
            Started by The_Sec, Today, 03:37 PM
            0 responses
            3 views
            0 likes
            Last Post The_Sec
            by The_Sec
             
            Started by GwFutures1988, Today, 02:48 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Working...
            X