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

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 cls71, Today, 04:45 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post cls71
                  by cls71
                   
                  Started by mjairg, 07-20-2023, 11:57 PM
                  3 responses
                  213 views
                  1 like
                  Last Post PaulMohn  
                  Started by TheWhiteDragon, 01-21-2019, 12:44 PM
                  4 responses
                  544 views
                  0 likes
                  Last Post PaulMohn  
                  Started by GLFX005, Today, 03:23 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post GLFX005
                  by GLFX005
                   
                  Started by XXtrader, Yesterday, 11:30 PM
                  2 responses
                  12 views
                  0 likes
                  Last Post XXtrader  
                  Working...
                  X