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
to create an NinjaTrader native alert promatically
Collapse
X
-
Tags: None
-
You may find this is what you are looking for: https://ninjatrader.com/support/help.../nt8/alert.htm
Thanks.
-
Originally posted by jeronymite View PostYou may find this is what you are looking for: https://ninjatrader.com/support/help.../nt8/alert.htm
Thanks.
I was hoping to set up Ninjatrader native alert with triggering logic configured, so that I don't need to write this triggering logic myself.
Comment
-
Hello leontancfa,
Thanks for your post.
To create alerts programmatically in a custom NinjaScript, you would need to code the logic into your script that triggers the alert to fire and call the Alert() method.
The Strategy Builder could be used to set up the condition(s) to trigger the alert and call the Alert() method. Then, you could click the 'View code' button to see the generated syntax.
See the help guide documentation below for more information.
Alert(): https://ninjatrader.com/support/help.../nt8/alert.htm
Conditions: https://ninjatrader.com/support/help...on_builder.htm
Actions: https://ninjatrader.com/support/help...t8/actions.htm
Let us know if we may assist further.Brandon H.NinjaTrader Customer Service
Comment
-
@NinjaTrader_BrandonH:
This is not a satisfying response as there is no reference at all on any object usable from c#.
There is no place we can find sample on how to set an alert programmaticaly.
There are no reference available on some objects used by the alerts. Condition for exampl, AlertConditionItem is another example.
Comment
-
Hello Philippe56140,
The help guide provides a code example. Scroll to the bottom of the help guide page.
Code:if(RSI(14, 3)[0] >= 20) Alert("myAlert", Priority.High, "Reached threshold", NinjaTrader.Core.Globals.InstallDir+@"\sounds\Aler t1.wav", 10, Brushes.Black, Brushes.Yellow);
Where you have mentioned:
There are no reference available on some objects used by the alerts.
Alerts have a string message that appears in the Alerts Log window, and can play a sound. When you say available objects, use ToString() on the object if you want to put text about the object in the message.
Code:Alert("myAlert", Priority.High, [B]order.ToString()[/B], NinjaTrader.Core.Globals.InstallDir+@"\sounds\Aler t1.wav", 10, Brushes.Black, Brushes.Yellow);
Note, programmatically means programmed with code in C#. There is also the Alerts window, if you want to set up alerts on a chart with a point and click interface.
Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by lorem, Today, 09:18 AM
|
0 responses
2 views
0 likes
|
Last Post
by lorem
Today, 09:18 AM
|
||
Started by hazylizard, Today, 08:38 AM
|
4 responses
11 views
0 likes
|
Last Post
by hazylizard
Today, 09:16 AM
|
||
Started by geddyisodin, Today, 05:20 AM
|
2 responses
20 views
0 likes
|
Last Post
by geddyisodin
Today, 08:44 AM
|
||
Started by Max238, Today, 01:28 AM
|
5 responses
47 views
0 likes
|
Last Post
by Max238
Today, 08:30 AM
|
||
Started by giulyko00, Yesterday, 12:03 PM
|
3 responses
13 views
0 likes
|
Last Post Today, 08:26 AM |
Comment