Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

operator '/' cannot be applied to operands of type.....PriceSeries

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

    operator '/' cannot be applied to operands of type.....PriceSeries

    Hi,
    How can i revise to avoid the error?

    else if (State == State.Configure)
    {
    AddDataSeries("ES DEC23", BarsPeriodType.Day, 1);
    }
    }

    protected override void OnBarUpdate()
    {
    ESvol = ATR(Closes[1], Period)[0] / Closes[0];
    Symbolvol = ATR(Period)[0] / Close[0];

    Value[0] = Symbolvol / ESvol;
    }​

    #2
    Hello trader3000a,

    Please provide the full error message (or a screenshot).

    May I confirm ESvol and Symbolvol have both been declared as doubles?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi,
      Yes, I declared them up top
      Attached Files

      Comment


        #4
        Hello trader3000a,

        Closes[0] is a price series.
        Close[0] or Closes[0][0] would be a double.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          whoops, thx

          Comment

          Latest Posts

          Collapse

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