Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Add Tabname to alert message
Collapse
X
-
Hello Uregon,
Thanks for writing in.
We do not have any sample code for getting the text of a tab in a strategy to use in an alert. Instead, you could consider adding the name of the instrument in the message string when setting up your alert.
See this help guide page for more information about Alert(): https://ninjatrader.com/support/helpGuides/nt7/alert.htm
Let us know if we may assist further.
Last edited by NinjaTrader_BrandonH; 10-28-2021, 08:31 AM.Brandon H.NinjaTrader Customer Service
-
NinjaTrader_BrandonH How an I show the timeframe from the Chart in my alert protocoll. 5Minute timeframe and so on. shown as message notification.
Comment
-
Hello Uregon,
Thanks for your note.
I see this is posted in the NinjaTrader 7 - Strategy Development section of the forums. Did you mean to post this in the NinjaTrader 8 - Strategy development section of the forums?
In regard to your initial inquiry, NinjaTrader 7 does not contain chart tabs. Also, we do not have documented code to get the tab name in NinjaTrader 8. However, this could be accomplished using undocumented code in NinjaTrader 8. Note that using undocumented code would not be supported.
For example, see below
ChartControl.Dispatcher.InvokeAsync(new Action(() => {
Print((ChartControl.OwnerChart.MainTabControl.Sele ctedContent as ChartTab).ActualTabName);
}));
To get the chart interval (timeframe) that a strategy is running on, you could use BarsPeriod. If you enabled the strategy on a 5-minute ES 12-21 chart, then BarsPeriod would refer to the 5-minute interval. For example, see below.
Print("BarsPeriod: " + BarsPeriod);
Also, see this help guide for more information: https://ninjatrader.com/support/help...barsperiod.htm
Let us know if we may assist further.
Brandon H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by GussJ, 03-04-2020, 03:11 PM
|
16 responses
3,281 views
0 likes
|
Last Post
by Leafcutter
Today, 04:14 PM
|
||
Started by WHICKED, Today, 12:45 PM
|
2 responses
19 views
0 likes
|
Last Post
by WHICKED
Today, 03:36 PM
|
||
Started by Tim-c, Today, 02:10 PM
|
1 response
9 views
0 likes
|
Last Post Today, 02:52 PM | ||
Started by Taddypole, Today, 02:47 PM
|
0 responses
5 views
0 likes
|
Last Post
by Taddypole
Today, 02:47 PM
|
||
Started by chbruno, 04-24-2024, 04:10 PM
|
4 responses
53 views
0 likes
|
Last Post
by chbruno
Today, 02:38 PM
|
Comment