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 Mindset, 04-21-2026, 06:46 AM
|
0 responses
87 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
134 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
118 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
67 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment