Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to plot internal series data in OnBarUpdate()?

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

    How to plot internal series data in OnBarUpdate()?

    Hi all,

    I am debugging a custom indicator, which is to modify an exact copy of an existing one.

    The member variables of this indicator has Series data. How I can visualize these data in debugging through it?

    Right now, I can use visual studio to put break points in the code to step through. I also know how to print output messages to the output window. But is there a way to plot these member variables on a plot, preferably side by side with the price bars in the chart?

    Please share how do you visualize the data along debugging. The chart cannot be seen when a break point is hit.

    Many Thanks


    Best Regards
    David WANG

    Code:
    public class ZigZagPlus : Indicator
    {
    private Series<double> zigZagHighZigZags;
    private Series<double> zigZagLowZigZags;
    private Series<double> zigZagHighSeries;
    private Series<double> zigZagLowSeries;
    
    private double currentZigZagHigh;
    private double currentZigZagLow;
    private int lastSwingIdx;
    private double lastSwingPrice;
    private int startIndex;
    private int trendDir;

    #2
    Hello David,

    To visualize a series, use a plot with AddPlot().


    The series will be added to the Values collection.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    581 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    338 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
    554 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    552 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X