Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Relative Strength Line

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

    Relative Strength Line

    I am looking for an indicator that plots a securities price to an index (such as SPY). It would be a simple calculation of (securities price/SPY price) and thus would plot a number. Showing relative weakness/strength. I have searched around to see if anyone has made that or if I missed it within NT8 indicators. Thanks for any help!

    edit: similar to this - https://stockcharts.com/school/doku....price_relative

    #2
    Hello Stok,
    Thanks for your post.

    Generally it is against out policy to create, debug, or modify code. A similar script has been requested several times, so I am going to go ahead and create this script as a courtesy.

    I will post it here when I am done.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_JoshG View Post
      Hello Stok,
      Thanks for your post.

      Generally it is against out policy to create, debug, or modify code. A similar script has been requested several times, so I am going to go ahead and create this script as a courtesy.

      I will post it here when I am done.
      Thanks Josh!

      Comment


        #4
        Here you go. This sample uses the SPY, but could easily be modified to compare any two instruments.

        To Import:
        1. Download the attached file to your desktop.
        2. From the NinjaTrader Control Center select the menu Tools > Import > NinjaScript Add On...
        3. Select the downloaded file.

        Let me know if you have any questions.
        Attached Files
        Josh G.NinjaTrader Customer Service

        Comment


          #5
          Thanks Josh!! I'll play around with it :-)

          Comment


            #6
            Just wanted to also say thanks for making this! It helped me learn how to do it.

            Comment


              #7
              Hi Guys,

              Basis this thread, I am trying to use the relative strength indicator for my research work but am not sure on how to change the comparative symbol to any other symbol. Secondly I dont know how to change the # of days for which I want the symbol/comparative symbol calculation to reflect for me.

              Below is the screen shot from in.tradingview, added it as a link and do see the attachement as well



              Attached Files
              relative symbol (TCS divided by Nifty for 55 days (example)

              Comment


                #8
                Originally posted by vikkasm View Post
                Hi Guys,

                Basis this thread, I am trying to use the relative strength indicator for my research work but am not sure on how to change the comparative symbol to any other symbol. Secondly I dont know how to change the # of days for which I want the symbol/comparative symbol calculation to reflect for me.

                Below is the screen shot from in.tradingview, added it as a link and do see the attachement as well


                hey Guys any help or update on the above thread please

                Comment


                  #9
                  Hello vikkasm,
                  You need to modify the code so it adds Nifty as currently its using SPY, this is not provided as user configurable so you don't find it in settings. Just replace "SPY with "NIFTY" in line 49 & you will get the plots, hope it helps!

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  656 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  371 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  109 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  574 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  579 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X