Thanks for your help.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Email on Strategy disable ?
Collapse
X
-
Yes, I know how to send a mail but do not forget my original request : "I would like to send a mail when a strategy is disabled". At this time I can not track such an event because logs cannot be read in real time and automatically in a script.
Thanks for your help.
-
NT,
In the sample below I try to use the sendmail function, however, whenever I have an exception the function does not work. Neither of the sendmail functions work, but the print does print the exception to the output window..
Btw, the email functionality does work when there is NO exception.
Here's a sample from the OnBarUpdate:
try {
SendMail("[email protected]","[email protected]", "exception was raised", "Test" );
int test = 10;
test = 10 - 10;
test = 5 / test;
} //End Try Block
catch (Exception e) {
Print(" Exception: " + e.ToString());
SendMail("[email protected]","[email protected]", "OnBarUpdate Exception Executed", "Test " );
}Last edited by tradingGary; 10-10-2010, 07:58 PM.
Comment
-
Bertrand, there were no errors in the logs. I am not an expert reading the trace file, but didn't see anything in there either.
I am using NT7 v22, using replay April 28th 2010, ES 06-10
Here's the exception that is printed in the output window:
Exception: System.DivideByZeroException: Attempted to divide by zero.
Btw, if you look at the code, the sendmail function is executed before the exception happens, but it still does not work.
Very strange.
Thanks,
GaryLast edited by tradingGary; 10-11-2010, 07:11 AM.
Comment
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
608 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
355 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
560 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
561 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment