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 on smoothed price

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

    RSI on smoothed price

    Hi everyone

    I want to calculate the RSI on a smoothed price.

    I did the following:

    double smooth = ... ;


    Output.Set(RSI(smooth, p,
    0)) ;

    Why it doesn't work?

    Thank you

    #2
    You can not pass in a double value into any indicator method. You have to pass in any object which implements the IDataSeries interface.

    The DataSeries object does this.

    Here are some references -

    - http://www.ninjatrader-support.com/H...iesObject.html
    - http://www.ninjatrader-support.com/v...ead.php?t=7299
    RayNinjaTrader Customer Service

    Comment


      #3
      I introduced myDataSeries and then I typed:

      myDataSeries.Set((Close[
      0] + 2*Close[1]/3);


      Plot0.Set(RSI(myDataSeries,
      2, 0));

      I get "error overload" and "cannot convert indicator RSI to double".

      Comment


        #4
        try

        Plot0.Set(RSI(myDataSeries, 2, 0)[0]);
        RayNinjaTrader Customer Service

        Comment


          #5
          I tried the example in the link and it doesn't work either!

          myDataSeries.Set(High - Low)[0];

          "operator - cannot be applied"

          Comment


            #6
            Help Guide Typo, I will fix it.

            Should be

            myDataSeries.Set(High[0] - Low[0]);
            RayNinjaTrader Customer Service

            Comment


              #7
              I did the following:

              myDataSeries.Set((Close[
              0] + 2*Close[1])/3);

              Plot0.Set(RSI(myDataSeries, p,
              0)[0]);

              It compiles, but it doesn't plot anything!

              Thank you

              Comment


                #8
                Please see this - http://www.ninjatrader-support.com/v...ead.php?t=3170
                RayNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Touch-Ups, 04-27-2024, 10:36 AM
                3 responses
                29 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by D Trader, 05-02-2017, 09:12 AM
                21 responses
                4,289 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by leojimenezp, 04-20-2024, 05:49 PM
                3 responses
                38 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by algospoke, 04-28-2024, 06:41 PM
                1 response
                13 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by cmtjoancolmenero, 04-25-2024, 03:58 PM
                14 responses
                60 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Working...
                X