|
看看易盛的KD指标程是这样的:RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1);
D:SMA(K,M2,1)
我在etl里按这样写
Vars
Numeric skd_n(9);
Numeric skd_m1(3);
Numeric skd_m2(3);
Numeric ma_Length1(10);
Numeric ma_Length2(20);
Numeric ma_Length3(60);
Numeric RSV(0);
Numeric FASTK(0);
Numeric K(0);
Numeric _D(0);
//kd指标
RSV= (CLOSE-Lowest(LOW,skd_n))/(Highest(HIGH,skd_n)-Lowest(LOW,skd_n))*100;
K=AverageFC(RSV,skd_m1);
_D=AverageFC(K,skd_m2);
FileAppend("c:\\et_"+ DateToString(CurrentDate())+".log", TimeToString(Time())+ " K="+Text(K)+" D="+Text(_D));
文件中输出的k,d值与图标上的不一至,麻烦高手帮改造一下,谢谢!
|
|