![]() |
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
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Member
Join Date: Jan 2010
Posts: 73
Thanks: 11
Thanked 1 time in 1 post
|
Hi,
I need to monitor my data feed for disconnection. For whatever reason my broker's servers are sometimes completely unavailable for a few minutes at night (eastern time zone). I would like to send myself an email and/or generate a looping sound to notify me that NT is unable to act on (protective stop) orders while I am sleeping with open positions. I know how to email myself alerts and play sounds but I don't know what to use to monitor the data feed. Can this be done? If so, what functions/methods/etc should I be looking at? Thanks in advance. -mp |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
mp, you can monitor OnConnectionStatus() for these tasks - http://www.ninjatrader.com/support/h...tionstatus.htm
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: May 2009
Location: Asia
Posts: 304
Thanks: 0
Thanked 9 times in 5 posts
|
Marcus this might give you some ideas:
PHP Code:
PHP Code:
|
|
|
|
|
|
#4 |
|
Member
Join Date: Jan 2010
Posts: 73
Thanks: 11
Thanked 1 time in 1 post
|
NinjaTrader_Bertrand: thank you for the info.
MXASJ: Thanks a lot! I was not expecting a ready made solution...
|
|
|
|
|
|
#5 |
|
Member
Join Date: Dec 2010
Posts: 37
Thanks: 1
Thanked 1 time in 1 post
|
Code:
if (orderDataFeed == ConnectionStatus.ConnectionLost && alertsWindow) Alert("orderconnectionlost", NinjaTrader.Cbi.Priority.High, "Order Server Connection Lost", "triple_klaxon.wav", 10, Color.Red, Color.White);
The alerts from the above code by MXASJ are not rearming after 10 seconds. How is it possible to get the alerts to re-arm? how would a looping command work especially if the connection is lost/disconnected? any suggestions? thanks in advance
Last edited by dawdler; 05-30-2011 at 10:34 AM.
|
|
|
|
|
|
#6 |
|
Member
Join Date: Dec 2010
Posts: 37
Thanks: 1
Thanked 1 time in 1 post
|
any suggestions on how to re-arm an alert after a connection loss?
|
|
|
|
![]() |
| Tags |
| data feed, feed, monitoring |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with monitoring Stop orders | jonmoron | Strategy Development | 3 | 08-04-2010 12:35 PM |
| Monitoring in Real Time | bobbyvl | Strategy Development | 1 | 03-25-2010 04:29 AM |
| Monitoring Strategy Orders/Fills | Richard Von | Strategy Development | 11 | 01-29-2010 12:48 PM |
| Quotes Monitoring Screen | NickF | Miscellaneous Support | 4 | 01-20-2010 12:39 PM |
| Placing orders for multiple instruments without monitoring data | palinuro | General Programming | 3 | 06-03-2008 07:32 AM |