下载MetaTrader 5
要添加评论,请登录注册
有好主意吗?在交易者论坛中分享它们吧!
wkgsm
39
wkgsm 2009.06.13 10:40 

double TheJ_value(double ArrJ[],double KdjPeriod)
{
int i,counted_bars;
//---- insufficient data
if(Bars<=KdjPeriod) return(0);
//---- bars count that does not changed after last indicator launch.
counted_bars=IndicatorCounted();
//----KDJ Range calculation
i=Bars-KdjPeriod-1;
if(counted_bars>KdjPeriod)
i=Bars-counted_bars-1;
while(i>=0)
{
MaxHigh=High[iHighest(NULL,0,MODE_HIGH,KdjPeriod,i)];
MinLow=Low[iLowest(NULL,0,MODE_LOW,KdjPeriod,i)];
RSV[i]=(Close[i]-MinLow)/(MaxHigh-MinLow)*100; //get RSV value
Ksma(RSV,M1); //get K value
Dsma(K,M2); //get D value
ArrJ[i]=3*K[i]-2*D[i]; //get J value 该句有问题
i--;
}
}

编译报错为:

'ArrJ' - array item cannot be assigned E:\Program Files\tool\MT4china专用\experts\indicators\kdj.mq4 (96, 7)

yyy999
175
yyy999 2009.06.13 13:23  

double TheJ_value(double &ArrJ[],double KdjPeriod)改成这样就行了

wkgsm
39
wkgsm 2009.06.13 16:02  
还真行了,高,可为什么啊?
wkgsm
39
wkgsm 2009.06.13 16:02  
还真行了,高,可为什么啊?
wkgsm
39
wkgsm 2009.06.13 16:02  
还真行了,高,可为什么啊?
/
要添加评论,请登录注册