请老师把通达信布林极限公式,改成选股公式,源码: 要求选出BB刚刚上穿MA,,,谢谢

MID:=MA(C,20);
VART1:=POW((C-MID),2);
VART2:=MA(VART1,20);
VART3:=SQRT(VART2);
UPPER:=MID+2*VART3;
LOWER:=MID-2*VART3;
BOLL:=REF(MID,1);
UB:=REF(UPPER,1);
LB:=REF(LOWER,1);
LOWER1:=MID-VART3;
LB1:=REF(LOWER1,1);
BB:(C-LB1)/(UB-LB)*100;
MA6:MA(BB,6);

MID:=MA(C,20);
VART1:=POW((C-MID),2);
VART2:=MA(VART1,20);
VART3:=SQRT(VART2);
UPPER:=MID+2*VART3;
LOWER:=MID-2*VART3;
BOLL:=REF(MID,1);
UB:=REF(UPPER,1);
LB:=REF(LOWER,1);
LOWER1:=MID-VART3;
LB1:=REF(LOWER1,1);
BB:=(C-LB1)/(UB-LB)*100;
MA6:=MA(BB,6);
XG:CROSS(BB,MA6);
温馨提示:内容为网友见解,仅供参考
第1个回答  2013-03-01
MID:=MA(C,20);
VART1:=POW((C-MID),2);
VART2:=MA(VART1,20);
VART3:=SQRT(VART2);
UPPER:=MID+2*VART3;
LOWER:=MID-2*VART3;
UB:=REF(UPPER,1);
LB:=REF(LOWER,1);
LOWER1:=MID-VART3;
LB1:=REF(LOWER1,1);
BB:=(C-LB1)/(UB-LB)*100;
MA6:=MA(BB,6);
XG:CROSS(BB,MA6);本回答被网友采纳
第2个回答  2013-03-01
最后加一行:bb>ma6 and ref(bb<=ma6,1) ;
相似回答