五线谱主图
N 2 300 6
K 2 300 12
P 2 300 24
以上参数请自行设定
BG:=BARSCOUNT(C)+2;
NB:=IF(BG<N,BG,N);
KB:=IF(BG<K,BG,K);
PB:=IF(BG<P,BG,P);
MN:=SUM(C,NB)/SUM(1,NB);
MN2:=SUM(C*C,NB)/SUM(1,NB);
MK:=SUM(C,KB)/SUM(1,KB);
MK2:=SUM(C*C,KB)/SUM(1,KB);
MP:=SUM(C,PB)/SUM(1,PB);
MP2:=SUM(C*C,PB)/SUM(1,PB);
MA_S:=POW(MN*MK*MP,1/3);
XZN:=NB/(NB-1);
XZK:=KB/(KB-1);
XZP:=PB/(PB-1);
SD1:=(MN2-MN*MN)*XZN;
SD2:=(MK2-MK*MK)*XZK;
SD3:=(MP2-MP*MP)*XZP;
SD:=SQRT((SD1+SD2+SD3)/3);
顶线:MA_S+2*SD;
强线:MA_S+SD;
中线:MA_S;
弱线:MA_S-SD;
底线:MA_S-2*SD;
650566579.jpg
选股公式:
N:=6;P:=24;K:=12;
BG:=BARSCOUNT(C)+2;
NB:=IF(BG<N,BG,N);
KB:=IF(BG<K,BG,K);
PB:=IF(BG<P,BG,P);
MN:=SUM(C,NB)/SUM(1,NB);
MN2:=SUM(C*C,NB)/SUM(1,NB);
MK:=SUM(C,KB)/SUM(1,KB);
MK2:=SUM(C*C,KB)/SUM(1,KB);
MP:=SUM(C,PB)/SUM(1,PB);
MP2:=SUM(C*C,PB)/SUM(1,PB);
MA_S:=POW(MN*MK*MP,1/3);
XZN:=NB/(NB-1);
XZK:=KB/(KB-1);
XZP:=PB/(PB-1);
SD1:=(MN2-MN*MN)*XZN;
SD2:=(MK2-MK*MK)*XZK;
SD3:=(MP2-MP*MP)*XZP;
SD:=SQRT((SD1+SD2+SD3)/3);
顶线:=MA_S+2*SD;
强线:=MA_S+SD;
中线:=MA_S;
弱线:=MA_S-SD;
底线:=MA_S-2*SD;
CROSS(C,中线) AND CROSS(C,强线);;
651477783.jpg
|