技术指标调用 [Technical Indicator calls]
<-- begin content -->由 帝国程序员 在 周四, 2005-10-27 21:06 提交
double iAD( string symbol, int timeframe, int shift)
计算 Accumulation/Distribution indicator 的值
double iAlligator( string symbol, int timeframe, int jaw_period, int jaw_shift, int teeth_period, int teeth_shift, int lips_period, int lips_shift, int ma_method, int applied_price, int mode, int shift)
计算 Bill Williams' Alligator 的值
double iADX( string symbol, int timeframe, int period, int applied_price, int mode, int shift)
计算 Movement directional index 的值
double iATR( string symbol, int timeframe, int period, int shift)
计算 Indicator of the average true range 的值
double iAO( string symbol, int timeframe, int shift)
计算 Bill Williams' Awesome oscillator 的值
double iBearsPower( string symbol, int timeframe, int period, int applied_price, int shift)
计算 Bears Power indicator 的值
double iBands( string symbol, int timeframe, int period, int deviation, int bands_shift, int applied_price, int mode, int shift)
计算 Bollinger bands indicator 的值
double iBandsOnArray( double array[], int total, int period, double deviation, int bands_shift, int mode, int shift)
从数组中计算 Bollinger bands indicator 的值
double iBullsPower( string symbol, int timeframe, int period, int applied_price, int shift)
计算 Bulls Power indicator 的值
double iCCI( string symbol, int timeframe, int period, int applied_price, int shift)
计算 Commodity channel index 的值
double iCCIOnArray( double array[], int total, int period, int shift)
从数组中计算 Commodity channel index 的值
double iCustom( string symbol, int timeframe, string name, ... , int mode, int shift)
计算 自定义指标 的值
double iDeMarker( string symbol, int timeframe, int period, int shift)
计算 DeMarker indicator 的值
double iEnvelopes( string symbol, int timeframe, int ma_period, int ma_method, int ma_shift, int applied_price, double deviation, int mode, int shift)
计算 Envelopes indicator 的值
double iEnvelopesOnArray( double array[], int total, int ma_period, int ma_method, int ma_shift, double deviation, int mode, int shift)
从数组中计算 Envelopes indicator 的值
double iForce( string symbol, int timeframe, int period, int ma_method, int applied_price, int shift)
计算 Force index 的值
double iFractals( string symbol, int timeframe, int mode, int shift)
计算 Fractals 的值
double iGator( string symbol, int timeframe, int jaw_period, int jaw_shift, int teeth_period, int teeth_shift, int lips_period, int lips_shift, int ma_method, int applied_price, int mode, int shift)
计算 Fractals 的值
double iIchimoku( string symbol, int timeframe, int tenkan_sen, int kijun_sen, int senkou_span_b, int mode, int shift)
计算 Ichimoku Kinko Hyo 的值
double iBWMFI( string symbol, int timeframe, int shift)
计算 Bill Williams Market Facilitation index 的值
double iMomentum( string symbol, int timeframe, int period, int applied_price, int shift)
计算 Momentum indicator 的值
double iMomentumOnArray( double array[], int total, int period, int shift)
从数组中计算 Momentum indicator 的值
double iMFI( string symbol, int timeframe, int period, int shift)
计算 Money flow index 的值
double iAC( string symbol, int timeframe, int shift)
计算 Bill Williams' Accelerator/Decelerator oscillator 的值
示例:
double result=iAC(NULL, 0, 1);
double iAD( string symbol, int timeframe, int shift)
计算 Accumulation/Distribution indicator 的值
示例:
double result=iAD(NULL, 0, 1);
double iAlligator( string symbol, int timeframe, int jaw_period, int jaw_shift, int teeth_period, int teeth_shift, int lips_period, int lips_shift, int ma_method, int applied_price, int mode, int shift)
计算 Bill Williams' Alligator 的值
double jaw_val=iAlligator(NULl, 0, 13, 8, 8, 5, 5, 3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORJAW, 1);
double iADX( string symbol, int timeframe, int period, int applied_price, int mode, int shift)
计算 Movement directional index 的值
if(iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,0)>iADX(NULL,0,14,PRICE_HIGH,MODE_PLUSDI,0)) return(0);
double iATR( string symbol, int timeframe, int period, int shift)
计算 Indicator of the average true range 的值
if(iATR(NULL,0,12,0)>iATR(NULL,0,20,0)) return(0);
double iAO( string symbol, int timeframe, int shift)
计算 Bill Williams' Awesome oscillator 的值
double val=iAO(NULL, 0, 2);
double iBearsPower( string symbol, int timeframe, int period, int applied_price, int shift)
计算 Bears Power indicator 的值
double val=iBearsPower(NULL, 0, 13,PRICE_CLOSE,0);
double iBands( string symbol, int timeframe, int period, int deviation, int bands_shift, int applied_price, int mode, int shift)
计算 Bollinger bands indicator 的值
if(iBands(NULL,0,20,2,0,PRICE_LOW,MODE_LOWER,0)>Low[0]) return(0);
double iBandsOnArray( double array[], int total, int period, double deviation, int bands_shift, int mode, int shift)
从数组中计算 Bollinger bands indicator 的值
if(iBands(NULL,0,20,2,0,PRICE_LOW,MODE_LOWER,0)>Low[0]) return(0);
double iBullsPower( string symbol, int timeframe, int period, int applied_price, int shift)
计算 Bulls Power indicator 的值
double val=iBullsPower(NULL, 0, 13,PRICE_CLOSE,0);
double iCCI( string symbol, int timeframe, int period, int applied_price, int shift)
计算 Commodity channel index 的值
if(iCCI(NULL,0,12,0)>iCCI(NULL,0,20,0)) return(0);
double iCCIOnArray( double array[], int total, int period, int shift)
从数组中计算 Commodity channel index 的值
if(iCCIOnArray(ExtBuffer,total,12,0)>iCCI(NULL,0,20,PRICE_OPEN, 0)) return(0);
double iCustom( string symbol, int timeframe, string name, ... , int mode, int shift)
计算 自定义指标 的值
double val=iCustom(NULL, 0, "SampleInd",13,1,0);
double iDeMarker( string symbol, int timeframe, int period, int shift)
计算 DeMarker indicator 的值
double val=iDeMarker(NULL, 0, 13, 1);
double iEnvelopes( string symbol, int timeframe, int ma_period, int ma_method, int ma_shift, int applied_price, double deviation, int mode, int shift)
计算 Envelopes indicator 的值
double val=iEnvelopes(NULL, 0, 13,MODE_SMA,10,PRICE_CLOSE,0.2,MODE_UPPER,0);
double iEnvelopesOnArray( double array[], int total, int ma_period, int ma_method, int ma_shift, double deviation, int mode, int shift)
从数组中计算 Envelopes indicator 的值
double val=iEnvelopesOnArray(ExtBuffer, 0, 13, MODE_SMA, 0.2, MODE_UPPER,0 );
double iForce( string symbol, int timeframe, int period, int ma_method, int applied_price, int shift)
计算 Force index 的值
double val=iForce(NULL, 0, 13,MODE_SMA,PRICE_CLOSE,0);
double iFractals( string symbol, int timeframe, int mode, int shift)
计算 Fractals 的值
double val=iFractals(NULL, 0, MODE_UPPER,0);
double iGator( string symbol, int timeframe, int jaw_period, int jaw_shift, int teeth_period, int teeth_shift, int lips_period, int lips_shift, int ma_method, int applied_price, int mode, int shift)
计算 Fractals 的值
double jaw_val=iGator(NULL, 0, 13, 8, 8, 5, 5, 3, MODE_SMMA, PRICE_MEDIAN, MODE_UPPER, 1);
double iIchimoku( string symbol, int timeframe, int tenkan_sen, int kijun_sen, int senkou_span_b, int mode, int shift)
计算 Ichimoku Kinko Hyo 的值
double tenkan_sen=iIchimoku(NULL, 0, 9, 26, 52, MODE_TENKANSEN, 1);
double iBWMFI( string symbol, int timeframe, int shift)
计算 Bill Williams Market Facilitation index 的值
double val=iBWMFI(NULL, 0, 0);
double iMomentum( string symbol, int timeframe, int period, int applied_price, int shift)
计算 Momentum indicator 的值
if(iMomentum(NULL,0,12,PRICE_CLOSE,0)>iMomentum(NULL,0,20,PRICE_CLOSE,0)) return(0);
double iMomentumOnArray( double array[], int total, int period, int shift)
从数组中计算 Momentum indicator 的值
if(iMomentumOnArray(mybuffer,100,12,0)>iMomentumOnArray(mubuffer,100,20,0)) return(0);
double iMFI( string symbol, int timeframe, int period, int shift)
计算 Money flow index 的值
if(iMFI(NULL,0,14,0)>iMFI(NULL,0,14,1)) return(0);
double iMA( string symbol, int timeframe, int period, int ma_shift, int ma_method, int applied_price, int shift)
计算 Moving average indicator 的值
double iMAOnArray( double array[], int total, int period, int ma_shift, int ma_method, int shift)
从数组中计算 Moving average indicator 的值
double iOsMA( string symbol, int timeframe, int fast_ema_period, int slow_ema_period, int signal_period, int applied_price, int shift)
计算 Moving Average of Oscillator 的值
double iMACD( string symbol, int timeframe, int fast_ema_period, int slow_ema_period, int signal_period, int applied_price, int mode, int shift)
计算 Moving averages convergence/divergence 的值
double iOBV( string symbol, int timeframe, int applied_price, int shift)
计算 On Balance Volume indicator 的值
double iSAR( string symbol, int timeframe, double step, double maximum, int shift)
计算 On Balance Volume indicator 的值
double iRSI( string symbol, void timeframe, int period, int applied_price, int shift)
计算 Relative strength index 的值
double iRSIOnArray( double array[], int total, int period, int shift)
从数组中计算 Relative strength index 的值
double iRVI( string symbol, int timeframe, int period, int mode, int shift)
计算 Relative Vigor index 的值
double iStdDev( string symbol, int timeframe, int ma_period, int ma_method, int ma_shift, int applied_price, int shift)
计算 Standard Deviation indicator 的值
double iStdDevOnArray( double array[], int total, int ma_period, int ma_method, int ma_shift, int shift)
从数组中计算 Standard Deviation indicator 的值
double iStochastic( string symbol, int timeframe, int %Kperiod, int %Dperiod, int slowing, int method, int price_field, int mode, int shift)
计算 Stochastic oscillator 的值
double iWPR( string symbol, int timeframe, int period, int shift)
计算 Larry William's percent range indicator 的值
int iBars( string symbol, int timeframe)
返回制定图表的数据数
int iBarShift( string symbol, int timeframe, datetime time, bool exact=false)
在制定图表中搜索数据
double iClose( string symbol, int timeframe, int shift)
返回制定图表的收盘价
double iHigh( string symbol, int timeframe, int shift)
返回制定图表的最高价
double iLow( string symbol, int timeframe, int shift)
返回制定图表的最低价
double iOpen( string symbol, int timeframe, int shift)
返回制定图表的开盘价
datetime iTime( string symbol, int timeframe, int shift)
返回制定图表的时间
double iVolume( string symbol, int timeframe, int shift)
返回制定图表的成交量
int Highest( string symbol, int timeframe, int type, int count=WHOLE_ARRAY, int start=0)
返回制定图表的某段数据的最高值
int Lowest( string symbol, int timeframe, int type, int count=WHOLE_ARRAY, int start=0)
返回制定图表的某段数据的最高值
计算 Moving average indicator 的值
AlligatorJawsBuffer[i]=iMA(NULL,0,13,8,MODE_SMMA,PRICE_MEDIAN,i);
double iMAOnArray( double array[], int total, int period, int ma_shift, int ma_method, int shift)
从数组中计算 Moving average indicator 的值
double macurrent=iMAOnArray(ExtBuffer,0,5,0,MODE_LWMA,0);
double macurrentslow=iMAOnArray(ExtBuffer,0,10,0,MODE_LWMA,0);
double maprev=iMAOnArray(ExtBuffer,0,5,0,MODE_LWMA,1);
double maprevslow=iMAOnArray(ExtBuffer,0,10,0,MODE_LWMA,1);
//----
if(maprev =macurrentslow)
Alert("crossing up");
double macurrentslow=iMAOnArray(ExtBuffer,0,10,0,MODE_LWMA,0);
double maprev=iMAOnArray(ExtBuffer,0,5,0,MODE_LWMA,1);
double maprevslow=iMAOnArray(ExtBuffer,0,10,0,MODE_LWMA,1);
//----
if(maprev
Alert("crossing up");
double iOsMA( string symbol, int timeframe, int fast_ema_period, int slow_ema_period, int signal_period, int applied_price, int shift)
计算 Moving Average of Oscillator 的值
if(iOsMA(NULL,0,12,26,9,PRICE_OPEN,1)>iOsMA(NULL,0,12,26,9,PRICE_OPEN,0)) return(0);
double iMACD( string symbol, int timeframe, int fast_ema_period, int slow_ema_period, int signal_period, int applied_price, int mode, int shift)
计算 Moving averages convergence/divergence 的值
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);
double iOBV( string symbol, int timeframe, int applied_price, int shift)
计算 On Balance Volume indicator 的值
double val=iOBV(NULL, 0, PRICE_CLOSE, 1);
double iSAR( string symbol, int timeframe, double step, double maximum, int shift)
计算 On Balance Volume indicator 的值
if(iSAR(NULL,0,0.02,0.2,0)>Close[0]) return(0);
double iRSI( string symbol, void timeframe, int period, int applied_price, int shift)
计算 Relative strength index 的值
if(iRSI(NULL,0,14,PRICE_CLOSE,0)>iRSI(NULL,0,14,PRICE_CLOSE,1)) return(0);
double iRSIOnArray( double array[], int total, int period, int shift)
从数组中计算 Relative strength index 的值
if(iRSIOnBuffer(ExtBuffer,1000,14,0)>iRSI(NULL,0,14,PRICE_CLOSE,1)) return(0);
double iRVI( string symbol, int timeframe, int period, int mode, int shift)
计算 Relative Vigor index 的值
double val=iRVI(NULL, 0, 10,MODE_MAIN,0);
double iStdDev( string symbol, int timeframe, int ma_period, int ma_method, int ma_shift, int applied_price, int shift)
计算 Standard Deviation indicator 的值
double val=iStdDev(NULL,0,10,MODE_EMA,0,PRICE_CLOSE,0);
double iStdDevOnArray( double array[], int total, int ma_period, int ma_method, int ma_shift, int shift)
从数组中计算 Standard Deviation indicator 的值
double val=iStdDevOnArray(ExtBuffer,100,10,MODE_EMA,0,0);
double iStochastic( string symbol, int timeframe, int %Kperiod, int %Dperiod, int slowing, int method, int price_field, int mode, int shift)
计算 Stochastic oscillator 的值
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);
return(0);
double iWPR( string symbol, int timeframe, int period, int shift)
计算 Larry William's percent range indicator 的值
if(iWPR(NULL,0,14,0)>iWPR(NULL,0,14,1)) return(0);
int iBars( string symbol, int timeframe)
返回制定图表的数据数
Print("Bar count on the 'EUROUSD' symbol with PERIOD_H1 is",iBars("EUROUSD",PERIOD_H1));
int iBarShift( string symbol, int timeframe, datetime time, bool exact=false)
在制定图表中搜索数据
datetime some_time=D'2004.03.21 12:00';
int shift=iBarShift("EUROUSD",PERIOD_M1,some_time);
Print("shift of bar with open time ",TimeToStr(some_time)," is ",shift);
int shift=iBarShift("EUROUSD",PERIOD_M1,some_time);
Print("shift of bar with open time ",TimeToStr(some_time)," is ",shift);
double iClose( string symbol, int timeframe, int shift)
返回制定图表的收盘价
Print("Current bar for USDCHF H1: ",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));
iHigh("USDCHF",PERIOD_H1,i),", ", iLow("USDCHF",PERIOD_H1,i),", ",
iClose("USDCHF",PERIOD_H1,i),", ", iVolume("USDCHF",PERIOD_H1,i));
double iHigh( string symbol, int timeframe, int shift)
返回制定图表的最高价
Print("Current bar for USDCHF H1: ",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));
iHigh("USDCHF",PERIOD_H1,i),", ", iLow("USDCHF",PERIOD_H1,i),", ",
iClose("USDCHF",PERIOD_H1,i),", ", iVolume("USDCHF",PERIOD_H1,i));
double iLow( string symbol, int timeframe, int shift)
返回制定图表的最低价
Print("Current bar for USDCHF H1: ",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));
iHigh("USDCHF",PERIOD_H1,i),", ", iLow("USDCHF",PERIOD_H1,i),", ",
iClose("USDCHF",PERIOD_H1,i),", ", iVolume("USDCHF",PERIOD_H1,i));
double iOpen( string symbol, int timeframe, int shift)
返回制定图表的开盘价
Print("Current bar for USDCHF H1: ",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));
iHigh("USDCHF",PERIOD_H1,i),", ", iLow("USDCHF",PERIOD_H1,i),", ",
iClose("USDCHF",PERIOD_H1,i),", ", iVolume("USDCHF",PERIOD_H1,i));
datetime iTime( string symbol, int timeframe, int shift)
返回制定图表的时间
Print("Current bar for USDCHF H1: ",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));
iHigh("USDCHF",PERIOD_H1,i),", ", iLow("USDCHF",PERIOD_H1,i),", ",
iClose("USDCHF",PERIOD_H1,i),", ", iVolume("USDCHF",PERIOD_H1,i));
double iVolume( string symbol, int timeframe, int shift)
返回制定图表的成交量
Print("Current bar for USDCHF H1: ",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));
iHigh("USDCHF",PERIOD_H1,i),", ", iLow("USDCHF",PERIOD_H1,i),", ",
iClose("USDCHF",PERIOD_H1,i),", ", iVolume("USDCHF",PERIOD_H1,i));
int Highest( string symbol, int timeframe, int type, int count=WHOLE_ARRAY, int start=0)
返回制定图表的某段数据的最高值
double val;
// calculating the highest value in the range from 5 element to 25 element
// indicator charts symbol and indicator charts time frame
val=High[Highest(NULL,0,MODE_HIGH,20,4)];
// calculating the highest value in the range from 5 element to 25 element
// indicator charts symbol and indicator charts time frame
val=High[Highest(NULL,0,MODE_HIGH,20,4)];
int Lowest( string symbol, int timeframe, int type, int count=WHOLE_ARRAY, int start=0)
返回制定图表的某段数据的最高值
double val=Low[Lowest(NULL,0,MODE_LOW,10,10)];
