거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Facebook에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
조회수:
27572
평가:
(24)
게시됨:
2009.10.30 16:29
업데이트됨:
2014.04.21 14:54
\MQL4\Include\
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

ATTENTION: Undocummented solution, it may not work in the other versions of MetaTrader

Among the standard MQL4 functions there is very useful function MarketInfo() which returns the various information on the financial instruments listed in"Market Watch" window. However, in some cases, the additional information about the instruments is need. For example, the list of the symbols listed in "Market Watch" window, their order in the list, the full description of the instrument, or full list of the financial instruments provided by broker.

It has been discovered, that during any changes in the "Market Watch" window, the client terminal opens and modifies the binary file symbols.sel in the history folder. Analysis of the structure of this file shows that the terminal records for the every instrument of the "Market Watch" window has a 128-byte structure. The first 12 bytes allocated for the symbol name, the other bytes are filled with the other information: Bid, Ask, High, Low, etc. The instument order is the same as in "Market Watch" window. And if the user changes the ordering of symbols, the changes are immediately reflected in the file.


Note: the first 4 bytes are reserved for MQL version and they are constant


However, the information contained in the file symbols.sel may not be complete. Especially if the "Market Watch" window has no all listed financial instruments. Therefore, if you need a complete list of available symbols, provided by broker, then this method will not work. The good idea based on analysis of file symbols.raw has been proposed by kaisa. However, its implementation using the API functions is not the best solution.

This problem can be solved and the "pure" MQL. Analysis of the structure of this file shows that each symbol is recorded in a file in the binary structure of the size of 1936 bytes. The first 12 bytes are for the short symbol name, and the next of 64-bytes block contain an extended symbol description.

On the basis of the analysis proposed here it has been developed library that contains a several functions for more information about financial instruments loaded in the client terminal.

Here is a list of the exported functions:

SymbolsList

- returns the symbol list (listed in "Market Watch" or all of the symbols).

SymbolDescription

- returns the detailed name description of the specified financial symbol.

SymbolType - returns a type of the financial instrument.

An example of the library usage is presented in the script SymbolsSample.mq4.


MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: https://www.mql5.com/ru/code/9102

Market browse Market browse

This script will allow you to use the information about the market watch and the client terminal settings. It can be very useful to study the client terminal and market watch options.

Stairs strategy Stairs strategy

The multicurrency expert, which uses the "Stairs" strategy

The signal lines with alert after crossing The signal lines with alert after crossing

When the price is approaching to the Signal Lines, the indicator sends Alert.

Two Pole Smoothed Ehlers Oscillator Two Pole Smoothed Ehlers Oscillator

This oscillator is based on Ehlers' Two Pole Super Smoother, converted as an oscillator, and smoothed using Ehlers' Instantaneous trendline.