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