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.
    https://ninjatrader.com/support/foru...121#post791121

    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 timmbbo, Yesterday, 10:27 PM
    1 response
    7 views
    0 likes
    Last Post tgn55
    by tgn55
     
    Started by zacharydw00, Yesterday, 11:13 PM
    0 responses
    2 views
    0 likes
    Last Post zacharydw00  
    Started by luxurious_04, Yesterday, 10:55 PM
    0 responses
    1 view
    0 likes
    Last Post luxurious_04  
    Started by 7robert, Yesterday, 07:48 PM
    1 response
    15 views
    0 likes
    Last Post NinjaTrader_EricB  
    Started by saltminer, Yesterday, 06:32 PM
    0 responses
    6 views
    0 likes
    Last Post saltminer  
    Working...
    X