
窗口函数 [Window Functions]<-- begin content -->
由 帝国程序员 在 周四, 2005-10-27 21:08 提交
double PriceOnDropped( )
Returns price part of dropped point where expert or script was dropped
交易函数 [Trading Functions]<-- begin content -->
由 帝国程序员 在 周四, 2005-10-27 21:07 提交
int HistoryTotal( )
返回历史数据的数量
// retrieving info from trade history
int i,hstTotal=H
技术指标调用 [Technical Indicator calls]<-- begin content -->
由 帝国程序员 在 周四, 2005-10-27 21:06 提交
double iAC( string symbol, int timeframe, int shift)
计算 Bill Williams' Accelera
Ichimoku Kinko Hyo modes enumeration
Ichimoku指标模式枚举
ConstantValueDescriptionMODE_TENKANSEN 1 Tenkan-sen. MODE_KIJUNSEN 2 Kijun-sen. MODE_SENKOUSPANA 3 Senkou Span A. MODE_SENKOUSPANB 4 Senkou
MT4返回的运行错误:ConstantValueDescriptionERR_NO_MQLERROR 4000 No error. ERR_WRONG_FUNCTION_POINTER 4001 Wrong function pointer. ERR_ARRAY_INDEX_OUT_OF_RANGE 4002 Array index is out of range. ERR_NO_M
交易服务器返回的错误:
ConstantValueDescriptionERR_NO_ERROR 0 No error returned. ERR_NO_RESULT 1 No error returned, but the result is unknown. ERR_COMMON_ERROR 2 Common error. ERR_INVALID_TRADE_PAR
字符串函数 [String Functions]<-- begin content -->
由 帝国程序员 在 周四, 2005-10-27 15:30 提交
string StringConcatenate( ... )
字符串连接:: 输入参数
... - 任意值,用逗号分割 示例:
string
预定义变量 [Pre-defined Variables]<-- begin content -->
由 帝国程序员 在 周四, 2005-10-27 12:18 提交
double Ask
通货的买入价
示例:
if(iRSI(NULL,0,14,PRICE_CLOSE,0)<25)
{
OrderSend(Sym
物体函数 [Object Functions]<-- begin content -->
由 帝国程序员 在 周二, 2005-10-25 18:50 提交
bool ObjectCreate( string name, int type, int window, datetime time1, double price1, datetime tim
数学运算函数 [Math & Trig]<-- begin content -->
由 帝国程序员 在 周二, 2005-10-25 17:51 提交
double MathAbs( double value)
返回数字的绝对值:: 输入参数
value - 要处理的数字 示例:
doubl
全局变量函数 [Global Variables Functions]<-- begin content -->
由 帝国程序员 在 周二, 2005-10-25 17:37 提交
bool GlobalVariableCheck( string name)
检查全局变量是否存在:: 输入参数
name - 全
文件处理函数 [File Functions]<-- begin content -->
由 帝国程序员 在 周日, 2005-10-23 18:16 提交
void FileClose(int handle)
关闭正在已经打开的文件.:: 输入参数
handle - FileOpen()返回的句柄
日期时间函数 [Date & Time Functions]<-- begin content -->
由 帝国程序员 在 周日, 2005-10-23 18:04 提交
datetime CurTime( )
返回当前时间
示例:
if(CurTime()-OrderOpenTime()<360) retur
自定义指标函数 [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;注:分号(;)是表达式的