Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TASC2015April slow RSI

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

    TASC2015April slow RSI

    Hi

    TASC2015April journal.what i am missing to get the output of SRSI ??
    Attached Files

    #2
    mostly i am missing something


    possibly coded here a similer staff
    Sierra Chart is a professional Trading platform for the financial markets. Supporting Manual, Automated and Simulated Trading.
    Attached Files

    Comment


      #3
      Code:
       public class srsi : Indicator
          {
              #region Variables
              // Wizard generated variables
                  private int period = 14; // Default setting for Period
                  private int emaperiod = 6; // Default setting for Emaperiod
              // User defined variables (add any user defined variables below)
                 private DataSeries SRSI; //The SRSI measures the strength of a security relative to a sixday EMA
                 private DataSeries srs;
                 private DataSeries Averagepositivedifference;
                 private DataSeries Averagenegativedifference;
                 private DataSeries positivedifference;
                 private DataSeries negativedifference;
                 private DataSeries wEMA;
              #endregion
      
              /// <summary>
              /// This method is used to configure the indicator and is called once before any bar data is loaded.
              /// </summary>
              protected override void Initialize()
              {
                  SRSI= new DataSeries(this); //The SRSI measures the strength of a security relative to a sixday EMA
                 srs=new DataSeries(this);
                 Averagepositivedifference=new DataSeries(this,MaximumBarsLookBack.Infinite);
                 Averagenegativedifference=new DataSeries(this,MaximumBarsLookBack.Infinite);
                 positivedifference=new DataSeries(this,MaximumBarsLookBack.Infinite);
                 negativedifference=new DataSeries(this,MaximumBarsLookBack.Infinite);
                 wEMA=new DataSeries(this,MaximumBarsLookBack.Infinite);
                  
                  Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "SRSIPlot0"));
                  Add(new Plot(Color.FromKnownColor(KnownColor.Green), PlotStyle.Line, "EmaSRSI"));
                  Overlay                = false;
              }
      
              /// <summary>
              /// Called on each bar update event (incoming tick)
              /// </summary>
              protected override void OnBarUpdate()
              {
                  // Use this method for calculating your indicator values. Assign a value to each
                  // plot below by replacing 'Close[0]' with your own formula.
                  
                  /*
                  WEMA formula= price today * K + EMA yesterday * (1-K) where K = 2 / (N+1)
      
      Wilder EMA formula = price today * K + EMA yesterday (1-K) where K =1/N
      
      Where N = the number of periods.
                  */
                  double k=2/(emaperiod +1);
                   wEMA.Set(Close[0]*k+EMA(Close,emaperiod-1)[0]*(1-k));
                  //float positive_diff=(Close[0]-wEMA[0]);
                  //float negative_diff=(wEMA[0]+Close[0]);
                  if(Close[0]>EMA(Close,emaperiod)[0])
                  positivedifference.Set(Close[0]-EMA(Close,emaperiod)[0]);
                  
                  else
                  {
                  negativedifference.Set((EMA(Close,emaperiod)[0]-Close[0]));
                  }
                  
                  
                  //if(positivedifference[0]>=0)    
                  Averagepositivedifference.Set(SUM(positivedifference,period)[0]);
                  
                  //if(negativedifference[0]>=0)
                  Averagenegativedifference.Set(SUM(negativedifference,period)[0]);
                  
                      if(Averagenegativedifference[0]!=0)
                      {
                      srs.Set((Averagepositivedifference[0]/Averagenegativedifference[0]));
                      SRSI.Set(100 - (100/(1+srs[0])));
                      }
                      else
                      {
                          SRSI.Set(SRSI.Get(1));
                      }    
                       SRSIPlot0.Set(SRSI[0]);
                      
                  
                  
                  //EmaSRSI.Set(Averagepositivedifference[0]/Averagenegativedifference[0]);
              }
      chart looking non-satisfactory.
      Attached Files

      Comment


        #4
        Hello sumana.m,

        Thank you for your post.

        I will look into this and follow up with you here.

        Comment


          #5
          Originally posted by NinjaTrader_PatrickH View Post
          Hello sumana.m,

          Thank you for your post.

          I will look into this and follow up with you here.

          plz share waiting eagerly

          Comment


            #6
            Originally posted by sumana.m View Post
            plz share waiting eagerly
            plz check if this version is exactly the same as proposed or not
            Attached Files

            Comment


              #7
              Hello sumana.m,

              Thank you for your patience.

              I was waiting to see if the April TASC trader's tip was already created for NinjaTrader, but it has not been. Unfortunately, I do not have access to this article and therefore have no way to properly troubleshoot your code nor compare against the source information.


              Please let me know if you have any questions.

              Comment


                #8
                Maybe this one? Just put it together, testing tomorrow.
                Attached Files

                Comment


                  #9
                  SRSI published

                  I have tested the SRSI and added a signal line. It is available open source for free download here:



                  If you are not an elite member of Big Mike's you may contact me via private message to obtain it. I am not posting it here, because I cannot do the indicator maintenance, if they are posted in different locations.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  571 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  330 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  101 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  548 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  549 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X