Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Market Analyzer Alert Message
Collapse
X
-
Market Analyzer Alert Message
Is there a way to have this message contain a variable e.g the current value of an indicator?Tags: None
-
Not sure if this is what you need, but you could enter the trigger value into the MA message as text - http://www.ninjatrader-support.com/H...onditions.html
If you want the alert to show you the value of the indicator at the time of the alert, you should custom code this using the Alert() method in the indicator directly.
-
Thank you,
It looks like I need to use the Alert() method.
Alert("myAlert", NinjaTrader.Cbi.Priority.High, "Reached threshold", "Alert1.wav", 10, Color.Black, Color.Yellow);
How do I embed the value of a variable into the message?
How do I set the trigger value and Indicator?
I'm obviously new to this.
Comment
-
You can try something like this in the OnBarUpdate() of your indicator -
Code:protected override void OnBarUpdate() { if (CurrentBar < 1) return; if (Close[0] > Close[1]) Alert("Up", Priority.Medium, "Up with Close value" + " " + Close[0].ToString(), "Alert1.wav", 10, Color.Black, Color.Blue); }
Comment
-
I'm having problems:
protected override void OnBarUpdate()
{
if (CurrentBar < 1) return;
if Plot0.ContainsValue(0) > 0.5
Alert("Up", Priority.Medium, "Up with Close value" + " " + projHigh.ToString(), "Alert1.wav", 10, Color.Black, Color.Blue);
}
I want to trigger on the current value of Plot0 defined earlier in the script
I want to include the current value of the double projHigh defined earlier in the script in the message.
Comment
-
Sorry to keep bugging you.
I'm still getting errors.
protected override void OnBarUpdate()
{
if (CurrentBar < 1) return;
if (Plot0 [0] > 0.5)
Alert("Up", Priority.Medium, "Up with Close value" + " " + projHigh.ToString(), "Alert1.wav", 10, Color.Black, Color.Blue);
}
Comment
-
it's "protected override void OnBarUpdate()" is already in the code at the top.
If I delete the 2nd one I get a whole slew of errors
Indicator\GV_LynnDeesCriteria.cs Type 'NinjaTrader.Indicator.GV_LynnDeesCriteria' already defines a member called 'OnBarUpdate' with the same parameter types CS0111 - click for info 87 28
Comment
-
I did that.
NinjaScript File Error Code Line Column
Indicator\GV_LynnDeesCriteria.cs Expected class delegate enum interface or struct CS1518 - click for info 106 Indicator\GV_LynnDeesCriteria.cs Identifier expected CS1001 - click for info 108 33
Indicator\GV_LynnDeesCriteria.cs Type or namespace definition or end-of-file expected CS1022 - click for info 109 9
Indicator\GV_LynnDeesCriteria.cs The namespace 'NinjaTrader.Indicator' already contains a definition for '?' CS0101 - click for info 108 32
Comment
-
Thanks for all your help.
I don't understand but I hit F5 and it compiled with no errors. Hopefully this will work.
I really appreciate your efforts.
Comment
-
-
Do you have the Alerts window open? It should display in the 'message' field - http://www.ninjatrader-support.com/H...verview40.html
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
628 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
359 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
562 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
568 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment