开拓者期货期权程序化系统交易论坛
标题:
在1分钟K线中用dataconvert 调用下面的KDJ五分钟指标
[打印本页]
作者:
zhaopengtao
时间:
2013-3-11 16:08:58
标题:
在1分钟K线中用dataconvert 调用下面的KDJ五分钟指标
下面的代码,是博易文华等其他软件用的KDJ指标,那位大神能在1分钟用dataconert函数调用5分钟该KDJ指标,要能在副图显示,和该指标在5分钟的值完全一样。下面是KDJ源代码。论坛中给的跨周期调用例子太复杂,现在需要简单的调用。
Params
Numeric length1(9);
Numeric length2(3);
Numeric Length3(3);
Vars
NumericSeries RSV;
NumericSeries KValue;
NumericSeries DValue;
Begin
RSV=(Close-lowest(low,length1))/(Highest(high,length1)-lowest(low,length1))*100;
KValue=mysma(RSV,length2,1);
DValue=mysma(KValue,length3,1);
PlotNumeric("K",KValue,0,White);
PlotNumeric("D",DValue,0,Yellow);
PlotNumeric("j",3*KValue-2*DValue,0,Magenta);
end
欢迎光临 开拓者期货期权程序化系统交易论坛 (http://bbs.tb18.net/)
Powered by Discuz! X2