which function in script can get this info? Thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to get the current chart data Series info?
Collapse
X
-
How to get the current chart data Series info?
for example, if the current chart is 5 minute, 30 minute, or 1 day.
which function in script can get this info? ThanksTags: None
-
Hello LadGta2018,
Thanks for your post.
This can be found with the BarsPeriod property of the script. This should be accessed only after State.DataLoaded has passed.
BarsPeriod - https://ninjatrader.com/support/help...barsperiod.htm
The instrument can be read from the Instrument object.
Instrument - https://ninjatrader.com/support/help...instrument.htm
We look forward to assisting.
-
Originally posted by NinjaTrader_Jim View PostHello LadGta2018,
Thanks for your post.
This can be found with the BarsPeriod property of the script. This should be accessed only after State.DataLoaded has passed.
BarsPeriod - https://ninjatrader.com/support/help...barsperiod.htm
The instrument can be read from the Instrument object.
Instrument - https://ninjatrader.com/support/help...instrument.htm
We look forward to assisting.
Thanks for your help. Could you show me some code how to get string of Instrument and BarsPeriod? like: "This Chart is SPY 30 Min"
I tried to use:
TextString = "This Chart is " + Instrument.MasterInstrument.Name + BarsPeriod.BaseBarsPeriodValue + "Min";
but I got error:
"operator "+" cannot be applied to operands of type "method group" and "string"
Comment
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
35 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
12 views
0 likes
|
Last Post
by CaptainJack
06-17-2026, 10:32 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:15 AM
|
0 responses
18 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:15 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:06 AM
|
0 responses
20 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:06 AM
|

Comment