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 with colored extremes

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

    RSI with colored extremes

    Hi,

    Would some kind & knowledgeable person please be willing to add the required code to the RSI indicator so that OB and OS levels color the RSI line as in TradeStation ?

    TS chart image duly attached.
    Attached Files

    #2
    Moin jtrade, while I'm not aware of an exact port for your version, you could probably 'borrow' the coloring from the Bline indicator in our sharing section of this forum - http://www.ninjatrader-support2.com/...I+color&desc=1
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Moin jtrade, while I'm not aware of an exact port for your version, you could probably 'borrow' the coloring from the Bline indicator in our sharing section of this forum - http://www.ninjatrader-support2.com/...I+color&desc=1
      'Morning to you, Bertrand.

      It would take me hours to fiddle around getting it to work, whilst you could do it in <5 mins with a cappuccino at your side.... I'll even buy you the cappuccino next time I'm in Hamburg.... honest

      (Ahem, it really should already be standard, of course, like in every other charting package ....)

      Comment


        #4
        Here's the TS8 code...

        ... in case anyone is willing to do this.

        #inputs:
        Price( Close ),
        Length( 14 ),
        OverSold( 30 ),
        OverBought( 70 ),
        OverSColor( Cyan ),
        OverBColor( Red ) ;

        variables: MyRSI( 0 ) ;

        MyRSI = RSI( Price, Length ) ;

        Plot1( MyRSI, "RSI" ) ;
        Plot2( OverBought, "OverBot" ) ;
        Plot3( OverSold, "OverSld" ) ;

        { Color criteria }
        if MyRSI > OverBought then
        SetPlotColor( 1, OverBColor )
        else if MyRSI < OverSold then
        SetPlotColor( 1, OverSColor ) ;

        { Alert criteria }
        if MyRSI crosses over OverSold then
        Alert( "Indicator exiting oversold zone" )
        else if MyRSI crosses under OverBought then
        Alert( "Indicator exiting overbought zone" ) ;#

        Btw, I am fully aware that the politically correct stance is "Learn to code yourself" or "Pay a Ninjascript consultant", but with all due respet to Ninja (a) this is a standard feature even on free internet charting programs, let alone the TradeStations of this world & (b) the product's primary purpose is presumably for trading, not learning to program.

        I'll get off my soapbox now... I guess I've probably put paid to any hope of getting any free code..... (not a bad pun actually..)

        Comment


          #5
          jtrade, your request has been noted and I can understand where you're argumenting from - we generally don't offer custom coding, however I'll ask one of our NinjaScript trainees to look into a little bit later US time.
          BertrandNinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_Bertrand View Post
            jtrade, your request has been noted and I can understand where you're argumenting from - we generally don't offer custom coding, however I'll ask one of our NinjaScript trainees to look into a little bit later US time.
            Thank-you, Bertrand.

            Comment


              #7
              Hi jtrade,

              At the request of Bertrand, as a training project, I have created the indicator I believe you are seeking.

              To create an alert on the indicator, you can use the Market Analyzer...


              To import - http://www.ninjatrader-support.com/H...e.html?Import1
              Attached Files
              TimNinjaTrader Customer Service

              Comment


                #8
                Excellent implementation, Tim : thank-you so much !

                J.

                Comment


                  #9
                  Trendline issue

                  Tim or colleague : I use this indicator as shown, ie. with the OS / OB lines both set to 50 to color the RSI above below the 50 line. However, I have an issue with trendlines not plotting below the 50 line (see image1). If I highlight the RSI, the TL can be seen (image2).

                  Is this a code issue, please ?

                  J.

                  NT7.0.1000.5 (same issue in 6.5)
                  Attached Files

                  Comment


                    #10
                    jtrade, that looks more to be an issue with the selected ZOrder for the trendline, would it drawing on top, so have ZOrder 1?
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_Bertrand View Post
                      jtrade, that looks more to be an issue with the selected ZOrder for the trendline, would it drawing on top, so have ZOrder 1?
                      Hi, Bertrand,

                      I don't really understand this ZOrder business, but if I draw a TL on the RSI, which duly disappears below the 50 line, then change the ZOrder it appears. However, the next TL I draw is also invisible below 50, so I have to do this everytime I draw a trendline. I draw many TLs on the RSI.

                      The regular RSI & other indicators do not have this issue, so that's why I thought it must be a coding issue (coded by Tim, posted above) ?

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Tim-c, Today, 03:54 AM
                      0 responses
                      3 views
                      0 likes
                      Last Post Tim-c
                      by Tim-c
                       
                      Started by FrancisMorro, Today, 03:24 AM
                      0 responses
                      2 views
                      0 likes
                      Last Post FrancisMorro  
                      Started by Segwin, 05-07-2018, 02:15 PM
                      10 responses
                      1,770 views
                      0 likes
                      Last Post Leafcutter  
                      Started by Rapine Heihei, 04-23-2024, 07:51 PM
                      2 responses
                      31 views
                      0 likes
                      Last Post Max238
                      by Max238
                       
                      Started by Shansen, 08-30-2019, 10:18 PM
                      24 responses
                      945 views
                      0 likes
                      Last Post spwizard  
                      Working...
                      X