|
7楼
![](static/image/common/ico_lz.png)
楼主 |
发表于 2022-1-18 15:33:14
|
只看该作者
//KDJ1
Params
Numeric N(9);
Numeric M1(3);
Numeric M2(3);
Vars
NumericSeries HighestValue;
NumericSeries lowestValue;
NumericSeries RSV;
NumericSeries KValue;
NumericSeries DValue;
NumericSeries JValue;
Begin
NumericArray m15Close = HisData(Enum_Data_Close,Enum_Period_Min, 15,"",500);
NumericArray m15high = HisData(Enum_Data_High,Enum_Period_Min, 15,"",500);
NumericArray m15low = HisData(Enum_Data_Low,Enum_Period_Min, 15,"",500);
HighestValue = iHHV(m15high,N);
lowestValue = iLLV(m15low,N);
RSV=(m15Close[0]-lowestValue)/(HighestValue-lowestValue)*100;
NumericArray RSVArr;
for(int i =0;i<N*9;i++){
Numeric mk=((m15Close[0]-lowestValue),i)/((HighestValue-lowestValue),i)*100;
ArrAdd(RSVArr,mk);
}
KValue=iSMA(RSVArr,M1,1);
PlotNumeric("K",KValue);
End |
|