![]() |
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
|
|||||||
| Miscellaneous Support Miscellaneous support issues. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Mar 2008
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
I have two questions about IB connections.
First every night around midnight there is a server change and you loose the data feeds for a certain amount of time. Second, there is an auto logout feature that can't be turned off. If I want to run strategies that trade over more than one day, can ninjatrader handle this reliably? What happens when IB kicks you off or looses data feeds? can you manually restart TWS without restarting and loosing graphs and such from NT? If you have to restart NT will it automatically add open positions to a strategy? |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
You can not run NT overnight with IB. IB forces a disconnect which requires a restart of NT to reconnect.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Mar 2008
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks, I kinda figured that I would have to restart everything.
1) So then is it possible to run strategies that don't exit all trades at the end of the day? 2) Do you loose all the data and calculations that your strategy made that day? 3) When you reopen NT, does it automatically add open positions back into the strategy? |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
1) No, strategies terminate as NT is terminated. This will change later this year.
2) Yes as per #1 3) No as per #1
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: Feb 2008
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
|
Need to restart NT due to external middle tier applications connection issues is definitely "beta" feature for NT that supposed to run automated strategies 24/7. Are you saing this will be fixed only in version 7.0 that coming some time when the year changes??
Another question related to IB TWS connectivity. Is the starting TWS AND logging in is the necessity and the prerequisite to successful connection attempt from NT menu? I'm asking because of this two things together: 1. IB connection has the option for user credentials (optional), so I would assume NT should be able to start TWS on its own. 2. After misseing with suggested stanalone TWS build 882, web beta 883 and web release 884 and then stanaolne TWS minor update to 882.2 lately, seems I can't start TWS from NT. NT throws the dialog window titled as Message with OK button: Login failed: Invalid user or password, or system not available Optional user credentials are entered correctly and the only way to connect is manually login into TWS first (either stanalone 882 or web 884 work the same on my Vista w/out SP and NT 6.5 release). If that supposed to work this way then why the user name and password boxes for IB connection in NT? Or what should I do to fix that? I tried re-install of TWS 882, reboots etc. One thing noticed that even disabling all IB Connection run-time handling dialogs and auto-login NT features, NT still tries to close TWS Login window that it brings forward... weird.
|
|
|
|
|
|
#6 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
What I am saying is that in NT7 you will have the ability for NT to automatically connect when started.
1) Correct 2) It should work on the supported TWS 882 version
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Member
Join Date: Oct 2007
Location: Sydney
Posts: 78
Thanks: 0
Thanked 0 times in 0 posts
|
I am able to run NT overnight using my IB TWS connection without being logged out.
Each day I have to open up IB TWS and select Configure>Misc>Exit and change the am/pm or time as required, and then repeat the process before the new logout time occurs. I would much prefer to have NT manage this and applaud the proposed version 7 changes. Thanks Ray!
Last edited by Aussie2; 05-02-2008 at 04:04 AM.
Reason: Grammar
|
|
|
|
|
|
#8 | |
|
Member
Join Date: Feb 2008
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
As to starting TWS by NT I got mixed and unreliable results (it works sometimes, but usually TWS Login dialog filled and then just disappears with eventual Login failure log, tried TWS 882 and current 884 standalone both). Have no idea how to make it work reliably. Maybe there is too short timeout for NT to login into TWS? Can it be adjusted somewhere? Also, does NT uses newest IB TWS API available as extra AX_install.exe or it just utilizes API dll that is build into TWS distribution? |
|
|
|
|
|
|
#9 |
|
Member
Join Date: Oct 2007
Location: Sydney
Posts: 78
Thanks: 0
Thanked 0 times in 0 posts
|
Hi Nintra
Used TotalUninstall to capture changes during a IB TWS Configure>Misc>Exit AM/PM "flip flop" Two files were modified. Namely: 1. C:\Jts\dfjbqkvss\tws.tmp.xml 2. C:\Jts\log.Thu.txt Had a peek at these - not sure how to determine if the .xml file is monitored by TWS. Instead ...... If away from my computer rather than trying to get NT to auto login to IB TWS, I log in remotely using VNC and do the flip flop. As a back up if I miss a flip flop I also use a strategy I wrote to monitor the IB connection status, and sms me on disconnection. I then log in using VNC and restart IB TWS. My strategy code follows: PHP Code:
This is a simple work around that may assist pending NT v7 changes. Regards
Last edited by Aussie2; 05-02-2008 at 07:47 PM.
Reason: Correction
|
|
|
|
|
|
#10 |
|
Member
Join Date: Feb 2008
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
|
Hi Aussie2
This script is a good feedback reminder. Maybe we should try to go one step further and run some controller application from it (instead of just sending email/SMS in hope someone would react)? Can we run an executable from NT strategy? Sure that might be C# too. As for the TWS shutdown flip switch, the file seems to be temporary all-in-one TWS configuration file and that would be look more like hacking TWS internals, unfortunately. As I still can't get TWS started from NT, mybe the solution would be to write TWS & NT controller application/service that will watch and control both NT & TWS, i.e. (re)start them, login to TWS, connect NT to IB, flip TWS shutdown, report problems by email/SMS. Maybe someone already did this?? As to IB NT connection, I would assume one will want to make connection to paper account 1st, then to live trading one 2nd (to mitigate the limits of IB data feed streaming), correct? I have no idea whether the paper accounts feed match the live accounts exactly. |
|
|
|
|
|
#11 |
|
Member
Join Date: Oct 2007
Location: Sydney
Posts: 78
Thanks: 0
Thanked 0 times in 0 posts
|
Hello again,
Been away. Not sure what others are doing or what is recommended, however I generally do not connect to IBs paper trading account. When I want to carry out some backtesting I usually disconnect from IB (ie File>Disconnect) and rely on price data stored in the NT data base (ie I have Tools>Options>Data>General>Miscellaneous set to Store realtime bar data) This way I do not have to poll IB for data repeately. When I want to carry out paper trading with say Chart Trader or the Super DOM then I simply put NT into simulation mode (ie File>Global Simulation Mode) All trades are then put through to a SIM101 NT account. If you want to explore slippage impact then I suppose you could try IBs paper trading account although the above NT DOM/Chart method captures current market prices.
Last edited by Aussie2; 05-13-2008 at 04:54 AM.
Reason: Grammar
|
|
|
|
|
|
#12 | |
|
Senior Member
Join Date: Sep 2008
Posts: 483
Thanks: 0
Thanked 2 times in 2 posts
|
Right on!
Check this out: http://www.ninjatrader-support2.com/...8264#post78264 Quote:
|
|
|
|
|
|
|
#13 |
|
Member
Join Date: Oct 2008
Posts: 60
Thanks: 0
Thanked 0 times in 0 posts
|
Hi, there is a simple program you can get for free called IBController. its a really simple program that basically just keeps IB from logging off overnight - it works fairly reliably but i havent exactly tested it extensively. still need to restart it over the weekend it, but still a step forward from restarting every day!
|
|
|
|
|
|
#14 | |
|
Senior Member
Join Date: Sep 2008
Posts: 483
Thanks: 0
Thanked 2 times in 2 posts
|
1. Please refer to the following thread:
http://www.ninjatrader-support2.com/...ad.php?p=78590 2. The idea behind using an "autokey" type solution is complete flexibility. For example, if you restart your connection, what about your strategy? Also, what about non-IB accounts? Quote:
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pair trading / Spread trading | HelloHello | Automated Trading | 8 | 09-18-2010 08:55 PM |
| Accessing Globex instrument's last N night session's Min and Max prices | Jim W. | Indicator Development | 4 | 06-01-2008 12:35 PM |
| backtesting vs. forward testing like night vs. day | andrewbee | Strategy Development | 15 | 01-04-2008 10:48 PM |
| auto trading vs discretionary trading and limit orders | John Sanders | Automated Trading | 3 | 11-07-2007 08:03 AM |
| is there a way to see if NT got disconnected at night | HelloHello | Automated Trading | 1 | 10-03-2007 03:03 PM |