Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Drawing buttons on chart hides plots

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

    Drawing buttons on chart hides plots

    I am creating a strategy. When I am drawing buttons on the chart, it is hiding all the plots. If I comment out all the codes related to buttons, the plots become visible again. How do I draw buttons and plots at the same time? Please let me know if any additional information is needed.

    #2
    Hello fawzanalim,

    Thank you for the post.

    In general drawing buttons should not relate to plotting, do you have a sample of the code you had used?

    You can find a sample of adding some simple buttons to a chart here:



    I look forward to being of further assistance.

    Comment


      #3
      Thanks. But I found the source of the problem, and fixed it.

      It's the OnRender method. It hides all the plots unless you call base.OnRender() inside of OnRender method.

      Source:
      If you are using standard Plots along with custom rendering from an indicator or strategy, you will need to ensure to call the base.OnRender() method for those plots to display.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      47 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      23 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      33 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      51 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X