九毛八公式指标
我是菜鸟,不懂怎样把今天bb的值减去昨天的值。感谢大虾帮忙! (如:今天bb:5.1 昨天bb:7.8 差就是-2.7) 附:通达信自带指标:bb N:=20; MID:=MA(C,N); VART1:=POW((C-MID),2); VART2:=MA(VART1,N); 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); 0;
公式模块:
N:=20;
MID:=MA(C,N); VART1:=POW((C-MID),2); VART2:=MA(VART1,N); 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); 0; CZ:BB-REF(BB,1),NODRAW;