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 Tim-c, Today, 03:54 AM
    0 responses
    3 views
    0 likes
    Last Post Tim-c
    by Tim-c
     
    Started by FrancisMorro, Today, 03:24 AM
    0 responses
    2 views
    0 likes
    Last Post FrancisMorro  
    Started by Segwin, 05-07-2018, 02:15 PM
    10 responses
    1,771 views
    0 likes
    Last Post Leafcutter  
    Started by Rapine Heihei, 04-23-2024, 07:51 PM
    2 responses
    31 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by Shansen, 08-30-2019, 10:18 PM
    24 responses
    945 views
    0 likes
    Last Post spwizard  
    Working...
    X