NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM 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 11-23-2007, 02:09 AM   #1
dgregor5
Senior Member
 
Join Date: Jul 2007
Posts: 225
Thanks: 0
Thanked 0 times in 0 posts
Default What Happens When A Connection Is Lost

Hi:
I am concerned about the following scenario & would like to understand NT's thoughts on this.

1/ I am running a strategy via NinjaScript with an active trade in play with a trailing stop / profit targets orders in place at the exchange.
2/ Computer locks up & have to reboot.
3/ Re-open NT & have to re-activate the strategy - do I assume here that I have to include historical data in the strategy to resynchronise with the exchange).
4/ Strategy has to be active due to exit criteria (indicators) & trailing stop orders.
5/ Process steps for getting synchonised ???? ---- 1/ open NT, 2/ connect to e-signal (for historical data), 3/ activate strategy, 4/ connect to the broker.

Also in an alternative scenario where there is a temporary loss in connection (either directly to the internet or datafeed from the broker) & the systems automatically resynchronises ---- could this create any issues with order flow???

thx in advance
David
dgregor5 is offline  
Reply With Quote
Old 11-23-2007, 03:20 AM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

a) strategy is canceled as you disconnect
b) you are left with an active order/position in your account which is no different than just a regular strategy start with an active order/position in your account
c) temporary loss of connection will not make a difference for your live order/position. However strategy might have missed live bars and you might have to take action by custom code (supported by monitoring the connection status event in NT6.5) or manual action
NinjaTrader_Dierk is offline  
Reply With Quote
Old 11-23-2007, 04:23 AM   #3
dgregor5
Senior Member
 
Join Date: Jul 2007
Posts: 225
Thanks: 0
Thanked 0 times in 0 posts
Default

thx.
But regarding point 'b'. yes i am left with an active order......however, with a trailing stop strategy or with an exit based on specific indicator criteria surely there would be need to be some way of resynchronising otherwise the only exit condition could be the 'old' trailing stop level or the profit target.

thx for your help
David
dgregor5 is offline  
Reply With Quote
Old 11-23-2007, 04:25 AM   #4
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

You would need to manually cancel the order and start again. There is no syncing to orders already in place.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 11-23-2007, 04:52 AM   #5
dgregor5
Senior Member
 
Join Date: Jul 2007
Posts: 225
Thanks: 0
Thanked 0 times in 0 posts
Default

thx for the clarification !
dgregor5 is offline  
Reply With Quote
Old 11-27-2007, 02:19 AM   #6
sambar
Junior Member
 
Join Date: Sep 2006
Location: , ,
Posts: 22
Thanks: 1
Thanked 0 times in 0 posts
Default Connction Loss

Hi
I trade emini s&p on globex with datafeed zenfire. If I am in a trade with a stop loss and profit target (oco) in place and I loose connection will my orders be actioned if the relevant price is hit while I am offline
Also if in a trade can I log off happy in the knowledge my stop profit target if hit will be actioned
Thanks
Sam
sambar is offline  
Reply With Quote
Old 12-14-2008, 01:28 PM   #7
heech
Senior Member
 
Join Date: Nov 2008
Posts: 576
Thanks: 0
Thanked 1 time in 1 post
Default

Hi,

Just to quickly revive this thread here... I thought OnConnectionStatus gave us two parameters, one for "price" (Barchart?) and one for orders. Doesn't that mean we can monitor both connections?

Or is this a feature introduced in a later release than what was discussed previously?
heech is offline  
Reply With Quote
Old 12-14-2008, 02:05 PM   #8
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

>> Doesn't that mean we can monitor both connections?
Correct. The account connection has an internal order connection and an internal price connection (which might be different dependent on broker).
NinjaTrader_Dierk 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
Lost connection lost orders Bogan7 Connecting 1 09-12-2007 11:21 PM
Lost Super Dom connection Lincoln Miscellaneous Support 4 10-23-2006 05:12 AM
connection lost (IB) mr_ben Connecting 4 03-20-2006 05:42 AM
Locating connection lost blsmith95 Miscellaneous Support 1 05-12-2005 02:03 PM
Lost connection and NT froze up cody Connecting 1 04-08-2005 07:16 AM


All times are GMT -6. The time now is 12:36 AM.