Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Plotting 3 plots in separate SUB-PANELS below the Price

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

    Plotting 3 plots in separate SUB-PANELS below the Price

    Hello,
    Hoping some one can guide me and provide a sample code to achieve the following

    1. I have 3 values that I need to plot in 3 SEPARATE sub panels below the Price panel.

    The NT8 code is as follows


    ....

    protected override void OnStateChange()
    {

    if (State == State.SetDefaults)
    {
    var colorAvg = Brushes.Blue;
    AddPlot(colorAvg, "PLOT1");
    Plots[0].Width = 3;
    Plots[0].PlotStyle = PlotStyle.Bar;
    Plots[0].Brush = Brushes.CornflowerBlue;

    AddPlot(colorAvg, "PLOT2");
    Plots[1].Width = 3;
    Plots[1].PlotStyle = PlotStyle.Bar;
    Plots[1].Brush = Brushes.Gold;

    AddPlot(colorAvg, "PLOT3");
    Plots[2].Width = 3;
    Plots[2].PlotStyle = PlotStyle.Bar;
    Plots[2].Brush = Brushes.Orange;
    }
    }

    .....

    protected override void OnBarUpdate()
    {
    ....
    Value[0][0] = someVar1;
    Value[1][0] = someVar2;
    Value[2][0] = someVar3;


    Really would appreciate someone to guide how to put these on a separate individual sub-panels below the price panel... right now they all plot on the same sub-panel below the price


    Thanx

    #2
    Hello sardana,

    Thanks for your post.

    You can only access one indicator panel from your script and all of the plots of that script would be within that single panel.

    To accomplish your goal of 3 plots in 3 separate indicator panels would require three separate indicators.
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by nandhumca, Yesterday, 03:41 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by The_Sec, Yesterday, 03:37 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by vecnopus, Today, 06:15 AM
    0 responses
    1 view
    0 likes
    Last Post vecnopus  
    Started by Aviram Y, Today, 05:29 AM
    0 responses
    5 views
    0 likes
    Last Post Aviram Y  
    Started by quantismo, 04-17-2024, 05:13 PM
    3 responses
    27 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X