블로그 이미지
Flying Mr.Cheon youGom

Recent Comment»

Recent Post»

Recent Trackback»

« 2024/5 »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

 

'프로그래밍/MQL4'에 해당되는 글 2

  1. 2013.07.30 MQL Document of the SITE.
  2. 2013.07.30 MQL4와 MQL5의 차이점
 

MQL Document of the SITE.

프로그래밍/MQL4 | 2013. 7. 30. 10:44 | Posted by youGom

http://docs.mql4.com/


MetaQuotes Language 4 (MQL4) is a new built-in language for programming of trading strategies. This language allows to create your own Expert Advisors that make trading management automated and are perfectly suitable for implementing of one's own trade strategies. Besides, one can use MQL4 for creation of one's own Custom Indicators, Scripts, and Libraries.

A large amount of functions necessary for analysis of the current and previously income quotes, as well as basic arithmetic and logic operations are included in MQL4 structure. There are also basic indicators built in and commands of order placement and control.

The MetaEditor 4 (text editor) that highlights different constructions of MQL4 language is used for writing the program code. It helps users to orientate themselves in the expert system text quite easily. We use MetaQuotes Language Dictionary as a Help System for MQL4 language. An abridged guide contains functions divided into categories, operations, reserved words, and other language constructions and allows finding the description of every element we use.

Programs written in MetaQuotes Language 4 have different features and purposes:

  • Expert Advisor is a mechanical trading system (MTS) linked up to a certain chart. An Advisor starts to run with every incoming tick for a given symbol. The Advisor will not be launched for a new, tick if it is processing the previous one at this moment (i.e., the Advisor has not completed its operation yet). The Advisor can both inform you about a possibility to trade and trade at an account automatically sending orders directly to the trade server. Like most trading systems, the terminal supports testing strategies on history data with displaying trading in-and-out points in the chart.
    Experts are stored in terminal_directory\experts.

  • Custom Indicator is a technical indicator written independently in addition to those already integrated into the client terminal. Like built-in indicators, they cannot trade automatically and are intended for implementing of analytical functions only.
    Custom Indicators are stored in terminal_directory\experts\indicators.

  • Script is a program intended for a single execution of some actions. Unlike Expert Advisors, Scripts are not run tickwise, but on request.
    Scripts are stored in terminal_dictionary\experts\scripts.

  • Library is a set of custom functions containing programs most frequently used. Libraries cannot start execution by itself.
    Libraries are recommended to be stored in terminal_directory\experts\libraries.

  • Included file is a source text of the most frequently used blocks of custom programs. Such files can be included into the source texts of experts, scripts, custom indicators, and libraries at the compiling stage. The use of included files is more preferable than the use of libraries because of additional burden occurring at calling library functions.
    Included files are recommended to be stored in terminal_directory\experts\include





'프로그래밍 > MQL4' 카테고리의 다른 글

MQL4와 MQL5의 차이점  (0) 2013.07.30
:

MQL4와 MQL5의 차이점

프로그래밍/MQL4 | 2013. 7. 30. 10:42 | Posted by youGom



mql4는 절차 프로그래밍에 가깝고 mql5는 객체 지향 프로그래밍에 가깝다. 
제일 먼저 중요한 주문내는 타입이 다르다. mql4는 ordersend 주문함수에 변수값을 일일히 다 넣어주었지만 mql5는 mqlrequest 객체에 속해있는 익절 손절 심볼 등과 같은 변수값을 수정하여 ordersend 주문함수에 변수값은 요청객체(mqlrequest)와 결과객체(mqlresult)만 들어간다. 즉 두 단계로 들어간다는 것, 주문이 요청과 결과 수신으로 이루어진다는 것인데 요청객체에 변수를 수정하여 요청객체에 들어있는 변수가 통째로 주문함수에 들어간다.
mql5부터는 close open과 같은 배열이 사라졌다. mql4에서는 close[1]은 하루 전 종가를 나타냈으나 이제는 배열을 따로 만들어야한다. 이를 위해 mql5부터는 copybuffer라는 함수가 주어지는데 이 함수를 이용해 종가 시가 뿐만 아니라 이동평균값과 같은 특정 가치값을 버퍼배열에 담을 수 있다.
명칭이 기억은 안나지만(;;;) 이미 프로그래밍 언어 속에서 정해진 변수(예를 들어 Point Digit) 앞에 _이 붙는다. 즉 Point는 이제 _Point라고 쓰게 된다.
mql5를 익히게 위해서는 c++를 배우는 편이 좋다. 클래스 정도까지는 모르더라도 객체에 대한 이해는 필요하다

[출처] mql4와 mql5의 차이점|작성자 제이


'프로그래밍 > MQL4' 카테고리의 다른 글

MQL Document of the SITE.  (0) 2013.07.30
: