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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      70 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      152 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X