NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


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 07-21-2012, 12:00 PM   #16
comfysofa
Junior Member
 
Join Date: May 2012
Posts: 24
Thanks: 0
Thanked 0 times in 0 posts
Default

Hi, I am using the strategy in real time on a demo account of Ninjatrader.

I have left my computer on throughout so that it can test the strategy, but although there are live trades, the email is not sent. Could you help me out in this? Very desperately need it done :/

Really thanks in advance.
comfysofa is offline  
Reply With Quote
Old 07-22-2012, 11:18 AM   #17
comfysofa
Junior Member
 
Join Date: May 2012
Posts: 24
Thanks: 0
Thanked 0 times in 0 posts
Default

Anyone can help?
comfysofa is offline  
Reply With Quote
Old 07-22-2012, 09:37 PM   #18
koganam
Senior Member
 
Join Date: Feb 2008
Location: Durham, North Carolina, USA
Posts: 3,219
Thanks: 24
Thanked 1,231 times in 1,002 posts
Send a message via Skype™ to koganam
Default

Quote:
Originally Posted by comfysofa View Post
Anyone can help?
First look in your log for any error messages. If you do not see any, or they are unintelligible, use try/catch blocks to trap the full exception.
koganam is offline  
Reply With Quote
Old 07-22-2012, 10:18 PM   #19
sledge
Senior Member
 
Join Date: Aug 2010
Location: Washington, D.C.
Posts: 1,190
Thanks: 180
Thanked 302 times in 260 posts
Default

Quote:
Originally Posted by comfysofa View Post
Hi, I am using the strategy in real time on a demo account of Ninjatrader.

I have left my computer on throughout so that it can test the strategy, but although there are live trades, the email is not sent. Could you help me out in this? Very desperately need it done :/

Really thanks in advance.
I'm not sure , but the DEMO account probably is blocking.

You should go live.
sledge is online now  
Reply With Quote
Old 07-22-2012, 10:22 PM   #20
sledge
Senior Member
 
Join Date: Aug 2010
Location: Washington, D.C.
Posts: 1,190
Thanks: 180
Thanked 302 times in 260 posts
Default

Quote:
Originally Posted by sledge View Post
I'm not sure , but the DEMO account probably is blocking.

You should go live.
Is this in a strategy?

You could bypass NT (hopefully) by google "C# how to email"

that might give you this code:


/*
MailMessage mail = new MailMessage();
mail.To.Add("sledge@ninjatraderz.com");
mail.From = new MailAddress ("From:Someone"); //txtFrom.Text;
mail.Subject = "Subject:We sold";//txtSubject.Text;
mail.Body = "Body:" + Close[0]; //txtBody.Text;
SmtpClient smtp = new SmtpClient("smtp.somewhere.net");
smtp.Send(mail);
*/

use with caution, else you might get black listed by your isp. (ie, flooding the server with 1,000 emails every tick)
sledge is online now  
Reply With Quote
Old 07-22-2012, 10:23 PM   #21
sledge
Senior Member
 
Join Date: Aug 2010
Location: Washington, D.C.
Posts: 1,190
Thanks: 180
Thanked 302 times in 260 posts
Default

Forgot these usings:

using System.Net;
using System.Net.Mail;


Quote:
Originally Posted by sledge View Post
Is this in a strategy?

You could bypass NT (hopefully) by google "C# how to email"

that might give you this code:


/*
MailMessage mail = new MailMessage();
mail.To.Add("sledge@ninjatraderz.com");
mail.From = new MailAddress ("From:Someone"); //txtFrom.Text;
mail.Subject = "Subject:We sold";//txtSubject.Text;
mail.Body = "Body:" + Close[0]; //txtBody.Text;
SmtpClient smtp = new SmtpClient("smtp.somewhere.net");
smtp.Send(mail);
*/

use with caution, else you might get black listed by your isp. (ie, flooding the server with 1,000 emails every tick)
sledge is online now  
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
What happens if NinjaTrader and Broker position is not in sync? Rocket130713 Automated Trading 7 03-19-2012 08:28 AM
NinjaTrader shows wrong position after reconnect koganam Connecting 23 08-11-2011 01:56 PM
Indicators not loaded give audio alerts.... jeffalan2112 Miscellaneous Support 1 07-29-2009 07:55 AM
"Close position" orders executed via Pats heech Miscellaneous Support 3 06-30-2009 02:07 PM
Creating NinjaTrader compatible functions from TS ShowMe and indicator email alerts robinso Miscellaneous Support 1 04-11-2007 05:33 PM


All times are GMT -6. The time now is 10:14 PM.