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