Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EMA to SMA in RSI default.

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

    EMA to SMA in RSI default.

    Hi
    I want to change the smoothed ave that is plotting over the RSI in the default RSI indicator from an EMA to an SMA. Can someone advise what i need to change in the code and where to make it do to this please?
    Thanks
    Swing

    #2
    Hello Swing123,

    Thanks for your post.

    The RSI already uses an SMA.

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      I'm talking about the "smooth" average that plots over the top of the RSI in the default indicator. That is an ema. If you open an RSI - it has a standard 3 period smoothing (i.e. a 3 period moving average). If you plot that as visable and then plot a seperate sma over the top of the rsi (based on the rsi), you find that the "built it" average is an ema. Plot a seperate ema and they are identical.

      Comment


        #4
        Hello Swing123,

        After further review, I missed that while the RSI is using an SMA it also has been coded using exponential constants.

        If you want to change this in the code, that is possible.

        To make the change, you would need to create and rename a copy of the RSI.

        In the copied RSI, look for the last line of Avg[0] = constant1 * value0 + constant2 * Avg[1];

        You can change that line to Avg[0] = SMA(Default, Smooth)[0];

        After making the change, right mouse click on the code to compile.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Fantastic! Thanks Paul.

          Comment


            #6
            Works great. Thank you.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Mongo, Today, 11:05 AM
            4 responses
            14 views
            0 likes
            Last Post Mongo
            by Mongo
             
            Started by traderqz, Today, 12:06 AM
            7 responses
            13 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by Skifree, Today, 03:41 AM
            5 responses
            13 views
            0 likes
            Last Post Skifree
            by Skifree
             
            Started by traderqz, Yesterday, 09:06 AM
            5 responses
            34 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by guillembm, Today, 11:25 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X