P.S. It is enough to receive a signal that there is a record of an error in the strategy. It is not necessary to receive the error content.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Messages from the Log tab to email
Collapse
X
-
Messages from the Log tab to email
Hi guys! How can I organize receiving messages from the Log tab to email? And not all messages, but only "Error" (orange) and "Alert" (red). I would be grateful for the lines of code. Thanks.
P.S. It is enough to receive a signal that there is a record of an error in the strategy. It is not necessary to receive the error content.Last edited by Kostiantyn; 02-01-2021, 01:58 PM.Tags: None
-
Hello Kostiantyn,
Thank you for your post.
You would need to set up your email as a share service first to send notifications to your email..
To do so please follow the instructions below.- In the Control Center, select Tools > Options.
- In the General tab of the Options menu locate 'share services'.
- Click 'add share service...'
- First, select Email followed by clicking 'add'.
- In the Configured section select 'Email'.
- Adjust the Properties section to include your information.
- Click Apply.
- Click OK.
General tab - https://ninjatrader.com/support/help...eralProperties
For emailing errors, you could use a try/catch block to trap errors and email them using the Share() method or the SendEmail() method. Please note that it is suggested to call CloseStrategy() or SetState(State.Terminated) if trapping exception errors with a try/catch block. Also, note that hiding errors with a try/catch block is not advised.
See the example script in the help guide documentation below about using try/catch blocks.
Using Try/Catch Blocks - https://ninjatrader.com/support/help...tch_blocks.htm
Also, see the help guide documentation below for more information.
Share() - https://ninjatrader.com/support/help.../nt8/share.htm
SendEmail() - https://ninjatrader.com/support/help...8/sendmail.htm
Please let us know if we may assist further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
53 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
130 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
70 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
44 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
49 views
0 likes
|
Last Post
|

Comment