View Full Version : Freezing Connecting to Gain
Jappenzeller
05-29-2007, 10:28 AM
I'm trying to connect to my Gain account and NT seems to freeze. The log shows I'm actually connected. The last log entry shows I have a position open and then that's it. I have to kill the process in order to stop NT.
Log entries:
default: Verify license
default: current license
default: auto trading disabled
connection: gain: connecting
connection: gate: rate feed connected
connection: gain: primary connection connected
position: instrument: account info and position is here
Session Break;
I'm assuming the session break is entered when I kill the NT process.
Jim
NinjaTrader_Ryan
05-29-2007, 10:47 AM
Hello:
Thank you for your post.
If you are currently in a live position and are having trouble connecting to get out of the trade, please consult your broker right away to have them close out your position, if need be.
As per your connection issue...
Can you re-produce? Try disconnecting and shutting down the software.
Restart NT and attempt to connect again.
If you cannot get re-connected, please send me a note to support at ninjatrader dot com.
Do you receive any error messages?
I can test your login information on my pc and we can verify if it is an issue with your pc or if it could be an issue with your login information.
Best regards,
Jappenzeller
06-03-2007, 06:15 PM
As I mentioned in my email, removing the NinajaTrader directory in my documents fixed the problem. I got the error again, and what it seems is that if I have open positions with a strategy when the market closes on friday, I have this problem connecting again when the market reopens. Happened twice now. I know how to fix it now, but it seems like a bug somewhere.
NinjaTrader_Dierk
06-03-2007, 11:11 PM
Thanks for feedback. Please proceed as Ray suggested.
jrowenjr
07-01-2007, 04:44 PM
I'm having the same issues. NT freezes when connecting to GAIN.
NinjaTrader_Ray
07-01-2007, 06:08 PM
Please see post #2. If this fails, please send a note to support at ninjatrader dot com and reference this post.
coryrh
01-02-2008, 10:56 AM
This error just happened to me. If you delete the config.xml file at mydocuments>ninjatrader6>config and then restart NT the gain connection will work.
Be prepared to re-enter your license key. All of your data will be retained including strategies. My initial startup environment was lost but that appears to be all. Be sure to check that EVERYTHING critical to your trading works properly after the switch.
For NT Support: If you want a copy of both the good and bad config.xml let me know. If I had more time I could narrow it down to the offending code but I don't.
NinjaTrader_Jason
01-02-2008, 11:07 AM
Hello coryrh,
Thank you for your post.
Deleting the Config file will reset your workspace, which explains the missing initial startup environment and solves the issue connecting to Gain. Thank you for offering the Config files, but at this time it is not necessary.
henry.omd
01-08-2008, 12:08 PM
I guess this is an unrelated issue, but since last night, I can't seem to connect to the forex.com demo feed. Error:
"Login failed: Failed t o connecto the Rates interface: System.Net.Sockets.SocketException: An exisiting connection was forcibly closed by the remote host at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int3"
My connection settings:
* Provider: Gain
* Use NT server
* Mode: Demo
This connection worked fine for nearly a month. What changed?
-Henry
NinjaTrader_Dierk
01-08-2008, 12:10 PM
Please contact your broker.
henry.omd
01-08-2008, 12:29 PM
Thank you Dierk.
I just got off the phone with forex.com support. They said that if the error is coming from their end, the error message would have said "Gain Capital", so therefore to ask you about this again.
Are you sure the error is coming from Gain capital? This is the forex.com DEMO account remember.
-Henry
NinjaTrader_Dierk
01-08-2008, 12:33 PM
>> Are you sure the error is coming from Gain capital
Yes, or general internet issue (we have the same issue here).
henry.omd
01-08-2008, 12:39 PM
Hi Dierk,
So what about GAIN's assertion that their errors would have "Gain Capital" in it? You say it's their problem, and they say it's your problem. I don't know what to do. If you are also seeing this problem on your end right now (is that what you are saying?), can you work it out with them?
Actually, this makes me wonder: the same thing can happen even with a live account connection, so if I can't trade because of the connection problem, how do I know who to contact? Will I be a ping pong ball between the 2 of you even in a live setting?
-Henry
NinjaTrader_Dierk
01-08-2008, 12:41 PM
We're in touch with GAIN an let you know as we get an update.
NinjaTrader_Dierk
01-08-2008, 01:30 PM
We can connect to our account again. I suggest you retry.
Penelope
01-09-2008, 07:28 AM
I've read this thread and I too have a problem since this morning - 4 hours ago. I cannot connect up to Gain. I've never encountered this situation with Gain before...... I've tried shutting down, rebooting etc but it doesn't fix things.
This is the message I get when I try to connect to Gain:-
Login failed: Failed to connect to the Rates interface: System.Net.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.Receive(Byte[] buffer. Int3
What makes me suspect this is a Gain problem is that I am able to connect/log on perfectly fine to Open tick as normal.
Please tell me whether there is anything I should do at my end to rectify this problem. I don't want to start fiddling around with Ninja Trader files unless you tell me to!
Thanks
Penelope
Penelope
01-09-2008, 07:32 AM
I tried once again to connect to Gain just after sending my last message and I got connected immediately so I'm guessing that Gain just fixed their problem....... So fingers crossed all's well again.
Penelope
henry.omd
01-12-2008, 04:30 PM
Hi Dierk, this thread reminded me of a recommendation you guys made about a month ago I guess, which is "to disconnect from the data source if you already have the necessary data (say in terms of the date rante) for the backtest, and don't want NT to get the data from the source again.
Yesterday, NT hung on me when I was connected to Gain over a slow link (3 Mbit wireless link) and I was running backtest. Since I normally run the same range over and over again for a given instrument, I don't understand why NT contacts the source repeatedly for the data it already has. Even if the end-result is the same, the increased wait time for the backtest result is noticiable over a slow link. Can you please change the behavior so that you don't attempt this extensive link when NT already has the data on the local hard disk?
-Henry
NinjaTrader_Dierk
01-13-2008, 04:16 AM
You may want to follow this thread to understand on what conditions NT pulls historical data from your provider: http://www.ninjatrader-support.com/vb/showthread.php?t=4863&highlight=provider
henry.omd
01-13-2008, 08:34 AM
Thank you Dierk, I read the thread but not sure why it is relevant to me. I am backtesting with 2007 data, so I am wondering why NT will go out to the provider EVERY TIME I run a backtest when I am connected to the provider. It seems that the implication is that the only way to prevent this is to disconnect from the provider. In contrast, what I am asking for is either a feature or confirmation that NT does NOT go out to the provider if it already has the necessary data.
Am I understanding the NT behavior and the thread correctly?
-Henry
NinjaTrader_Dierk
01-13-2008, 08:39 AM
As any of the data you backtest is missing and/or the current day is backtested, NT will request data from the provider (please see thread I pointed you to).
henry.omd
01-15-2008, 10:04 PM
Thank you for the answer Dierk,
I agree that would be the desired behavior.
It's just that I can't explain the NT behavior I see when I run backtest: running a backtest for a strategy on all forex.com currencies took more than 11 minutes, about 60% of which time (according to the Windows Task Manager -> Networking tab) was spent in downloading packets. When the packet is being downloaded, the network bandwidth shoots up to 1 Mbit/s, which is nearly the maximum bandwidth available for my DSL connection. Since I had current data up to last week, can you think of a reason why NT 6.5 would spend this much time downloading only the newest minute data for the past couple of days?
Furthermore, when I rerun the very same backtest right after this backtest finishes, I see the exact same packet download pattern in the Windows task manager -> Networking tab. In this case, there should have been nothing missing (ok, maybe at most 10 minutes worth of minute bars missing) in the data already downloaded to the local harddrive. So why then the exact same network usage?
Do you see the reason for my confusion here?
-Henry
NinjaTrader_Dierk
01-15-2008, 10:33 PM
We will post a document on why and when NT downloads data from your provider shortly. Please be patient.
NinjaTrader_Ray
01-16-2008, 06:30 AM
Specific to GAIN.
-Tools > Account Connections > Select your GAIN account to change
-Under Historical Data select "NinjaTrader Servers" (I suspect you have GAIN servers checked)
This should accellerate data download speed by a factor of at least 50X.