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 CaptainJack, 05-29-2026, 05:09 AM
          0 responses
          234 views
          0 likes
          Last Post CaptainJack  
          Started by CaptainJack, 05-29-2026, 12:02 AM
          0 responses
          150 views
          0 likes
          Last Post CaptainJack  
          Started by charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          162 views
          1 like
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          243 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          198 views
          0 likes
          Last Post CarlTrading  
          Working...
          X