飞狐融胜轨道趋势公式
源码
{融胜轨道趋势}
{DRAWGBK(C>0,COLORRGB(20,20,20),COLORRGB(1,1,5),1);}
STICKLINE(C>O ,H,L,0.1,0),COLORRED;
STICKLINE(C>O ,C,O,5.5,1),COLORRED;
STICKLINE(C<=O ,H,L,0.1,0),COLORCYAN;
STICKLINE(C<=O ,C,O,5.5,1),COLORCYAN;
HHJSJDA:=(2.97*CLOSE+OPEN+LOW+HIGH)/6;
HHJSJDB:(20*HHJSJDA+19*REF(HHJSJDA,1)+18*REF(HHJSJDA,2)+17*REF(HHJSJDA,3)+16*REF(HHJSJDA,4)+15*REF(HHJSJDA,5)+14*REF(HHJSJDA,6)
+13*REF(HHJSJDA,7)+12*REF(HHJSJDA,8)+11*REF(HHJSJDA,9)+10*REF(HHJSJDA,10)+9*REF(HHJSJDA,11)+8*REF(HHJSJDA,12)
+7*REF(HHJSJDA,13)+6*REF(HHJSJDA,14)+5*REF(HHJSJDA,15)+4*REF(HHJSJDA,16)+3*REF(HHJSJDA,17)+2*REF(HHJSJDA,18)+
REF(HHJSJDA,20))/210,COLORYELLOW;
HHJSJDC:MA(HHJSJDB,5),COLORRED;
AAA:=MA((2*CLOSE+HIGH+LOW)/4,5);
通1:=AAA*102/100;
通2:=AAA*(200-102)/100;
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);
{量能平台}
N:=30;
CURRBARSCOUNT1:=DATACOUNT-BARPOS+1;
T1:=REFX(HHVBARS(V,N),DATE);
T0:IF(CURRBARSCOUNT1<=N+7,REFX(IF(T1=0,C,REF(C,T1)),DATE),0),LINETHICK0;
PARTLINE(CURRBARSCOUNT1=T1+1,T0),CIRCLEDOT;
DRAWTEXT(ISLASTBAR,T0,' 量能平台');
中期临界点: DMA(MA(CLOSE+REF(CLOSE,5)/CLOSE*0.098,90),VOL),LINETHICK2,COLORMAGENTA;
上:(1+7/100)*DD,CIRCLEDOT,COLORBLUE;
下:(1-7/100)*DD,CIRCLEDOT,COLORBLUE;
中:(上+下)/2,CIRCLEDOT,COLORBLUE;
PARTLINE(上>=REF(上,1), 上),CIRCLEDOT,COLOR0099FF;
PARTLINE(中>=REF(中,1), 中),CIRCLEDOT,COLOR0099FF;
PARTLINE(下>=REF(下,1), 下),CIRCLEDOT,COLOR0099FF;
晴上:(1+5/100)*DD,COLORGREEN,LINEDOT;
晴下:(1-5/100)*DD,COLORGREEN,LINEDOT;
EPPP:=(HIGH+LOW+OPEN+2*CLOSE)/5;
明日阻力:=2*EPPP-LOW;
明日支撑:=2*EPPP-HIGH;
明日突破:=EPPP+(HIGH-LOW);
明日反转:=EPPP-(HIGH-LOW);
今日阻力:=REF(明日阻力,1);
今日支撑:=REF(明日支撑,1);
今日突破:=REF(明日突破,1);
今日反转:=REF(明日反转,1);
DRAWTEXTEX(C>0,1,3,8,'今日阻力='+NUMTOSTR(今日阻力,2)),COLOR0080FF;
DRAWTEXTEX(C>0,1,3,38,'今日支撑='+NUMTOSTR(今日支撑,2)),COLORRED;
DRAWTEXTEX(C>0,1,3,68,'今日突破='+NUMTOSTR(今日突破,2)),COLORFF00FF;
DRAWTEXTEX(C>0,1,3,98,'今日反转='+NUMTOSTR(今日反转,2)),COLOR00FF00;
DRAWTEXTEX(C>0,1,153,8,'明日阻力='+NUMTOSTR(明日阻力,2)),COLOR0080FF;
DRAWTEXTEX(C>0,1,153,38,'明日支撑='+NUMTOSTR(明日支撑,2)),COLORRED;
DRAWTEXTEX(C>0,1,153,68,'明日突破='+NUMTOSTR(明日突破,2)),COLORFF00FF;
DRAWTEXTEX(C>0,1,153,98,'明日反转='+NUMTOSTR(明日反转,2)),COLOR00FF00;
{以下涨停黄柱,涨幅>5%橙柱、跌停绿柱}
C2:=REF(C,1);
非ST涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);
涨停:=非ST涨停;
STICKLINE(涨停,OPEN,CLOSE,2,0),COLOR00FFFF;
STICKLINE(涨停,H,L,0,0),COLOR00FFFF;
非ST跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);
跌停:=非ST跌停;
STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;
STICKLINE(跌停,H,L,0,1),COLORGREEN;
半涨1:=IF((C-C2)*100/C2>=(5-0.01*100/C2),1,0);
半涨2:=IF((C-C2)*100/C2<(10-0.01*100/C2),1,0);
JRS:=半涨1 AND 半涨2 AND FINANCE(33)>0;
半涨:=IF(JRS,1,0);
STICKLINE(JRS,OPEN,CLOSE,2,0),COLOR0066FF;
STICKLINE(JRS,H,L,0,0),COLOR0066FF;
NUMBER:=COUNT(非ST涨停,BARSSINCE(非ST涨停)+1);
DRAWNUMBER(非ST涨停,HIGH*1.03,NUMBER,0),COLORWHITE;
NUMBER1:=COUNT(非ST跌停,BARSSINCE(非ST跌停)+1);
DRAWNUMBER(非ST跌停,HIGH*1.03,NUMBER1,0),COLORGREEN;
NUMBER2:=COUNT(半涨,BARSSINCE(半涨)+1);
DRAWNUMBER(半涨,HIGH*1.03,NUMBER2,0),COLOR0066FF;
DRAWTEXTEX(C>0,1,3,138,'上市以来共涨停 '+NUMTOSTR(NUMBER,0)+'次'),COLORYELLOW;
DRAWTEXTEX(C>0,1,153,138,'上市以来共跌停 '+NUMTOSTR(NUMBER1,0)+'次'),COLORGREEN;
DRAWTEXTEX(C>0,1,3,168,'上市以来涨幅>5%共 '+NUMTOSTR(NUMBER2,0)+'次'),COLOR0066FF;
N5:=10;
T11:=REFX(LLVBARS(LOW,N5),DATE);
T11HIGH:=REFX(REF(HIGH,T11),DATE);
CC1:=REFX(CURRBARSCOUNT,DATE);
{T12:=REFX(BARSLAST((CURRBARSCOUNT >(CC1+T11)) AND (HIGH>T11HIGH)),DATE);
T12HIGH:=REFX(REF(HIGH,T12),DATE);
T13:=REFX(BARSLAST((CURRBARSCOUNT >(CC1+T12)) AND (HIGH>T12HIGH)),DATE);
T13HIGH:=REFX(REF(HIGH,T13),DATE);
洗盘杀入线:DRAWLINE(CURRBARSCOUNT=T13+1, T13HIGH, ISLASTBAR, T13HIGH, 1),LINETHICK1,COLORWHITE;
DRAWTEXT(ISLASTBAR, T13HIGH, ' 洗盘杀入线'),LINETHICK2,COLORWHITE;}