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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
156 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
90 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
140 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
130 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
107 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment