Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 Jon17, Today, 04:33 PM
    0 responses
    1 view
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    4 views
    0 likes
    Last Post Javierw.ok  
    Started by timmbbo, Today, 08:59 AM
    2 responses
    10 views
    0 likes
    Last Post bltdavid  
    Started by alifarahani, Today, 09:40 AM
    6 responses
    40 views
    0 likes
    Last Post alifarahani  
    Started by Waxavi, Today, 02:10 AM
    1 response
    18 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Working...
    X