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

RSI Alert

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

    #16
    Hi, I am looking for a very simple RSI indicator that plots an up arrow when RSI crosses above a certain level (34) and a down arrow when it crosses below a certain level (66). Is there a code that I could copy and paste into the original RSI coding and then save it as a new indicator "RSICrossover" ?

    Thanks,
    Ian

    Comment


      #17
      Hello Tradwell385,

      Welcome to the NinjaTrader support forum.

      I would suggest taking a look at some of the user uploads that include RSI to see if any match your description or will fill in for what you want. I was not able to locate one that simply checks if the RSI is above or below but there are some that incorporate SMA's and other indicators to produce signals. You may try looking at the Smarsiv6 indicator on the app share, that seems to have had the closes description that I could find. This can otherwise be created, if you are interested in learning how to do this in NinjaScript I can provide details on that as well.




      If you were to make a condition for this, it would be similar to the following:


      Code:
      if(CrossAbove(RSI(20,3), 34))
      {
           Draw.ArrowDown(this, CurrentBar.ToString(), true, 0, High[0] + TickSize, Brushes.Blue);
      }
      https://ninjatrader.com/support/helpGuides/nt8/crossabove.htm?zoom_highlightsub=crossabove
      https://ninjatrader.com/support/helpGuides/nt8/relative_strength_index_rsi.htm?zoom_highlightsub= rsi
      https://ninjatrader.com/support/helpGuides/nt8/draw_arrowdown.htm




      I look forward to being of further assistance.
      Last edited by NinjaTrader_Jesse; 12-31-2019, 03:42 PM.
      JesseNinjaTrader Customer Service

      Comment


        #18
        Thanks,

        I looked through the user indicators and there isn't anything that I am looking for. I'm looking for a very very very simple way of plotting the arrow on the chart when the RSI crosses those levels. I'm using NT8. It'd be great to be able to code this. It seems like it should be easy to do. TD Ameritrade has this crossover strategy built into its interface, so I figured it should be pretty simple to add to the already existing RSI indicator in NT8. I'd love some guidance on how to add this coding. I tried the above code that you copied, but got all kinds of errors. I use the 14, 3 RSI, wilders.

        Thanks again,
        Ian

        Comment


          #19
          Hello Tradwell385,

          Thank you for the reply.

          I Just wanted to quickly mention that we are in the NT7 sub forum so the links I had provided were based on that detail. In the future for NT8 questions make sure to post to one of the NT8 sub forums so we can get you the correct info.

          NinjaTrader comes with quite a few samples and one strategy which can be used for learning about crossing conditions. The SampleMACrossover is a good way to see how to use indicators in code along with checking a crossing condition. This specifically uses SMA indicators but you could replace that with the RSI.

          The sample places orders but that can be changed to draw if you didn't want to place orders. You can replace the EnterLong and EnterShort with the appropriate drawings that you wanted.

          https://ninjatrader.com/support/help...hlightsub=draw

          We have a video that covers creating a crossover strategy as well which could help with this concept: https://www.youtube.com/watch?v=HCyt90GAs9k

          The same concepts from this video could be used from within an Indicator. An indicator is generally a better choice for marking the chart, a strategy requires more steps to apply and enable it. You could look at the SampleMACrossOver strategy and then take what you have learned from that and use it from within an indicator. It is generally easiest to start learning with a strategy due to the availability of the strategy builder and also the video covering building a strategy.

          I went back and changed the links in the previous post as well to NT8.

          I look forward to being of further assistance.




          JesseNinjaTrader Customer Service

          Comment


            #20
            Originally posted by Tradwell385 View Post
            Hi, I am looking for a very simple RSI indicator that plots an up arrow when RSI crosses above a certain level (34) and a down arrow when it crosses below a certain level (66). Is there a code that I could copy and paste into the original RSI coding and then save it as a new indicator "RSICrossover" ?

            Thanks,
            Ian

            Originally posted by NinjaTrader_Jesse View Post
            Hello Tradwell385,

            Thank you for the reply.
            ​​​​​​

            Jesse,

            I wrote this quick simple code in 5 minutes to draw buy and sell arrow signals on price chart when the RSI crosses the 35 and 65 lines. It will just draw arrows on chart but not plot the RSI though.

            Hope it helps.

            Cheers!

            p.s. CrossAbove overloads are more than 2.
            Attached Files
            Last edited by aligator; 01-02-2020, 10:30 PM.

            Comment


              #21
              Thanks, I really appreciate your help.

              Comment


                #22
                Originally posted by aligator View Post



                ​​​​​​

                Jesse,

                I wrote this quick simple code in 5 minutes to draw buy and sell arrow signals on price chart when the RSI crosses the 35 and 65 lines. It will just draw arrows on chart but not plot the RSI though.

                Hope it helps.

                Cheers!

                p.s. CrossAbove overloads are more than 2.
                Thank You,

                I use different values than the 35/75, can you please make those values inputs, so we do not have to change them in the code? (I use 22.5 and 77.5 so I would need doubles not integers )

                Thank You Again !!!

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by usazencort, Today, 01:16 AM
                0 responses
                1 view
                0 likes
                Last Post usazencort  
                Started by kaywai, 09-01-2023, 08:44 PM
                5 responses
                603 views
                0 likes
                Last Post NinjaTrader_Jason  
                Started by xiinteractive, 04-09-2024, 08:08 AM
                6 responses
                22 views
                0 likes
                Last Post xiinteractive  
                Started by Pattontje, Yesterday, 02:10 PM
                2 responses
                20 views
                0 likes
                Last Post Pattontje  
                Started by flybuzz, 04-21-2024, 04:07 PM
                17 responses
                230 views
                0 likes
                Last Post TradingLoss  
                Working...
                X