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