版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領
文檔簡介
1、預定義變量Pre-definedVariablesdoubleAsk通貨的買入價示例:if(iRSI(NULL,0,14,PRICE_CLOSE,0)25)OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-StopLoss*Point,Ask+TakeProfit*Point,Myorder#2,3,D2005.10.1012:30,Red);return;intBars返回圖表中的柱數(shù)示例:intcounter=1;for(inti=1;i75)OrderSend(EURUSD,OP_SELL,Lots,Bid,3,Bid+StopLoss*Point,Bid
2、-TkeProfit*Point,Myorder#2,3,D2005.10.1012:30,Red);return(0);doubleClose返回指定索引位置的收盤價格示例:inthandle,bars=Bars;handle=FileOpen(file.csv,FILE_CSV|FILE_WRITE,;);if(handle0)/writetablecolumnsheadersFileWrite(handle,Time;Open;High;Low;Close;Volume);/writedatafor(inti=0;iFileWrite(handle,Timei,Openi,Highi,L
3、owi,Closei,Volumei);FileClose(handle);intDigits返回當前通貨的匯率小數(shù)位示例:Print(DoubleToStr(Closei-1,Digits);doubleHigh返回指定索引位置的最高價格示例:inthandle,bars=Bars;handle=FileOpen(file.csv,FILE_CSV|FILE_WRITE,;);if(handle0)/writetablecolumnsheadersFileWrite(handle,Time;Open;High;Low;Close;Volume);/writedatafor(inti=0;iF
4、ileWrite(handle,Timei,Openi,Highi,Lowi,Closei,Volumei);FileClose(handle);doubleLow返回指定索引位置的最低價格示例:inthandle,bars=Bars;handle=FileOpen(file.csv,FILE_CSV|FILE_WRITE,;);if(handle0)/writetablecolumnsheadersFileWrite(handle,Time;Open;High;Low;Close;Volume);/writedatafor(inti=0;iFileWrite(handle,Timei,Ope
5、ni,Highi,Lowi,Closei,Volumei);FileClose(handle);doubleOpen返回指定索引位置的開盤價格示例:inthandle,bars=Bars;handle=FileOpen(file.csv,FILE_CSV|FILE_WRITE,;);if(handle0)/writetablecolumnsheadersFileWrite(handle,Time;Open;High;Low;Close;Volume);/writedatafor(inti=0;iFileWrite(handle,Timei,Openi,Highi,Lowi,Closei,Vol
6、umei);FileClose(handle);doublePoint返回當前圖表的點值示例:OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point,Red);datetimeTime返回指定索引位置的時間示例:inthandle,bars=Bars;handle=FileOpen(file.csv,FILE_CSV|FILE_WRITE,;);if(handle0)/writetablecolumnsheadersFileWrite(handle,Time;Open;High;Low;Close;Volume);/writeda
7、tafor(inti=0;iFileWrite(handle,Timei,Openi,Highi,Lowi,Closei,Volumei);FileClose(handle);doubleVolume返回指定索引位置的成交量示例:inthandle,bars=Bars;handle=FileOpen(file.csv,FILE_CSV|FILE_WRITE,;);if(handle0)/writetablecolumnsheadersFileWrite(handle,Time;Open;High;Low;Close;Volume);/eritedatafor(inti=0;iFileWrite
8、(handle,Timei,Openi,Highi,Lowi,Closei,Volumei);FileClose(handle);)Appliedpriceenumeration價格類型枚舉示例:ConstantValueDescriptionPRICE_CLOSE0收盤價PRICE_OPEN1開盤價PRICE_HIGH2最高價PRICE_LOW3最低價PRICE_MEDIAN4最高價和最低價的平均價PRICE_TYPICAL5最高價、最低價和收盤價的平均價開、收盤價和最高最低價的平均價PRICEWEIGHTED6Drawingshapestyleenumeration畫圖形狀樣式枚舉,形狀:
9、ConstantValueDescriptionConstantValueDescriptionConstantValueDescriptionDRAW_LINE0Drawingline.DRAW._SECTION1Drawingsections.DRAW._HISTOGRAM2Drawinghistogram.DRAW_ARROW3Drawingarrows(symbols).DRAW._NONE12Nodrawing.樣式:STYLE_SOLID0Thepenissolid.STYLE_DASH1Thepenisdashed.STYLE_DOT2Thepenisdotted.STYLE_D
10、ASHDOT3Thepenhasalternatingdashesanddots.STYLE_DASHDOTDOT4Thepenhasalternatingdashesanddoubledots.MovingAveragemethodenumeration移動平均線模式枚舉,iAlligator(),iEnvelopes(),iEnvelopesOnArray,iForce(),iGator(),iMA(),iMAOnArray(),iStdDev(),iStdDevOnArray(),iStochastic()這些會調(diào)用此枚舉ConstantValueDescriptionMODE_SMA0
11、Simplemovingaverage,MODE_EMA1Exponentialmovingaverage,MODE_SMMA2Smoothedmovingaverage,MODE_LWMA3Linearweightedmovingaverage.Objectpropertiesenumeration物件屬性枚舉ConstantValueDescriptionOBJPROP_PRICE11Doublevaluetoset/getfirstcoordinatepricepart.OBJPROP_TIME22Datetimevaluetoset/getsecondcoordinatetimepar
12、t.OBJPROP_PRICE23Doublevaluetoset/getsecondcoordinatepricepart.OBJPROP_TIME34Datetimevaluetoset/getthirdcoordinatetimepart.OBJPROP_PRICE35Doublevaluetoset/getthirdcoordinatepricepart.OBJPROP_COLOR6Colorvaluetoset/getobjectcolor.ValueisoneofSTYLE_SOLID,STYLE_DASH,STYLE_DOT,OBJPROP_STYLE7STYLE_DASHDOT
13、,STYLE_DASHDOTDOTconstantstoset/getobjectlinestyle.OBJPROP_WIDTH8Integervaluetoset/getobjectlinewidth.Canbefrom1to5.OBJPROP_BACK9Booleanvaluetoset/getbackgrounddrawingflagforobject.OBJPROP_TIME10Datetimevaluetoset/getfirstcoordinatetimepart.Seriesarrayidentifier系列數(shù)組標識符ConstantValueDescriptionMODE_OP
14、EN0Openprice.MODE_LOW1Lowprice.MODE_HIGH2Highprice.MODE_CLOSE3Closeprice.MODE_VOLUME4Volume,usedinLowest。andHighest。functions.MODE_TIME5Baropentime,usedinArrayCopySeries()function.Timeframeenumeration特殊常量ConstantValueDescriptionPERIOD_M111minute.PERIOD_M555minutes.PERIOD_M151515minutes.PERIOD_M30303
15、0minutes.PERIOD_H1601hour.PERIOD_H42404hour.PERIOD_D11440Daily.PERIOD_W110080Weekly.PERIOD_MN143200Monthly.0(zero)0Timeframeusedonthechart.Tradeoperationenumeration交易類型ConstantValueDescriptionOP_BUY0Buyingposition.OP_SELL1Sellingposition.OP_BUYLIMIT2Buylimitpendingposition.OP_SELLLIMIT3Selllimitpend
16、ingposition.OPBUYSTOP4Buystoppendingposition.OPSELLSTOP5Sellstoppendingposition.Webcolorstable顏色表MMDarkGreenDarkSlateGrayOliveGreenTealNavyPurpleMa一IndigoMidnightBlueDarkBlueDarkOliveGreenSaddleBrownForestGreenOliveDrabSeaGreenDarkGoldenrodDarkSlateBlueSiennaMed-BlueBrownDarkTurquoiseDimGrayLightSea
17、GreenDarkVioletFireBrickMediumVioletRedMediumSeaGreenChocolateCrimsonSteelBlueGoldenrodMediumSpringGreenLawnGreenCadetBlueDarkOrchidYellowGreenLimeGreenOrangeRedDarkOrangeOrangeGoldYellowChartreuseLimeSpringGreenAquaDeepSkyBlueBeMagentaRedGraySlateGrayPeruBlueVioletLightSlateGrayDeepPinkMediumTurquo
18、iseDodgerBlueTurquoiseRoyalBlueSlateBlueDarkKhakiIndianRedMediumOrchidGreenYellowMediumAquamarineDarkSeaGreenTomatoRosyBrownOrchidMediumPurplePaleVioletRedCoralCornflowerBlueDarkGraySandyBrownMediumSlateBlueTanDarkSalmonBurlyWoodHotPinkSalmonVioletLightCoralSkyBlueLightSalmonPlumKhakiLightGreenAquam
19、arineSilverLightSkyBlueLightSteelBlueLightBluePaleGreenThistlePowderBluePaleGoldenrodPaleTurquoiseLightGreyWheatNavajoWhiteMoccasinLightPinkGainsboroPeachPuffPinkBisqueLightGoldenRodBlanchedAlmondLemonChiffonBeigeAntiqueWhitePapayaWhipCornsilkLightYellowLightCyanLinenLavenderMistyRoseOldLaceWhiteSmo
20、keSeashellIvoryHoneydewAliceBlueLavenderBlushMintCreamSnowWhite技術(shù)指標調(diào)用TechnicalIndicatorcallsdoubleiAC(stringsymbol,inttimeframe,intshift)計算BillWilliamsAccelerator/Deceleratoroscillator的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線shift-位移數(shù)示例:doubleresult=iAC(NULL,0,1);doubleiAD(stringsymbol,inttimeframe,intshift)計
21、算Accumulation/Distributionindicator的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線shift-位移數(shù)示例:doubleresult=iAD(NULL,0,1);doubleiAlligator(stringsymbol,inttimeframe,intjaw_period,intjaw_shift,intteeth_period,intteeth_shift,intlips_period,intlips_shift,intma_method,intapplied_price,intmode,intshift)計算BillWilliamsAlli
22、gator的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線jaw_period-顎線周期jaw_shift-顎線位移teeth_period-齒線周期teeth_shift-齒線位移lips_period-唇線周期lips_shift-唇線位移ma_method-移動平均線種類applied_price-應用價格類型mode-來源模式,MODE_GATORJAW,MODE_GATORTEETH或MODE_GATORLIPSshift-位移數(shù)doublejaw_val=iAlligator(NULl,0,13,8,8,5,5,3,MODE_SMMA,PRICE_MEDIAN,MOD
23、E_GATORJAW,1);doubleiADX(stringsymbol,inttimeframe,intperiod,intapplied_price,intmode,intshift)計算Movementdirectionalindex的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線period-周期applied_price-應用價格類型mode-來源模式,參見指標線分類枚舉shift-位移數(shù)if(iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,0)iADX(NULL,0,14,PRICE_HIGH,MODE_PLUSDI,0)return(0);
24、doubleiATR(stringsymbol,inttimeframe,intperiod,intshift)計算Indicatoroftheaveragetruerange的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線period-周期shift-位移數(shù)if(iATR(NULL,0,12,0)iATR(NULL,0,20,0)return(0);doubleiAO(stringsymbol,inttimeframe,intshift)計算BillWilliamsAwesomeoscillator的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線shift-位移數(shù)
25、doubleval=iAO(NULL,0,2);doubleiBearsPower(stringsymbol,inttimeframe,intperiod,intapplied_price,intshift)計算BearsPowerindicator的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線period-周期applied_price-應用價格類型shift-位移數(shù)doubleval=iBearsPower(NULL,0,13,PRICE_CLOSE,0);doubleiBands(stringsymbol,inttimeframe,intperiod,intdeviati
26、on,intbands_shift,intapplied_price,intmode,intshift)計算Bollingerbandsindicator的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線period-周期deviation-背離bands_shift-Bands位移applied_price-應用價格類型mode-來源模式,參見指標線分類枚舉shift-位移數(shù)if(iBands(NULL,0,20,2,0,PRICE_LOW,MODE_LOWER,0)Low0)return(0);doubleiBandsOnArray(doublearray,inttotal,i
27、ntperiod,doubledeviation,intbands_shift,intmode,intshift)從數(shù)組中計算Bollingerbandsindicator的值:輸入?yún)?shù)array-數(shù)組數(shù)據(jù)total-總數(shù)據(jù)數(shù)量period-周期deviation-背離bands_shift-Bands位移applied_price-應用價格類型mode-來源模式,參見指標線分類枚舉shift-位移數(shù)if(iBands(NULL,0,20,2,0,PRICE_LOW,MODE_LOWER,0)Low0)return(0);doubleiBullsPower(stringsymbol,intti
28、meframe,intperiod,intapplied_price,intshift)計算BullsPowerindicator的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線period-周期applied_price-應用價格類型shift-位移數(shù)doubleval=iBullsPower(NULL,0,13,PRICE_CLOSE,0);doubleiCCI(stringsymbol,inttimeframe,intperiod,intapplied_price,intshift)計算Commoditychannelindex的值:輸入?yún)?shù)symbol-通貨標識timef
29、rame-時間線period-周期applied_price-應用價格類型shift-位移數(shù)if(iCCI(NULL,0,12,0)iCCI(NULL,0,20,0)return(0);doubleiCCIOnArray(doublearray,inttotal,intperiod,intshift)從數(shù)組中計算Commoditychannelindex的值:輸入?yún)?shù)array-數(shù)組數(shù)據(jù)total-總數(shù)據(jù)數(shù)量period-周期shift-位移數(shù)if(iCCIOnArray(ExtBuffer,total,12,0)iCCI(NULL,0,20,PRICE_OPEN,0)return(0);do
30、ubleiCustom(stringsymbol,inttimeframe,stringname,.,intmode,intshift)計算自定義指標的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線name-自定義指標名稱.-自定義指標參數(shù)mode-來源模式,參見指標線分類枚舉shift-位移數(shù)doubleval=iCustom(NULL,0,SampleInd,13,1,0);doubleiDeMarker(stringsymbol,inttimeframe,intperiod,intshift)計算DeMarkerindicator的值:輸入?yún)?shù)symbol-通貨標識time
31、frame-時間線period-周期shift-位移數(shù)doubleval=iDeMarker(NULL,0,13,1);doubleiEnvelopes(stringsymbol,inttimeframe,intma_period,intma_method,intma_shift,intapplied_price,doubledeviation,intmode,intshift)計算Envelopesindicator的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線ma_period-移動平均線周期ma_method-移動平均線模式ma_shift-移動平均線位移applied_
32、price-應用價格類型deviation-背離mode-來源模式,參見指標線分類枚舉shift-位移數(shù)doubleval=iEnvelopes(NULL,0,13,MODE_SMA,10,PRICE_CLOSE,0.2,MODE_UPPER,0);doubleiEnvelopesOnArray(doublearray,inttotal,intma_period,intma_method,intma_shift,doubledeviation,intmode,intshift)從數(shù)組中計算Envelopesindicator的值:輸入?yún)?shù)array-數(shù)組數(shù)據(jù)total-總數(shù)據(jù)數(shù)量ma_peri
33、od-移動平均線周期ma_method-移動平均線模式ma_shift-移動平均線位移deviation-背離mode-來源模式,參見指標線分類枚舉shift-位移數(shù)doubleval=iEnvelopesOnArray(ExtBuffer,0,13,MODE_SMA,0.2,MODE_UPPER,0);doubleiForce(stringsymbol,inttimeframe,intperiod,intma_method,intapplied_price,intshift)計算Forceindex的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線period-周期ma_meth
34、od-移動平均線模式applied_price-應用價格類型shift-位移數(shù)doubleval=iForce(NULL,0,13,MODE_SMA,PRICE_CLOSE,0);doubleiFractals(stringsymbol,inttimeframe,intmode,intshift)計算Fractals的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線mode-來源模式,參見指標線分類枚舉shift-位移數(shù)doubleval=iFractals(NULL,0,MODE_UPPER,0);doubleiGator(stringsymbol,inttimeframe,in
35、tjaw_period,intjaw_shift,intteeth_period,intteeth_shift,intlips_period,intlips_shift,intma_method,intapplied_price,intmode,intshift)計算Fractals的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線jaw_period-顎線周期jaw_shift-顎線位移teeth_period-齒線周期teeth_shift-齒線位移lips_period-唇線周期lips_shift-唇線位移ma_method-移動平均線種類applied_price-應用價
36、格類型mode-來源模式,參見指標線分類枚舉shift-位移數(shù)doublejaw_val=iGator(NULL,0,13,8,8,5,5,3,MODE_SMMA,PRICE_MEDIAN,MODE_UPPER,1);doubleiIchimoku(stringsymbol,inttimeframe,inttenkan_sen,intkijun_sen,intsenkou_span_b,intmode,intshift)計算IchimokuKinkoHyo的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線tenkan_sen-轉(zhuǎn)換線jkijun_sen-基準線senkou_span
37、_b-參考圍bmode-來源模式,參見指標線分類枚舉shift-位移數(shù)doubletenkan_sen=iIchimoku(NULL,0,9,26,52,MODE_TENKANSEN,1);doubleiBWMFI(stringsymbol,inttimeframe,intshift)計算BillWilliamsMarketFacilitationindex的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線shift-位移數(shù)doubleval=iBWMFI(NULL,0,0);doubleiMomentum(stringsymbol,inttimeframe,intperiod,i
38、ntapplied_price,intshift)計算Momentumindicator的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線period-周期applied_price-應用價格類型shift-位移數(shù)if(iMomentum(NULL,0,12,PRICE_CLOSE,0)iMomentum(NULL,0,20,PRICE_CLOSE,0)return(0);doubleiMomentumOnArray(doublearray,inttotal,intperiod,intshift)從數(shù)組中計算Momentumindicator的值:輸入?yún)?shù)array-數(shù)組數(shù)據(jù)tot
39、al-總數(shù)據(jù)數(shù)量period-周期shift-位移數(shù)if(iMomentumOnArray(mybuffer,100,12,0)iMomentumOnArray(mubuffer,100,20,0)return(0);doubleiMFI(stringsymbol,inttimeframe,intperiod,intshift)計算Moneyflowindex的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線period-周期shift-位移數(shù)if(iMFI(NULL,0,14,0)iMFI(NULL,0,14,1)return(0);doubleiMA(stringsymbol,
40、inttimeframe,intperiod,intma_shift,intma_method,intapplied_price,intshift)計算Movingaverageindicator的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線period-周期ma_shift-移動平均線位移ma_method-移動平均線模式applied_price-應用價格類型shift-位移數(shù)AlligatorJawsBufferi=iMA(NULL,0,13,8,MODE_SMMA,PRICE_MEDIAN,i);doubleiMAOnArray(doublearray,inttotal
41、,intperiod,intma_shift,intma_method,intshift)從數(shù)組中計算Movingaverageindicator的值:輸入?yún)?shù)array-數(shù)組數(shù)據(jù)total-總數(shù)據(jù)數(shù)量period-周期ma_shift-移動平均線位移ma_method-移動平均線模式shift-位移數(shù)doublemacurrent=iMAOnArray(ExtBuffer,0,5,0,MODE_LWMA,0);doublemacurrentslow=iMAOnArray(ExtBuffer70,10,0,MODE_LWMA,0);doublemaprev=iMAOnArray(ExtBuff
42、er,0,5,0,MODE_LWMA,1);doublemaprevslow=iMAOnArray(ExtBuffer,0,10,0,MODE_LWMA,1);/if(maprev=macurrentslow)Alert(crossingup);doubleiOsMA(stringsymbol,inttimeframe,intfast_ema_period,intslow_ema_period,intsignal_period,intapplied_price,intshift)計算MovingAverageofOscillator的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線
43、fast_ema_period-快均線周期slow_ema_period-慢均線周期signal_period-信號周期applied_price-應用價格類型shift-位移數(shù)if(iOsMA(NULL,0,12,26,9,PRICE_OPEN,1)iOsMA(NULL,0,12,26,9,PRICE_OPEN,0)return(0);doubleiMACD(stringsymbol,inttimeframe,intfast_ema_period,intslow_ema_period,intsignal_period,intapplied_price,intmode,intshift)計算M
44、ovingaveragesconvergence/divergence的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線fast_ema_period-快均線周期slow_ema_period-慢均線周期signal_period-信號周期applied_price-應用價格類型mode-來源模式,參見指標線分類枚舉shift-位移數(shù)if(iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0)iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,0)return(0);doubleiOBV(stringsymb
45、ol,inttimeframe,intapplied_price,intshift)計算OnBalanceVolumeindicator的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線period-周期shift-位移數(shù)doubleval=iOBV(NULL,0,PRICE_CLOSE,1);doubleiSAR(stringsymbol,inttimeframe,doublestep,doublemaximum,intshift)計算OnBalanceVolumeindicator的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線step-步幅maximum-最大值
46、shift-位移數(shù)if(iSAR(NULL,0,0O2,O2,0)Close0)return(0);doubleiRSI(stringsymbol,voidtimeframe,intperiod,intapplied_price,intshift)計算Relativestrengthindex的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線period-周期applied_price-應用價格類型shift-位移數(shù)if(iRSI(NULL,0,14,PRICE_CLOSE,0)iRSI(NULL,0,14,PRICE_CLOSE,1)return(0);doubleiRSIOnA
47、rray(doublearray,inttotal,intperiod,intshift)從數(shù)組中計算Relativestrengthindex的值:輸入?yún)?shù)array-數(shù)組數(shù)據(jù)total-總數(shù)據(jù)數(shù)量period-周期shift-位移數(shù)if(iRSIOnBuffer(ExtBuffer,1000,14,0)iRSI(NULL,0,14,PRICE_CLOSE,1)return(0);doubleiRVI(stringsymbol,inttimeframe,intperiod,intmode,intshift)計算RelativeVigorindex的值:輸入?yún)?shù)symbol-通貨標識timef
48、rame-時間線period-周期mode-來源模式,參見指標線分類枚舉shift-位移數(shù)doubleval=iRVI(NULL,0,10,MODE_MAIN,0);doubleiStdDev(stringsymbol,inttimeframe,intma_period,intma_method,intma_shift,intapplied_price,intshift)計算StandardDeviationindicator的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線ma_period-移動平均線周期ma_method-移動平均線模式ma_shift-移動平均線位移appl
49、ied_price-應用價格類型shift-位移數(shù)doubleval=iStdDev(NULL,0,10,MODE_EMA,0,PRICE_CLOSE,0);doubleiStdDevOnArray(doublearray,inttotal,intma_period,intma_method,intma_shift,intshift)從數(shù)組中計算StandardDeviationindicator的值:輸入?yún)?shù)array-數(shù)組數(shù)據(jù)total-總數(shù)據(jù)數(shù)量ma_period-移動平均線周期ma_method-移動平均線模式ma_shift-移動平均線位移shift-位移數(shù)doubleval=iSt
50、dDevOnArray(ExtBuffer,100,10,MODE_EMA,0,0);doubleiStochastic(stringsymbol,inttimeframe,int%Kperiod,int%Dperiod,intslowing,intmethod,intprice_field,intmode,intshift)計算Stochasticoscillator的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線%Kperiod-%K線周期%Dperiod-%D線周期slowing-減速量method-移動平均線種類price_field-價格領域參數(shù):0-Low/Higho
51、r1-Close/Close.mode-來源模式,參見指標線分類枚舉shift-位移數(shù)if(iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,0)iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,0)return(0);doubleiWPR(stringsymbol,inttimeframe,intperiod,intshift)計算LarryWilliamspercentrangeindicator的值:輸入?yún)?shù)symbol-通貨標識timeframe-時間線period-周期shift-位移數(shù)if(iW
52、PR(NULL,0,14,0)iWPR(NULL,0,14,1)return(0);intiBars(stringsymbol,inttimeframe)返回制定圖表的數(shù)據(jù)數(shù):輸入?yún)?shù)symbol-通貨標識timeframe-時間線Print(BarcountontheEUROUSDsymbolwithPERIOD_H1is,iBars(EUROUSD,PERIOD_H1);intiBarShift(stringsymbol,inttimeframe,datetimetime,boolexact=false)在制定圖表中搜索數(shù)據(jù):輸入?yún)?shù)symbol-通貨標識timeframe-時間線time
53、-時間exact-是否精確的datetimesome_time=D2004.03.2112:00;intshift=iBarShift(EUROUSD,PERIOD_M1,some_time);Print(shiftofbarwithopentime,TimeToStr(some_time),is,shift);doubleiClose(stringsymbol,inttimeframe,intshift)返回制定圖表的收盤價:輸入?yún)?shù)symbol-通貨標識timeframe-時間線shift-位移數(shù)Print(CurrentbarforUSDCHFH1:,iTime(USDCHF,PERIO
54、D_H1,i),iOpen(USDCHF,PERIOD_H1,i),iHigh(USDCHF,PERIOD_H1,i),iLow(USDCHF,PERIOD_H1,i),iClose(USDCHF,PERIOD_H1,i),iVolume(USDCHF,PERIOD_H1,i);doubleiHigh(stringsymbol,inttimeframe,intshift)返回制定圖表的最高價:輸入?yún)?shù)symbol-通貨標識timeframe-時間線shift-位移數(shù)Print(CurrentbarforUSDCHFH1:,iTime(USDCHF,PERIOD_H1,i),iOpen(USDC
55、HF,PERIOD_H1,i),iHigh(USDCHF,PERIOD_H1,i),iLow(USDCHF,PERIOD_H1,i),iClose(USDCHF,PERIOD_H1,i),iVolume(USDCHF,PERIOD_H1,i);doubleiLow(stringsymbol,inttimeframe,intshift)返回制定圖表的最低價:輸入?yún)?shù)symbol-通貨標識timeframe-時間線shift-位移數(shù)Print(CurrentbarforUSDCHFH1:,iTime(USDCHF,PERIOD_H1,i),iOpen(USDCHF,PERIOD_H1,i),iHi
56、gh(USDCHF,PERIOD_H1,i),iLow(USDCHF,PERIOD_H1,i),iClose(USDCHF,PERIOD_H1,i),iVolume(USDCHF,PERIOD_H1,i);doubleiOpen(stringsymbol,inttimeframe,intshift)返回制定圖表的開盤價:輸入?yún)?shù)symbol-通貨標識timeframe-時間線shift-位移數(shù)Print(CurrentbarforUSDCHFH1:,iTime(USDCHF,PERIOD_H1,i),iOpen(USDCHF,PERIOD_H1,i),iHigh(USDCHF,PERIOD_H1,i),iLow(USDCHF,PERIOD_H1,i),iClose(USDCHF,PERIOD_H1,i),iVolume(USDCHF,PERIOD_H1,i);datetimeiTime(stringsymbol,inttimeframe,intshift)返回制定圖表的時間:輸入?yún)?shù)symbol-通貨標識timeframe-時間線shift-位移數(shù)Print(CurrentbarforUSDCHFH1:,iTime(
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年學校編輯個人工作計劃
- Unit5 Whose dog is it?Part B Lets talk(說課稿)-2023-2024學年人教PEP版英語五年級下冊
- Unit3 My day 第二課時(說課稿)-2023-2024學年譯林版(三起)英語四年級下冊
- 2025年幼兒教學計劃幼兒小班教育教學計劃
- 人教版歷史與社會初中七年級上冊 3.2.2 山地之國 說課稿
- 2025幼兒園每周工作計劃表
- Unit2 Different families(說課稿)-2024-2025學年人教PEP版(2024)英語三年級上冊
- 休閑鹵制食品相關(guān)項目投資計劃書
- IVL檢測系統(tǒng)相關(guān)行業(yè)投資方案
- 2025年幼兒園安全工作計劃范例
- 零碳智慧園區(qū)解決方案
- 2025年林權(quán)抵押合同范本
- 2024年北師大版四年級數(shù)學上學期學業(yè)水平測試 期末卷(含答案)
- 2024年高考物理一輪復習講義(新人教版):第七章動量守恒定律
- 浙江省寧波市慈溪市2023-2024學年高三上學期語文期末測試試卷
- 草學類專業(yè)生涯發(fā)展展示
- 法理學課件馬工程
- 《玉米種植技術(shù)》課件
- 第47屆世界技能大賽江蘇省選拔賽計算機軟件測試項目技術(shù)工作文件
- 2023年湖北省公務員錄用考試《行測》答案解析
- M200a電路分析(電源、藍牙、FM)
評論
0/150
提交評論