Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding a button to a chart on a specific price & time

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

    Adding a button to a chart on a specific price & time

    Hi;

    I'm trying to add a button that follows a specified rectangle (drawing object) on my chart.
    I have no issue to create, add, and didsplay the button on the chart but I do not find a way to place if on the top corner left of my rectangle.

    Do you have any tips for it please?

    Best regards

    #2
    Hello TradeForge,

    This would need to be a custom rendered rectangle in OnRender(), and you would be able to control the x and y coordinate.

    The attached test script demonstrates clicking a rectangle.
    RectToMouseXYTest_NT8.zip

    The example linked below demonstrates rendering an a shape that scrolls with the chart.

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      This is exactly what I was looking for, thanks Chelsea

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      66 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