NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 09-16-2008, 12:57 PM   #1
coasty
Junior Member
 
Join Date: Sep 2008
Posts: 4
Thanks: 0
Thanked 0 times in 0 posts
Default SendMail()

I have a strategy that I've set up for AutoTrading. Inside OnBarUpdate, I have some conditionals that fire off orders. The orders are being generated and submitted correctly; however, I also have a SendMail() line in there to send email alerts when these orders are generated. The "Test Mail" function in Tools -> Options works, so I know the SMTP is set up correctly. However, no mail is being generated when orders are submitted, and no entries are being made in the log. Any suggestions on where to look from here?
coasty is offline  
Reply With Quote
Old 09-16-2008, 01:02 PM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Are you sending mail from and to the correct email account? You may want to check on your ISP's end to see if they are blocking any mail. If there are no errors in NinjaTrader it means the mail has left the software and is probably getting snagged elsewhere.
NinjaTrader_Josh is offline  
Reply With Quote
Old 09-16-2008, 01:11 PM   #3
coasty
Junior Member
 
Join Date: Sep 2008
Posts: 4
Thanks: 0
Thanked 0 times in 0 posts
Default

Yes, I'm sending via the correct email accounts. As mentioned, the test emails send properly (and the fact that a test mail has been sent is logged). However, in this case no errors or anything whatsoever are being logged, there is simply no mail being sent.
coasty is offline  
Reply With Quote
Old 09-16-2008, 01:14 PM   #4
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Then you will need to debug your strategy logic to see if mail is even suppose to be sent. Use Print() to see if the mail is suppose to be sent. Again, if it was suppose to be sent and the function was triggered with no errors that means the mail has went out and is getting snagged outside of the software. Test mail working doesn't mean your email won't get snagged for any other reason.
NinjaTrader_Josh is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add chart to SendMail() zphinx General Programming 16 03-27-2010 05:21 AM
Sendmail Test astrolobe Miscellaneous Support 1 06-02-2008 10:45 PM
SendMail BIGRED Automated Trading 3 04-08-2008 10:17 AM
SendMail error monpere Strategy Development 7 01-04-2008 03:04 PM
SendMail() Doesn't work fetus Strategy Development 2 07-20-2007 01:27 PM


All times are GMT -6. The time now is 07:54 PM.