Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot occurrences counting

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

    Plot occurrences counting

    How can I know how many times the Plot of an indicator

    Code:
    AddPlot(new Stroke(Brushes.Salmon, 2), PlotStyle.Dot, "Pivot");
    has been placed in the chart?

    I tried
    Code:
    Print("#Pivots: "+ Pivot.Count);
    ,
    but it prints the total number of bars in the Chart....
    Thank you for your help...
    FVJ

    #2
    Hello FVJ,

    Thanks for your post.

    Value.Count or 'Pivot.Count' indicates the total number of values in the ISeries array of the plot. This value should always be in sync with the CurrentBars array for that series

    There are no documented methods available for specifically retrieving the number of dots placed on the chart by a plot.

    A plot will be placed on the chart each time a new bar is created and OnBarUpdate() is called.

    BarsRequiredToPlot determines how many bars must be on the chart before the plot will display/ By default this value is set to 20. This means the plot would start from the 20th bar on the chart. In this case, you could consider doing CurrentBar - BarsRequiredToPlot to get the number of times the plot was placed on the chart.

    BarsRequiredToPlot: https://ninjatrader.com/support/help...iredtoplot.htm
    Last edited by NinjaTrader_BrandonH; 05-31-2023, 12:20 PM.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3

      Oooookey...
      Thank you Brandon!!
      FVJ

      Comment

      Latest Posts

      Collapse

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