马上注册,享用更多功能,让你轻松玩转本论坛。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
通达信5日内第二大量和小量的求法,这个办法也可以求六条均线的次高或次低
{5日内第二大量}
ZDL:=HHV(V,5);
V0:=IF(V>=ZDL,0,V);
V1:=IF(REF(V,1)>=ZDL,0,REF(V,1));
V2:=IF(REF(V,2)>=ZDL,0,REF(V,2));
V3:=IF(REF(V,3)>=ZDL,0,REF(V,3));
V4:=IF(REF(V,4)>=ZDL,0,REF(V,4));
第二大量:MAX(MAX(MAX(MAX(V0,V1),V2),V3),V4),NODRAW;
{5日内第二小量}
ZXL:=LLV(V,5);
VV0:=IF(V<=ZXL,SUM(V,10),V);
VV1:=IF(REF(V,1)<=ZXL,SUM(V,10),REF(V,1));
VV2:=IF(REF(V,2)<=ZXL,SUM(V,10),REF(V,2));
VV3:=IF(REF(V,3)<=ZXL,SUM(V,10),REF(V,3));
VV4:=IF(REF(V,4)<=ZXL,SUM(V,10),REF(V,4));
第二小量:MIN(MIN(MIN(MIN(VV0,VV1),VV2),VV3),VV4),NODRAW;
求六条均线的次高,次低值
MA5:MA(C,5),NODRAW;
MA13:MA(C,13),NODRAW;
MA24:MA(C,24),NODRAW;
MA60:MA(C,60),NODRAW;
MA120:MA(C,120),NODRAW;
MA250:MA(C,250),NODRAW;
AF:=MAX6(MA5,MA13,MA24,MA60,MA120,MA250);
AAA:=IF(MA5>=AF,0,MA5);
AAB:=IF(MA13>=AF,0,MA13);
AAC:=IF(MA24>=AF,0,MA24);
AAD:=IF(MA60>=AF,0,MA60);
AAE:=IF(MA120>=AF,0,MA120);
AAF:=IF(MA250>=AF,0,MA250);
第二大均:MAX6(AAA,AAB,AAC,AAD,AAE,AAF),NODRAW;
BF:=MIN6(MA5,MA13,MA24,MA60,MA120,MA250);
BAA:=IF(MA5<=BF,100*AF,MA5);
BAB:=IF(MA13<=BF,100*AF,MA13);
BAC:=IF(MA24<=BF,100*AF,MA24);
BAD:=IF(MA60<=BF,100*AF,MA60);
BAE:=IF(MA120<=BF,100*AF,MA120);
BAF:=IF(MA250<=BF,100*AF,MA250);
第二小均:MIN6(BAA,BAB,BAC,BAD,BAE,BAF),NODRAW;
|