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 CarlTrading, 03-31-2026, 09:41 PM
          1 response
          127 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          73 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          115 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          109 views
          1 like
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          88 views
          0 likes
          Last Post CarlTrading  
          Working...
          X