
自定义指标函数 [Custom Indicator Functions]<-- begin content -->
由 帝国程序员 在 周日, 2005-10-23 15:58 提交
void IndicatorBuffers(int count)
设置自定义指标缓存数:: 输入参数
count - 缓存数
公用函数 [Common Functions]<-- begin content -->
由 帝国程序员 在 周日, 2005-10-23 09:00 提交
void Alert( ... )
弹出一个显示信息的警告窗口:: 输入参数
... - 任意值,如有多个可用逗号分割 示
类型转换函数 [Conversion Functions]<-- begin content -->
由 帝国程序员 在 周日, 2005-10-23 15:41 提交
string CharToStr( int char_code)
将字符型转换成字符串型结果返回:: 输入参数
char_code -
数组函数 [Array Functions]<-- begin content -->
由 帝国程序员 在 周日, 2005-10-23 07:36 提交
int ArrayBsearch( double array[], double value, int count=WHOLE_ARRAY, int start=0, int direction=
账户信息 [Account Information]<-- begin content -->
double AccountBalance()
返回账户余额
示例:
Print("Account balance = ",AccountBalance());
double AccountCredit()
返回账户信用点
预处理程序 [Preprocessor]<-- begin content -->
定义常数
#define identifier_value
常数可以是任何类型的,常数在程序中不可更改。
示例:
#define ABC 100
#define PI 0.314
#define COMPANY_NAME &
变量 [Variables]<-- begin content -->
定义变量定义基本类型
基本类型包括string - 字符串型;
int - 整数型;
double - 双精度浮点数型;
bool - 布尔型 示例:
string MessageBox;
int Orders;
dou
函数 [Function]<-- begin content -->
函数定义
一个函数是由返回值、输入参数、内嵌操作所组成的。
示例:
double // 返回值类型
linfunc (double x, double a, double b) // 函数名和输入参数
{
//
操作符 [Operators]<-- begin content -->
由 帝国程序员 在 周六, 2005-10-22 08:43 提交
格式和嵌套
格式.一个操作符可以占用一行或者多行,两个或多个操作符可以占用更多的行。
嵌套.执行控制符(if, i
运算符和表达式 [Operations & Expressions]<-- begin content -->
表达式
一个表达式可以拥有多个字符和操作符,一个表达式可以写在几行里面。
示例:
a++; b = 10; x = (y*z)/w;注:分号(;)是表达式的
数据类型 [Data types]<-- begin content -->
数据类型概述
主要数据类型有:Integer (int)
Boolean (bool)
ëèòåðàëû (char)
String (string)
Floating-point number (double)
Color (color)
D
语法 [Syntax]<-- begin content -->
代码格式
空格建、Tab键、换行键和换页符都可以成为代码排版的分隔符,你能使用各种符号来增加你带骂得可读性。
注释
多行注释使用 /* 作为开始到 */ 结束,在这之
MetaQuotes Language 4 (MQL4) is a new built-in language for programming trading strategies. This language allows to create your own Expert Advisors that render the trade process management automatic a