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 | ||
---|---|---|---|---|
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
2 responses
13 views
0 likes
|
Last Post Today, 02:05 PM | ||
Started by Kaledus, Today, 01:29 PM
|
2 responses
7 views
0 likes
|
Last Post
by Kaledus
Today, 02:04 PM
|
||
Started by frankthearm, Yesterday, 09:08 AM
|
13 responses
45 views
0 likes
|
Last Post
by frankthearm
Today, 01:52 PM
|
||
Started by PaulMohn, Today, 12:36 PM
|
2 responses
16 views
0 likes
|
Last Post
by PaulMohn
Today, 01:48 PM
|
||
Started by Conceptzx, 10-11-2022, 06:38 AM
|
2 responses
56 views
0 likes
|
Last Post
by PhillT
Today, 01:47 PM
|
Comment