mt4常用函数变量说明

上传人:第*** 文档编号:30556833 上传时间:2018-01-30 格式:DOC 页数:36 大小:214KB
返回 下载 相关 举报
mt4常用函数变量说明_第1页
第1页 / 共36页
mt4常用函数变量说明_第2页
第2页 / 共36页
mt4常用函数变量说明_第3页
第3页 / 共36页
mt4常用函数变量说明_第4页
第4页 / 共36页
mt4常用函数变量说明_第5页
第5页 / 共36页
点击查看更多>>
资源描述

《mt4常用函数变量说明》由会员分享,可在线阅读,更多相关《mt4常用函数变量说明(36页珍藏版)》请在金锄头文库上搜索。

1、预定义变量 Pre-defined Variables double Ask通货的买入价示例:if(iRSI(NULL,0,14,PRICE_CLOSE,0)75)OrderSend(EURUSD,OP_SELL,Lots,Bid,3,Bid+StopLoss*Point,Bid-TakeProfit*Point,My order #2,3,D2005.10.10 12:30,Red);return(0);double Close返回指定索引位置的收盘价格示例:int handle, bars=Bars;handle=FileOpen(file.csv,FILE_CSV|FILE_WRITE,

2、;);if(handle0)/ write table columns headersFileWrite(handle, Time;Open;High;Low;Close;Volume);/ write datafor(int i=0; iFileWrite(handle, Timei, Openi, Highi, Lowi, Closei, Volumei);FileClose(handle);int Digits返回当前通货的汇率小数位示例:Print(DoubleToStr(Closei-1, Digits);double High返回指定索引位置的最高价格示例:int handle,

3、bars=Bars;handle=FileOpen(file.csv, FILE_CSV|FILE_WRITE, ;);if(handle0)/ write table columns headersFileWrite(handle, Time;Open;High;Low;Close;Volume);/ write datafor(int i=0; iFileWrite(handle, Timei, Openi, Highi, Lowi, Closei, Volumei);FileClose(handle);double Low返回指定索引位置的最低价格示例:int handle, bars=

4、Bars;handle=FileOpen(file.csv, FILE_CSV|FILE_WRITE, ;);if(handle0)/ write table columns headersFileWrite(handle, Time;Open;High;Low;Close;Volume);/ write datafor(int i=0; iFileWrite(handle, Timei, Openi, Highi, Lowi, Closei, Volumei);FileClose(handle);double Open返回指定索引位置的开盘价格示例:int handle, bars=Bars

5、;handle=FileOpen(file.csv, FILE_CSV|FILE_WRITE, ;);if(handle0)/ write table columns headersFileWrite(handle, Time;Open;High;Low;Close;Volume);/ write datafor(int i=0; iFileWrite(handle, Timei, Openi, Highi, Lowi, Closei, Volumei);FileClose(handle);double Point返回当前图表的点值示例:OrderSend(Symbol(),OP_BUY,Lo

6、ts,Ask,3,0,Ask+TakeProfit*Point,Red);datetime Time返回指定索引位置的时间示例:int handle, bars=Bars;handle=FileOpen(file.csv, FILE_CSV|FILE_WRITE, ;);if(handle0)/ write table columns headersFileWrite(handle, Time;Open;High;Low;Close;Volume);/ write datafor(int i=0; iFileWrite(handle, Timei, Openi, Highi, Lowi, Cl

7、osei, Volumei);FileClose(handle);double Volume返回指定索引位置的成交量示例:int handle, bars=Bars;handle=FileOpen(file.csv, FILE_CSV|FILE_WRITE, ;);if(handle0)/ write table columns headersFileWrite(handle, Time;Open;High;Low;Close;Volume);/ erite datafor(int i=0; iFileWrite(handle, Timei, Openi, Highi, Lowi, Close

8、i, Volumei);FileClose(handle);)Applied price enumeration价格类型枚举示例:Constant Value DescriptionPRICE_CLOSE 0 收盘价PRICE_OPEN 1 开盘价PRICE_HIGH 2 最高价PRICE_LOW 3 最低价PRICE_MEDIAN 4 最高价和最低价的平均价PRICE_TYPICAL 5 最高价、最低价和收盘价的平均价PRICE_WEIGHTED 6 开、收盘价和最高最低价的平均价Drawing shape style enumeration画图形状样式枚举,形状:Constant Valu

9、e DescriptionDRAW_LINE 0 Drawing line. DRAW_SECTION 1 Drawing sections. DRAW_HISTOGRAM 2 Drawing histogram. DRAW_ARROW 3 Drawing arrows (symbols). DRAW_NONE 12 No drawing. 样式:Constant Value DescriptionSTYLE_SOLID 0 The pen is solid. STYLE_DASH 1 The pen is dashed. STYLE_DOT 2 The pen is dotted. STYL

10、E_DASHDOT 3 The pen has alternating dashes and dots. STYLE_DASHDOTDOT 4 The pen has alternating dashes and double dots. Moving Average method enumeration移动平均线模式枚举,iAlligator(), iEnvelopes(), iEnvelopesOnArray, iForce(), iGator(), iMA(), iMAOnArray(), iStdDev(), iStdDevOnArray(), iStochastic()这些会调用此枚

11、举Constant Value DescriptionMODE_SMA 0 Simple moving average, MODE_EMA 1 Exponential moving average, MODE_SMMA 2 Smoothed moving average, MODE_LWMA 3 Linear weighted moving average. Object properties enumeration物件属性枚举Constant Value DescriptionOBJPROP_TIME1 0 Datetime value to set/get first coordinate

12、 time part. OBJPROP_PRICE1 1 Double value to set/get first coordinate price part. OBJPROP_TIME2 2 Datetime value to set/get second coordinate time part. OBJPROP_PRICE2 3 Double value to set/get second coordinate price part. OBJPROP_TIME3 4 Datetime value to set/get third coordinate time part. OBJPRO

13、P_PRICE3 5 Double value to set/get third coordinate price part. OBJPROP_COLOR 6 Color value to set/get object color. OBJPROP_STYLE 7 Value is one of STYLE_SOLID, STYLE_DASH, STYLE_DOT, STYLE_DASHDOT, STYLE_DASHDOTDOT constants to set/get object line style. OBJPROP_WIDTH 8 Integer value to set/get ob

14、ject line width. Can be from 1 to 5. OBJPROP_BACK 9 Boolean value to set/get background drawing flag for object. Series array identifier系列数组标识符Constant Value DescriptionMODE_OPEN 0 Open price. MODE_LOW 1 Low price. MODE_HIGH 2 High price. MODE_CLOSE 3 Close price. MODE_VOLUME 4 Volume, used in Lowes

15、t() and Highest() functions. MODE_TIME 5 Bar open time, used in ArrayCopySeries() function. Time frame enumeration特殊常量Constant Value DescriptionPERIOD_M1 1 1 minute. PERIOD_M5 5 5 minutes. PERIOD_M15 15 15 minutes. PERIOD_M30 30 30 minutes. PERIOD_H1 60 1 hour. PERIOD_H4 240 4 hour. PERIOD_D1 1440 D

16、aily. PERIOD_W1 10080 Weekly. PERIOD_MN1 43200 Monthly. 0 (zero) 0 Time frame used on the chart. Trade operation enumeration交易类型Constant Value DescriptionOP_BUY 0 Buying position. OP_SELL 1 Selling position. OP_BUYLIMIT 2 Buy limit pending position. OP_SELLLIMIT 3 Sell limit pending position. OP_BUYSTOP 4 Buy st

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 其它办公文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号