Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Dynamic setting "horizontal grid lines interval "
Collapse
X
-
Hi joysync, thanks for your question.
This will need to be tested, but we have properties for the chart scale here where you can access the interval of the HorizontalGridlinesInterval
https://ninjatrader.com/support/help...properties.htm
I was able to change the interval type in OnRender like this:
Please let me know if I can assist any further.Code:public class TestIndicator : Indicator { protected override void OnStateChange() { if (State == State.SetDefaults) { //... } else if (State == State.Configure) { AddPlot(Brushes.Yellow, "MyPlot"); } } double myvalue = 0; protected override void OnBarUpdate() { Value[0] = ATR(20)[0]; myvalue = Value[0]; } protected override void OnRender(ChartControl chartControl, ChartScale chartScale) { chartScale.Properties.HorizontalGridlinesInterval = myvalue; } }
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
647 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
368 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 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
571 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
573 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment