Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Fixed Y-axis with Autoscroll
Collapse
X
-
Fixed Y-axis with Autoscroll
I am trying to make an indicator that controls the price y-axis of the main data series so that price stays w/i a fixed range (like 10 points) and when price moves to the upper / lower part of the chart it will re-center automatically. How do I override the chartscale of main data series to do this? Currently I can only make the series wider, but not narrower than the bars shown on the chartTags: None
-
Hello habibalex,
Thanks for your post.
You may wish to consider using the Data Series "Center price on scale" property. OnCalculateMinMax will allow us to adjust how the indicator is fit when AutoScale is enabled, but this would not allow us to narrow the scale past other chart objects that use AutoScale.
More information on OnCalculateMinMax can be found here - https://ninjatrader.com/support/help...lateminmax.htm
You could also consider trying to modify ChartScale.Properties to set the range to Fixed and to adjust the Max and Min from there. Please note that as the Help Guide mentions, these are user controlled properties, and attempting to change them programmatically may not be guaranteed.
ChartScale.Properties - https://ninjatrader.com/support/help...properties.htm
We look forward to assisting.
-
Here is an indicator that allows a chart to have a fixed size y-axis and automatically re-center when price gets near the margin:
Last edited by habibalex; 12-30-2022, 09:46 PM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
656 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
371 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
579 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment