R系统[文华赢智源码]
源码如下:[code][N,1.000000,20.000000,5.000000]
TR:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
R:=MA(TR,10);
Z:=REF(HHV(HIGH,N),1);
D:=REF(LLV(LOW,N),1);
Z-CLOSE>=2*R,SPK;
CLOSE-D>=2*R,BPK;
[/code] 对于R系统模型,我个人进行了一下修改:
[code]
TR:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
RR:=2*MA(REF(TR,1),10);
ZZ:=HHV(REF(HIGH,1),N)-CLOSE;
DD:=CLOSE-LLV(REF(LOW,1),N);
CROSS(ZZ,RR),SPK;
CROSS(DD,RR),BPK;
[/code]
以便于消除HHV和LLV带来的本周期的隐含未来函数影响。
页:
[1]