Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Setting Y-Axis Range programmatically?
Collapse
X
-
Setting Y-Axis Range programmatically?
I'd like to set the Y-Axis scale to certain offsets from price, say Close[0] + 50 for the Maximum and Close[0] - 50 for the Minimum. Obviously I don't want to do this manually by entering the values in the properties box each time a new bar is updated so I was wondering if there was a way this could be done programmatically. And if there's not, I'd like to make a request to be able to have the y-axis range centered on the Close of each new bar. As in, you enter an offset for the maximum, and an offset for the minimum in the properties window and the y-axis range of your chart is generated off of the close of each new bar.Tags: None
-
Hello chnh1,
Thanks for your post.
Just to cover the basics, in the data series window you can select "center price on scale". If that does not meet your need, yes you can control programmatically.
In the Help guide for the method OnCalculateMinMax() is an example of centering based on the close price +/- 50 ticks. You should be able to use that and modify as needed.
Reference: https://ninjatrader.com/support/help...lateminmax.htmPaul H.NinjaTrader Customer Service
- Likes 1
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by usazencort, Today, 01:16 AM
|
0 responses
1 view
0 likes
|
Last Post
by usazencort
Today, 01:16 AM
|
||
Started by kaywai, 09-01-2023, 08:44 PM
|
5 responses
603 views
0 likes
|
Last Post Today, 12:32 AM | ||
Started by xiinteractive, 04-09-2024, 08:08 AM
|
6 responses
22 views
0 likes
|
Last Post Today, 12:31 AM | ||
Started by Pattontje, Yesterday, 02:10 PM
|
2 responses
21 views
0 likes
|
Last Post
by Pattontje
Yesterday, 11:49 PM
|
||
Started by flybuzz, 04-21-2024, 04:07 PM
|
17 responses
230 views
0 likes
|
Last Post
by TradingLoss
Yesterday, 11:45 PM
|
Comment