We would like someone to program our MetaTrader 4 pricing onto our website using the following information.
Web-service API allows to publish quotes in the real-time mode. Information about quotes of the symbol (bid, ask) and trends in their changing is available for posting. Quotes can be presented on the site either as a table or as a creeping line.
Web-service API represents a set of commands forming an interaction protocol for connection to the server through TCP. This interaction format is realized in the text form, that is why many web-technologies can be used for having access to API, such as CGI, PHP, ASP, ASP.NET, JSP, etc. Our examples were designed with PHP technology. This technology was chosen because web-applications written in this language can work both on *nix platforms and on Microsoft Windows. This language is now supported for such popular web-servers as Apache and MS IIS.
Instructions of PHP setup for web-servers can be found at [login to view URL]:
PHP-Support Setup for *nix Systems
PHP-Support Setup for Windows
A Set of Scripts for Posting Quotes
Using a set of scripts [login to view URL] (3,32 KByte), it is possible to create an iformer as follows:
Symbol Bid Ask
EURUSD 1.2062 1.2066
GBPUSD 1.7951 1.7955
USDJPY 110.54 110.58
AUDUSD 0.7604 0.7608
USDCAD 1.2317 1.2322
To start working, it is sufficient to unzip files to the server, to the web-site directory.
Description of Files
[login to view URL] - quotes informer for EURUSD, GBPUSD, USDJPY, AUDUSD, USDCAD. The file contains:
settings for connection to the server (IP address, port);
parameters of caching the requests;
a function for sending requests to the server, caching of the request results being supported;
[login to view URL] - a sample page containing the informer [login to view URL];
cache - a directory to store cache of the request results;
img - a directory containing images to be used for representing quotes.
Description of Settings
Parameters are set up with a PHP-function named define:
// address of MetaTrader Server
define('T_HOST','[login to view URL]');
The following parameters are given at the beginning of [login to view URL] file:
T_HOST - MetaTrader Server address. Example: "[login to view URL]";
T_PORT - MetaTrader Server port. Example: 443;
T_TIMEOUT - timeout in seconds when connecting to MetaTrader Server. Example: 5;
T_QUOTES - symbol list to be published. Example: "EURUSD,GBPUSD,USDJPY,AUDUSD,USDCAD,";
T_CACHEDIR - a directory to store cache files. Example: "c:/temp/" or "cache/";
T_CACHETIME - cache expiration time in seconds. Example: 5;
T_CLEAR_DELNUMBER - the number of files deleted in one operation at which the process of cache cleaning must be stopped. Example: 15.
The values of the parameters listed above can be changed.
It is necessary to cache results of requests to the server when creating own scripts for posting quotes. You can read about problems arising from absence of caching in WebServices: Quotes and Account Access via WAP.
It is necessary to use web-service API to post quotes. API represents a set of commands forming an interaction protocol for connection to the server through TCP. The process of working with API of web-services is described in WebServices: Quotes and Account Access via WAP.
Note: IP address of web server from which web-commands are sent must be presented in the list of allowed addresses for web-services ('IP access list of web services' parameter on 'Common' tab of MetaTrader Administrator).
QUOTES - Receiving Information about Quotes for Symbols
Description: The command is intended for receiving information about quotes for symbols. The line of symbols separated by commas is transmitted as a parameter. The request results in text lines without any tags of HTML markup containing information about the symbol quotes and the trend of their changing.
31 freelancer đang chào giá trung bình $223 cho công việc này
Hi, I am a serious developer who aims to provide high quality services. If you contact me, we can discuss more things detail and will be achieved with each other's purpose. Good luck for your business…