How should I do this in order to email myself a notification if the strategy has ended, due to error or anything else? Is there a simple solution that can utilize the shareservice feature?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Sending an email on strategy end
Collapse
X
-
Sending an email on strategy end
I've tried to set this up such that on state terminated, I send myself an email - but it sends way too many.
How should I do this in order to email myself a notification if the strategy has ended, due to error or anything else? Is there a simple solution that can utilize the shareservice feature?Tags: None
-
Hello Skifree,
State.Terminated is called for many different reasons in a strategies lifecycle. To know the terminated state only when the strategy has ended you would need to use a variable to know the strategy was started. You can read about the lifecycle of a script here: https://ninjatrader.com/support/help...fecycle_of.htm
You can see the sample on that page that starts with //custom flag to help time termination logic. That would be the same process you would need to do in order to catch only the last terminated after the strategy was active. In State.Historical set the bool to true to know the strategy was running and then check for that in State.Terminated.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
50 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
69 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment