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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    98 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    142 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    69 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    125 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    77 views
    0 likes
    Last Post PaulMohn  
    Working...
    X