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 > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 04-02-2009, 11:22 AM   #1
molecool
Senior Member
 
Join Date: Jan 2009
Posts: 426
Thanks: 26
Thanked 11 times in 10 posts
Question Sending SMS from NT6?

I am aware of the sendmail function in NT6, but am also planning in sending SMS. What would I have to do in order to hook that in? Has anyone done that? Obviously, the implication here is that it would only send a SMS during trading hours and not trigger during backtesting (i.e. generate hundreds of SMS messages).

Any pointers/ideas would be welcome.

Thanks,

Michael
molecool is offline  
Reply With Quote
Old 04-02-2009, 11:28 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 974 times in 957 posts
Default

Hi Michael, this would be easily possible if you use a mail provider that can receive emails and forward them as SMS.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 04-02-2009, 11:41 AM   #3
molecool
Senior Member
 
Join Date: Jan 2009
Posts: 426
Thanks: 26
Thanked 11 times in 10 posts
Default Can't use that

Quote:
Originally Posted by NinjaTrader_Bertrand View Post
Hi Michael, this would be easily possible if you use a mail provider that can receive emails and forward them as SMS.
I thought of that, but would prefer to directly use a C# SMS library that works with my provider. What I do need is the code that prevents messages to be sent during back testing. Is that source available? Or is there at least a call I can make so that I can test a flag and only send if I get a true back?

Thanks,

Michael
molecool is offline  
Reply With Quote
Old 04-02-2009, 11:56 AM   #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

Michael,

Unfortunately source code is not available. If you just want to test I recommend you just open a real-time chart and throw a quick indicator onto there that sends yourself SMS messages. It will trigger in real-time.
NinjaTrader_Josh is offline  
Reply With Quote
Old 04-02-2009, 12:41 PM   #5
molecool
Senior Member
 
Join Date: Jan 2009
Posts: 426
Thanks: 26
Thanked 11 times in 10 posts
Default Rephrase

Quote:
Originally Posted by NinjaTrader_Josh View Post
Michael,

Unfortunately source code is not available. If you just want to test I recommend you just open a real-time chart and throw a quick indicator onto there that sends yourself SMS messages. It will trigger in real-time.
Okay, let me re-phrase this question: HOW can I have something trigger only during trading hours and have it ignored during backtesting. Does this make more sense?
molecool is offline  
Reply With Quote
Old 04-02-2009, 12:51 PM   #6
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 974 times in 957 posts
Default

You can do this with putting the code in
Code:
if (Historical) 
return;
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 04-02-2009, 01:45 PM   #7
molecool
Senior Member
 
Join Date: Jan 2009
Posts: 426
Thanks: 26
Thanked 11 times in 10 posts
Red face That might work

Quote:
Originally Posted by NinjaTrader_Bertrand View Post
You can do this with putting the code in
Code:
if (Historical) 
return;
Okay, so I would want this to be false in order to know that it's live, correct?

Michael
molecool is offline  
Reply With Quote
Old 04-02-2009, 02:00 PM   #8
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 974 times in 957 posts
Default

Yes, if you put this at the start of your OnBarUpdate() the script will only be run live, not in backtest...

http://www.ninjatrader-support.com/H...istorical.html
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 07-12-2009, 02:16 PM   #9
iwannatoscript
Member
 
Join Date: Apr 2009
Posts: 44
Thanks: 0
Thanked 0 times in 0 posts
Default

I'd like to recive a sms each time that a trade is filled by ninja into my brokers.

Could someone describe each steps how to do this please?
iwannatoscript is offline  
Reply With Quote
Old 07-12-2009, 02:46 PM   #10
zweistein
Senior Member
 
Join Date: Jan 2009
Posts: 584
Thanks: 2
Thanked 20 times in 12 posts
Default

I have done this,

but you need an email provider that supports sending of sms.

I can configure my email provider to send an sms to my mobile phone whenever an email from sender sender@ninja.com with topic SMSMESSAGE comes in.
the sms shows the body line.
The point is that the email provider will charge you something for sending the sms. i

Then use the Email function.
zweistein is offline  
Reply With Quote
Old 07-12-2009, 03:45 PM   #11
saraga
Junior Member
 
Join Date: Sep 2006
Location: , ,
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
Default SMS messages

Quote:
Originally Posted by iwannatoscript View Post
I'd like to recive a sms each time that a trade is filled by ninja into my brokers.

Could someone describe each steps how to do this please?
I have used the normal email function and then sent the message to the phone using the right email address that will translate to an SMS on the phone end.

T-Mobile: phonenumber @tmomail.net
Virgin Mobile: phonenumber @vmobl.com
Cingular: phonenumber @cingularme.com
Sprint: phonenumber @messaging.sprintpcs.com
Verizon: phonenumber @vtext.com
Nextel: phonenumber @messaging.nextel.com

etc...
saraga is offline  
Reply With Quote
Old 07-23-2009, 05:07 PM   #12
iwannatoscript
Member
 
Join Date: Apr 2009
Posts: 44
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks now i know
iwannatoscript is offline  
Reply With Quote
Old 07-23-2009, 06:58 PM   #13
mrlogik
Certified NinjaScript Consultant
 
mrlogik's Avatar
 
Join Date: Sep 2006
Location: New York, USA
Posts: 774
Thanks: 1
Thanked 7 times in 5 posts
Default

You may want to reference this post
"You look closely enough, you can find everything has a ... weak spot where it can break, sooner or later"

PureLogikTrading
mrlogik is offline  
Reply With Quote
Old 02-26-2010, 04:33 AM   #14
zweistein
Senior Member
 
Join Date: Jan 2009
Posts: 584
Thanks: 2
Thanked 20 times in 12 posts
Default

for the last several month I used my email provider (web.de) to have him send me an sms to my mobile phone when the subject line contains a certain string.
This all works fine .. in principle, because sometimes it happens that the sms arrives only 30 minutes later and not immediately.
As I am interested in my fills a (sometimes) 30 minutes lag is unacceptable to me.

Looking into commercial sms gateways etc... it all looks as just replacing the current situation with something similar and not better. Probably worse and more chances that something goes wrong.

So I decided to use an old mobile phone with its prepaid sim card and I keep this phone attached permanently to my PC via bluetooth and the phone charger is also connected!

In this way I can access the phone by simply accessing a COM port in C#.

Sending sms messages is easy as it is just a simple AT command set to send them. http://codeglobe.blogspot.com/2009/0...modem-and.html

There are 2 options , sending sms as text , easy to implement, but unfortunately you cannot represent the € sign.
So for the € sign a sms PDU modus is needed.

Now with the mobile phone attached to the PC I basically have set up my own sms gateway and now the sms takes only less thanb 5 seconds to arrive at my cell phone.

Good luck

Andreas

www.zweisteintrading.eu
zweistein is offline  
Reply With Quote
Old 07-16-2010, 01:05 AM   #15
TriageTrading.com
Junior Member
 
Join Date: Jul 2010
Posts: 5
Thanks: 0
Thanked 0 times in 0 posts
Default

Hi All,

If you would like an all-in-one universal messaging solution for NT6.5 and 7, then please take a look at our service: http://www.ninjatrader.com/support/f...ad.php?t=30635

It gives you a hassle-free and robust way to send SMS, voice-phone, instant messaging (MSN, Yahoo, AOL, GTalk, ICQ), email, fax, RSS, Twitter and Facebook from your NinjaScript code.

Just a few minutes and a few lines of code, and you can send critical messages to yourself using any of these messaging services. We can even help you with designing your messaging code.

We're a new NinjaTrader Partner, and would like to give everyone a chance to try out our messaging free for a month. Please take a look at our site: www.triagetrading.com and feel free to email me any questions you may have about trade messaging.

Sincerely yours,

Amy Huang
amy.huang@triagetrading.com
TriageTrading.com 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
sending strings from indicator... jonmoron Indicator Development 7 04-08-2013 02:56 AM
Not sending orders on CL Feb09 shiptastic Automated Trading 5 01-07-2009 09:15 AM
What signals is NT sending to C2? cassb Strategy Development 5 10-08-2008 12:56 PM
Sending executions by email cprins Suggestions And Feedback 1 01-04-2007 01:21 AM
sending orders manefaces Automated Trading 4 03-25-2005 08:18 AM


All times are GMT -6. The time now is 01:19 AM.