Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Setting ChartScales Range programmatically

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

    Setting ChartScales Range programmatically

    Hello!

    I've got a bunch of indicators that plot below the chart panel. When I load them on a chart, the ranges of their scales are set to 'Automatic' by default.

    I've looked at the NinjaTrader documentation about ChartPanel, Scales, and PanelIndex, but I didn't understand how to put all the pieces together.

    Specifically, I'd like to set the scales of these indicators to 'Fixed' from within the indicator code and set the upper MaxValue and the lower MinValue that indicate the maximum and the minimum Y value of objects within the chart panel.

    How should I do that?

    #2
    Hello, thanks for writing in.

    You can override the OnCalculateMinMax event to set a custom price range for your indicators panel:



    This event is triggered when the chart scale is adjusted.

    Kind regards,

    -ChrisL

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    168 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    324 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    250 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    350 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    179 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X