Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Default OnRender code

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

    Default OnRender code

    Dear Ninjas,

    how does the default OnRender code look like? calling
    Code:
    base.OnRender(chartControl, chartScale);
    recalls the default OnRender behavior even when you add some custom lines to the override OnRender.
    I would like, however, to change this default OnRender code. I want to change the ZOrder of plots dynamically for e.g.

    Greetings

    #2
    Hello seykool,

    Thank you for your note.

    The default code for OnRender is internal to NinjaTrader and would not be publicly accessible. The z-order of the plots will be determined by the order in which the plots are added to the indicator code. The last one added will have the top most z-order.

    For example,

    AddPlot(new Stroke(Brushes.Red), PlotStyle.Bar, "PlotC");
    AddPlot(new Stroke(Brushes.Blue),PlotStyle.Line, "PlotA");

    With the order above, the blue line will be plotted over the Bar/Histogram.

    Please let us know if you need further assistance.

    Comment


      #3
      Hello Kate,

      thanks for clarifying this, good to know. Well then, I probably will have to write an OnRender method that draws the bars by many rectangles.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      580 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      335 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      102 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