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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
83 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
45 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
65 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
68 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
57 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment