NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Miscellaneous Support

Miscellaneous Support Miscellaneous support issues.

Reply
 
Thread Tools Display Modes
Old 10-16-2008, 06:57 PM   #1
tbtrades
Junior Member
 
Join Date: Aug 2008
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
Default how to sendmail() with current symbol and close price

how to sendmail() with current symbol and closing price when the condition is met?
tbtrades is offline  
Reply With Quote
Old 10-16-2008, 09:35 PM   #2
ninjablanks
Member
 
Join Date: Aug 2007
Posts: 64
Thanks: 0
Thanked 0 times in 0 posts
Default Try this post. Josh was very helpful

NinjaTrader Customer Service



Join Date: May 2007
Location: Denver, CO
Posts: 4,087



Code:
SendMail("support@ninjatrader.com", "customer@winners.com", "Trade Alert", "Long strategy triggered on " + Instrument.MasterInstrument.Name + " in " + Bars.Period.Value + "-" + Bars.Period.Id + " time frame.");
The body of your email would end up as something like this:
"Long strategy triggered on ER2 in 1-Minute time frame."
__________________
ninjablanks is offline  
Reply With Quote
Old 10-17-2008, 12:07 PM   #3
tbtrades
Junior Member
 
Join Date: Aug 2008
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
Default

thanks...

I also like to add current time and price when email was sent...how can i do that?
tbtrades is offline  
Reply With Quote
Old 10-17-2008, 12:28 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

Hi tbtrades,

Add Time[0] and Close[0] to your message string.

Code:
SendMail("support@ninjatrader.com", "customer@winners.com", "Trade Alert", "Long strategy triggered on " + Instrument.MasterInstrument.Name + " in " + Bars.Period.Value + "-" + Bars.Period.Id + " time frame." + " Time: " + Time[0] + " Price: " + Close[0]);
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
Virtual execution price is not the same as the current price Xtrooper ATM Strategies (Discretionary Trading) 4 10-06-2008 09:12 AM
Using Current Price data in script Mark_486 General Programming 1 05-14-2008 03:55 PM
Getting the price of a current stop order Sidhartha General Programming 3 04-08-2008 11:27 AM
Aborting backtest on symbol list in beta 10 only stops current test Pete S Historical NinjaTrader 6.5 Beta Threads 3 03-17-2008 10:57 AM
how to get current stop/limit/last executed price z32000 General Programming 1 11-29-2007 12:57 AM


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