资源预览内容
第1页 / 共36页
第2页 / 共36页
第3页 / 共36页
第4页 / 共36页
第5页 / 共36页
第6页 / 共36页
第7页 / 共36页
第8页 / 共36页
第9页 / 共36页
第10页 / 共36页
亲,该文档总共36页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
预定义变量 Pre-defined Variables double Ask通货的买入价示例:if(iRSI(NULL,0,14,PRICE_CLOSE,0)25)OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-StopLoss*Point,Ask+TakeProfit*Point,My order #2,3,D2005.10.10 12:30,Red);return;int Bars返回图表中的柱数示例:int counter=1;for(int i=1;i75)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,;);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, 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=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;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,Lots,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, Closei, 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, Closei, Volumei);FileClose(handle);)Applied price enumeration价格类型枚举示例:ConstantValueDescriptionPRICE_CLOSE 0 收盘价PRICE_OPEN 1 开盘价PRICE_HIGH 2 最高价PRICE_LOW 3 最低价PRICE_MEDIAN 4 最高价和最低价的平均价PRICE_TYPICAL 5 最高价、最低价和收盘价的平均价PRICE_WEIGHTED 6 开、收盘价和最高最低价的平均价Drawing shape style enumeration画图形状样式枚举,形状:ConstantValueDescriptionDRAW_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. 样式:ConstantValueDescriptionSTYLE_SOLID 0 The pen is solid. STYLE_DASH 1 The pen is dashed. STYLE_DOT 2 The pen is dotted. STYLE_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()这些会调用此枚举ConstantValueDescriptionMODE_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物件属性枚举ConstantValueDescriptionOBJPROP_TIME1 0 Datetime value to set/get first coordinate 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. OBJPROP_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 object line width. Can be from 1 to 5. OBJPROP_BACK 9 Boolean value to set/get background drawing flag for object. Series array identifier系列数组标识符ConstantValueDescriptionMODE_OPE
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号