Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cannot implicitly convert type RSI to type double

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

    Cannot implicitly convert type RSI to type double

    Hi there,
    would you please help me out here with coding issue? Many thanks!

    private Series<double> rsi1 , rsi2;

    rsi1 = RSI(Closes[0],14,1);
    rsi2 = RSI(Closes[1],14,1) ;
    Value[0] = rsi1[0] - rsi2[0];

    However, it always generates an error "Cannot implicitly convert type RSI to type double".​

    #2
    Hello judysamnt7,

    Declare rsi1 and rs2 as RSI.

    private RSI rsi1, rsi2;
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Chelsea,
      If declare them as RSI, can I still use
      Value[0] = rsi1[0] - rsi2[0];
      to calculate the difference and AddPlot based on this difference?

      Comment


        #4
        Hello judysamnt7,

        Yes, you can still use plot values with indexes.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          got you and it works. Thank you!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          558 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          324 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
          545 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          547 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X