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 SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
36 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|
||
|
Started by CarlTrading, 07-05-2026, 01:16 PM
|
0 responses
20 views
0 likes
|
Last Post
by CarlTrading
07-05-2026, 01:16 PM
|
||
|
Started by CaptainJack, 06-17-2026, 10:32 AM
|
0 responses
14 views
0 likes
|
Last Post
by CaptainJack
06-17-2026, 10:32 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:15 AM
|
0 responses
19 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:15 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:06 AM
|
0 responses
22 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:06 AM
|

Comment