It is currently Thu Sep 09, 2010 5:10 pm




Post new topic Reply to topic  [ 4 posts ] 
MT4 Api Integration 
Author Message
New member

Joined: Tue Dec 01, 2009 2:54 pm
Posts: 5
Post MT4 Api Integration
Hi, I am using metatrader,and developing my application, I want use OPFX API, historic data for graphic and real time data for market watch. I checked marketwatch component yet, but didnot see how to connect mt4 with marketwatch component low level apis ? so which way to use these apis in to my application ?


Thu Feb 25, 2010 1:41 pm
Profile
Site Admin

Joined: Wed Sep 17, 2008 12:18 am
Posts: 407
Post Re: MT4 Api Integration
Do you want to use the MarketWatch component, or you want to use the trading and data functionality?

By default MarketWatch connects to any data source, so it can connect to MT4 too; if you want to use MT4 connection for automated trading look into creating a custom expert.


Thu Feb 25, 2010 2:03 pm
Profile
New member

Joined: Tue Dec 01, 2009 2:54 pm
Posts: 5
Post Re: MT4 Api Integration
Hi,
I mean How Can I use data where received marketwatch components, I need just, these realtime data to use in my application, how can I take these datas via experts? to driect my app.


Thu Feb 25, 2010 2:08 pm
Profile
Site Admin

Joined: Wed Sep 17, 2008 12:18 am
Posts: 407
Post Re: MT4 Api Integration
The code is very simple, look at the MarketWatchComponent and MarketWatchControl classes. The MarketWatchComponent stores the data and the MarketWatchControl visualizes it. Look at the component_QuotesUpdateEvent() inside MarketWatchControl class. You can put some of your custom code there (for ex. send to your application), and it will get executed every time a quote comes in. This is the easiest approach, but I suggest you look over those 2 classes and see if you can understand how they work, so you can do whatever you wish.

It is best if you "plugin" your code inside the MarketWatch control and component (or make a copy, if you do not wish to modify the original classes), since it already does allot of things, and doing those from scratch takes effort.


Fri Feb 26, 2010 12:09 pm
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.