Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to tell a Replay connection in ninjascript?
Collapse
X
-
How to tell a Replay connection in ninjascript?
Hello, NinjaTrader 7 AND 8 please In NinjaScript, how can I discover which account the script is running against...in an Indicator, or Strategy? Could not find this in the documentation... ThanksTags: None
-
Hello Turtle Trader,
Indicators are not run on an account as these are not meant to place orders to any account.
Indicators are designed to do calculations and add plots and other drawings to a chart.
A Strategy does have an Account object.
For NinjaTrader 7, this is undocumented, however the account object is 'Account'.
Below is a link to a forum post with an undocumented example.
For NinjaTrader 8, using the Account object is supported for Addons.
Below are publicly available links to the NinjaTrader 8 help guide on the Account object.
To find if the connection is the Playback connection:
Cbi.Connection.PlaybackConnection != nullChelsea B.NinjaTrader Customer Service
-
.................
well, I need to disable "text to speech" on an indicator during Replay...because at max Replay speed (for backtesting) the voice is overwhelming and is unnecessary....during the regular market speed it is fine...the voice gives information on the bar time for active trading, but for back testing it is a burden on the system.
I found this...it seems to work....in NT7
if (Bars.MarketData.Connection.Name == "Market Replay Connection")
replayConnection = true;
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by sjsj2732, 03-23-2026, 04:31 AM
|
0 responses
154 views
0 likes
|
Last Post
by sjsj2732
03-23-2026, 04:31 AM
|
||
|
Started by NullPointStrategies, 03-13-2026, 05:17 AM
|
0 responses
356 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
393 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
182 views
1 like
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
138 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|

Comment