通信达卖三量公式 带龙虎榜提示的自用主图 源码
源码
{N1 1 1000 5}
周期:=220;
自动C:=INDEXC;
自动O:=INDEXO;
自动H:=INDEXH;
自动L:=INDEXL;
指定O:="SH999999$O";
指定H:="SH999999$H";
指定L:="SH999999$L";
指定C:="SH999999$C";
大盘低:=CONST(LLV(指定L,周期));
大盘高:=CONST(HHV(指定H,周期));
大盘差:=大盘高-大盘低;
当前低:=CONST(LLV(L,周期));
当前高:=CONST(HHV(H,周期));
当前差:=当前高-当前低;
比1:=当前差/大盘差;
变C:=当前低+(指定C-大盘低)*比1;
变H:=当前低+(指定H-大盘低)*比1;
变L:=当前低+(指定L-大盘低)*比1;
变O:=当前低+(指定O-大盘低)*比1;
STICKLINE(CURRBARSCOUNT<周期,变H,变L,0,0),COLOR663300;
STICKLINE(CURRBARSCOUNT<周期,变O,变C,3,0),COLOR663300;
STICKLINE(CURRBARSCOUNT<周期 AND 变C>=变O,变O,变C,3,1),COLOR663300;
DRAWKLINE(H,O,L,C);
UR:=N1;
LR:=N1;
TC1:=IF(H=HHV(H,8*UR),H,DRAWNULL);
TC2:=CONST(BARSLAST(TC1=H))+1;
UP:=CONST(IF(TC2=1,H,REF(H,TC2-1)));
BC1:=IF(L=LLV(L,8*LR),L,DRAWNULL);
BC2:=CONST(BARSLAST(BC1=L))+1;
LL:=CONST(IF(BC2=1,L,REF(L,BC2-1)));
LP:=CURRBARSCOUNT<=BC2 AND L=LL;
HP:=CURRBARSCOUNT<=TC2 AND H=UP;
NOD:=(IF(TC2>BC2,TC2,BC2)-IF(TC2>BC2,BC2,TC2));
LR1:=FORCAST(C,NOD+1);
NP:=IF(CURRBARSCOUNT<=MAX(BC2,TC2),CONST(IF(MIN(TC2,BC2)=1,LR1,REF(LR1,MIN(TC2,BC2)-1))),DRAWNULL),POINTDOT,COLOR93BDA8;{近点}
LR2:=SLOPE(C,NOD+1);
LR3:=CONST(IF(MIN(TC2,BC2)=1,LR2,REF(LR2,MIN(TC2,BC2)-1)));
FP:=NP-LR3*(NOD),POINTDOT,COLOR93BDA8;
AD:=ABS(NP-FP);
DBL:=BARSLAST(BC1!=DRAWNULL)+1;
DBH:=BARSLAST(TC1!=DRAWNULL)+1;
BSP:=IF(BC2>TC2,DBL,DBH)-1;
LRL:=IF(NP>FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP);
AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND H>LRL,H,LRL);
AT2:=HHV(AT1-LRL,MAX(BC2,TC2));
AT3:=CONST(BARSLAST(AT1-LRL=AT2));
AT4:=CONST(IF(AT3=0,H,REF(H,AT3)));
AT5:=CONST(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3)));
ATL:=LRL+AT5;
UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND L<LRL,L,LRL);
UT2:=HHV(LRL-UT1,MAX(BC2,TC2));
UT3:=CONST(BARSLAST(LRL-UT1=UT2));
UT4:=CONST(IF(UT3=0,H,REF(H,UT3)));
UT5:=CONST(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3)));
UTL:=LRL-UT5;
RH:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,ATL,CONST(REF(ATL,MIN(BC2,TC2)-11)));
RL:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,UTL,CONST(REF(UTL,MIN(BC2,TC2)-11)));
上轨:IF(NP>FP,IF(ATL<=RH,ATL,DRAWNULL),IF(ATL>=RL,ATL,DRAWNULL)),COLORFF0066,DOTLINE;
中轨:IF(NP>FP,IF(LRL<=RH,LRL,DRAWNULL),IF(LRL>=RL,LRL,DRAWNULL)),COLORFF0066,DOTLINE;
下轨:IF(NP>FP,IF(UTL<=RH,UTL,DRAWNULL),IF(UTL>=RL,UTL,DRAWNULL)),COLORFF0066,DOTLINE;
降△边:DRAWLINE(HIGH>=HHV(HIGH,10),HIGH,LOW<=LLV(LOW,3),HHV(HIGH,3),1),COLORCYAN,DOTLINE;
涨△边:DRAWLINE(LOW<=LLV(LOW,10),LOW,HIGH>=HHV(HIGH,3),LLV(LOW,3),1),COLORLIRED,DOTLINE;
个涨:=(C-REF(C,1))*100/REF(C,1),NODRAW;
统计:=COUNT(个涨>6,3),NODRAW;
沪市:=("999998$C"-REF("999998$C",1))*100/REF("999998$C",1);
深市:=("399107$C"-REF("399107$C",1))*100/REF("399107$C",1),NODRAW;
中板:=("399101$C"-REF("399101$C",1))*100/REF("399101$C",1),NODRAW;
沪离:=(个涨+REF(个涨,1)+REF(个涨,2))-(沪市+REF(沪市,1)+REF(沪市,2));
深离:=(个涨+REF(个涨,1)+REF(个涨,2))-(深市+REF(深市,1)+REF(深市,2));
中离:=(个涨+REF(个涨,1)+REF(个涨,2))-(中板+REF(中板,1)+REF(中板,2));
偏离廿:=IF(CODELIKE('6'),沪离,IF(CODELIKE('000'),深离,中离)),NODRAW;
沪涨:=个涨-沪市;
深涨:=个涨-深市;
中涨:=个涨-中板;
偏离七:=IF(CODELIKE('6'),沪涨,IF(CODELIKE('000'),深涨,中涨)),NODRAW;
龙:=偏离廿>20 AND 统计>2,NODRAW;
虎:=(偏离七>7 AND 个涨>5) OR (偏离七<-7 AND 个涨<-5),NODRAW;
换:=100*VOL/(FINANCE(7)/100),NODRAW;
振:=(H-L)*100/REF(C,1),NODRAW;
虎盘:=龙 OR 虎 OR 换>20 OR 振>15,NODRAW;
DRAWICON(虎盘 AND PERIOD=5,HIGH+0.09,41);
VOL5:=MA(VOL,5),COLORWHITE;
VOL10:=MA(VOL,10),COLORYELLOW;
VOL40:=MA(VOL,40),COLORFF00FF;
三日不破:=MIN(MIN(L,REF(L,1)),REF(L,2))>=REF(L,3);
三日量缩:=(MAX(MAX(V,REF(V,1)),REF(V,2))<REF(V,3));
三日价涨A:=C>=REF(C,1);
三日价涨B:=C<REF(C,1);
三日价涨C:=MIN(MIN(C,REF(C,1)),REF(C,2))>=REF(L,3);
TIM:=IF(DATE<1140214,1,0);
缩倍柱:=(VOL*1.95<=REF(VOL,1))*TIM;
百日低量:=(VOL=LLV(VOL,100))*TIM;
倍量柱:=C>REF(C,1)*1.04 AND (VOL>=1.9*REF(VOL,1))*TIM;
四日前倍量柱:=(REF(VOL,3)>1.9*REF(VOL,4))*TIM;
四日前高量柱:=(REF(VOL,3)>=REF(VOL,4) AND REF(VOL,3)<1.9*REF(VOL,4) AND 三日量缩)*TIM;
(股票知识网zhishi.southmoney.com)