Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy disabled detection
Collapse
X
-
Hello johnman,
Thank you for your reply.
You wouldn't be able to use Share() while the strategy is in anything other than State.Realtime unfortunately, which is what you'd need to send a text or email. Theoretically, you could use a public static variable that gets updated when the state is Terminated, however. I will work up an example and get that posted for you.
Thanks in advance; I look forward to assisting you further.
Comment
-
Hello johnman,
Thank you for your patience.
I'm attaching a file you can import that contains three demonstration scripts. First, there is an addon script in which we create a static bool variable. There is also an indicator that would need to be applied to the chart (StrategyTerminatedAlert), then the actual Strategy itself (ExampleOnTerminatedStrategy). You'll want to open up the indicator and replace my test email address with your actual email, and you would need to set up the email in Tools > Options > General > Share Services if you've not already set that up. Obviously you could replace the method of alert with another alert method of your preference, but for simplicity's sake I chose email for this example.
Once you've imported the attached file and set up the email, you'll want to apply the indicator to the chart first, then the strategy. You can test if the email is working by toggling the strategy on and off from the Strategies tab of the control center - you should get an email each time the strategy is toggled if you've set up the email correctly.
Here's a link to our forums that goes over the necessary setup needed for email:
Below is a list of known e-mail settings and information demonstrating configuring e-mail alerts within NinjaTrader. Included are settings which have been tested with basic accounts. Please ensure that your settings are configured identically to those included, as some only use the beginning of the e-mail address and do not
Please let us know if we may be of further assistance to you.Attached Files
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, 03-13-2026, 05:17 AM
|
0 responses
95 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
153 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
80 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
54 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
70 views
0 likes
|
Last Post
|
Comment