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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    36 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    14 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    19 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    22 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X