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!
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
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.JimNinjaTrader Customer Service
-
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 CortexZenUSA, Today, 12:53 AM
|
0 responses
1 view
0 likes
|
Last Post
by CortexZenUSA
Today, 12:53 AM
|
||
Started by CortexZenUSA, Today, 12:46 AM
|
0 responses
1 view
0 likes
|
Last Post
by CortexZenUSA
Today, 12:46 AM
|
||
Started by usazencortex, Today, 12:43 AM
|
0 responses
5 views
0 likes
|
Last Post
by usazencortex
Today, 12:43 AM
|
||
Started by sidlercom80, 10-28-2023, 08:49 AM
|
168 responses
2,266 views
0 likes
|
Last Post
by sidlercom80
Today, 12:05 AM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
3 responses
13 views
0 likes
|
Last Post Yesterday, 11:58 PM |
Comment