GetHistoricalRates
  #41 (permalink)  
Old 10-25-2005, 04:38 PM
Freshman
 
Join Date: Oct 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
tworkman is on a distinguished road
Send a message via Yahoo to tworkman
Default GetHistoricalRates

Hi,
I just ran across this thread yesterday, and am very impressed and thankful for your contributions. I was able to get your sample up and running, and start to play with some of the other methods. I did run into one problem that I was hoping you could shed some light on. When I call GetHistoricalRates and loop through the results, I am able to pull out all the Fields from RateInfo except CTMDateTime. It gives me some strange error saying that the source code cannot be found. My .Net experience is very limited compared to others here, so it may be obvious to you. I think its something to do with the # symbols at both ends of the datetime value. The watch window shows this: CTMDateTime #10/20/2005 5:44:00 AM# Date.

Thanks for any suggestions you might have for me.
-Tom
Reply With Quote
  #42 (permalink)  
Old 10-25-2005, 05:01 PM
Freshman
 
Join Date: Oct 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
tworkman is on a distinguished road
Send a message via Yahoo to tworkman
Default

This is debugger issue, it works fine outside of that. Thanks.
Reply With Quote
  #43 (permalink)  
Old 10-25-2005, 11:58 PM
scorpion's Avatar
Administrator
A
 
Join Date: Aug 2004
Posts: 1,996
Thanks: 129
Thanked 383 Times in 152 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Default

I don't know where you got the error text, but I sometimes notice that the debug, local, and watch windows showing strange values, mostly when the code is break outside main thread. This is might a bug in VS Studio.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #44 (permalink)  
Old 10-27-2005, 09:43 PM
Freshman
 
Join Date: Oct 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
tworkman is on a distinguished road
Send a message via Yahoo to tworkman
Default

Thanks for the response on the VS bug.

Today I had some time to spend working on some ideas, and must have done too much work, because I started getting this error when connecting:

"An unhandled exception of type 'TooFrequentException' occurred in mt3apidotnet.dll"

I was hopeing in a few hours I could get back to work, but no such luck. I even created a new account, and that didn't work either.

Any ideas?
Reply With Quote
  #45 (permalink)  
Old 10-28-2005, 05:45 AM
scorpion's Avatar
Administrator
A
 
Join Date: Aug 2004
Posts: 1,996
Thanks: 129
Thanked 383 Times in 152 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Default

You should add 5 seconds between connection calls and 10 seconds between order exection calls. Sometimes, the error occour if you make connections to multiple brokers. Possible solution to lift the limit is spawning new mtapi object in separated appdomain. You'll need to do a bit of research on this.

Everyone, do you need full example and source code of the mt3 api wrapper?
Reply With Quote
  #46 (permalink)  
Old 10-28-2005, 04:46 PM
Freshman
 
Join Date: Jun 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
ondigio is on a distinguished road
Default

scorpion,
It would have been very useful to have had the source code to your wrapper when I was working on my own. If you're thinking about releasing it, I'm sure others will find it helpful.
Reply With Quote
  #47 (permalink)  
Old 11-13-2005, 01:22 AM
Freshman
 
Join Date: Oct 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
tworkman is on a distinguished road
Send a message via Yahoo to tworkman
Default

It would be nice to have the source to the API. I'm sure it would be helpful as a learning tool.

btw...has anyone implemented the wrapper using visual c#? I'm trying to do so now, but have run into a few problems. At run time I get an error saying it can't find the dll: 'System.DllNotFoundException' occurred in mt3apidotnet.dll. Please note that while I do this, I am also learning c#, so chances are it's a simple mistake.

Just wanted to see if anyone had a c# example I can learn from. Thanks!
Reply With Quote
  #48 (permalink)  
Old 11-13-2005, 03:43 AM
Freshman
 
Join Date: Oct 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
tworkman is on a distinguished road
Send a message via Yahoo to tworkman
Default

A full example would be especially useful and very much appreciated. Is this what you were referring to in and earlier comment you made:

"Anyone longing for full example demonstrating connect & login, execute orders, and get open & closed orders"?

I would love to see what you could demonstrate.

Thanks.
Reply With Quote
  #49 (permalink)  
Old 11-13-2005, 03:57 AM
scorpion's Avatar
Administrator
A
 
Join Date: Aug 2004
Posts: 1,996
Thanks: 129
Thanked 383 Times in 152 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Default

Thanks to Charlie's sponsor, you can now fetch it from http://www.fxfisherman.com/site/inde...13_fileid =21

Enjoys!
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #50 (permalink)  
Old 11-15-2005, 10:05 PM
Freshman
 
Join Date: Oct 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
tworkman is on a distinguished road
Send a message via Yahoo to tworkman
Default

This is great, and much appreciated!

I'm running into a problem with this project that I was hoping you had seen before...

Sending orders works well for a while, but if I send an order or two, then wait several minutes, I sometimes get this error:

An unhandled exception of type 'SomeErrorException' occurred in mt3apidotnet.dll

Additional information: some error

The thread '<No Name>' (0x950) has exited with code 0 (0x0).
An unhandled exception of type 'SomeErrorException' occurred in mt3apidotnet.dll

Additional information: some error

The thread '<No Name>' (0xc44) has exited with code 0 (0x0).
The thread '<No Name>' (0xc10) has exited with code 0 (0x0).
The thread '<No Name>' (0x101c) has exited with code 0 (0x0).
An unhandled exception of type 'SomeErrorException' occurred in mt3apidotnet.dll

Additional information: some error

The thread '<No Name>' (0x1310) has exited with code 0 (0x0).
The thread 'MT3 Pumping Message Loop' (0x15e0) has exited with code 0 (0x0).
The program '[1588] APIDemo.exe' has exited with code 0 (0x0).


I'm not sure how to get more information on this other than "some error". The error happens in Sub SendOrder, at:

' Send order
_API1.SendOrder(Order)



Thanks for any help you gan give.
-Tom
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Socket problems with MT3 API fxtrader625 MetaTrader and ZeroCode 2 12-29-2005 01:26 PM


All times are GMT. The time now is 05:15 PM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0

Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now