Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart.OnChartScroll callback for mouse wheel or slider scrolled chart?

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

    Chart.OnChartScroll callback for mouse wheel or slider scrolled chart?

    [SOLVED]
    Sorry it was the logic I was using to calculate the labels X coordinate that created the illusion OnRender was not being called.

    I discovered chartControl.CanvasLeft chartControl.CanvasRigh for the X coordinate. Working as expected.



    Hello

    I would like some drawing (tool) object's OnRender method to be called when mouse wheel or slider scrolls their chart?

    I have labels for price level lines I want to remain rendered against the chart view port left or right edges regardless of where the chart is scrolled.
    They currently work as desired if I manually move the line. But they do not update when the chart is scrolled, they remain in their last OnRender-ed position..

    ChartStyle.OnRender event? (Because obviously the bars re render on scroll)

    How is this achieved?

    Thanks
    Last edited by SmartArtsStudio; 05-15-2021, 11:31 PM.

    #2
    Hello SmartArtsStudio,

    Glad you were able to work out a solution.

    As a tip our first suggestion is to start simple and use prints outside of any conditions when engaging an issue.


    Any interaction with a chart, clicking on, scrolling, zooming, changing the scale, etc, will all trigger OnRender().
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    603 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    349 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    104 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    560 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    560 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X