程序源碼
HJ_1:=(2*CLOSE+HIGH+LOW+OPEN)/5;
HJ_2:=EMA(EMA(EMA(HJ_1,4),4),4);
HJ_3:=(HJ_2-REF(HJ_2,1))/REF(HJ_2,1)*100;
HJ_4:=MA(HJ_3,2);
HJ_5:=(HJ_3-HJ_4)*30000+40000;
資金:(HJ_3-HJ_4)>0,VOLSTICK NODRAW;
資金2:(HJ_3-HJ_4)<0,VOLSTICK NODRAW;
HJ_6:=EMA(CLOSE,5)-EMA(CLOSE,55);
HJ_7:=EMA(HJ_6,10);
HJ_8:=(HJ_6-HJ_7)*20000+20000;
資金3:(HJ_6-HJ_7)>0,VOLSTICK NODRAW;
資金4:(HJ_6-HJ_7)<0,VOLSTICK NODRAW;
STICKLINE(資金3 AND 資金,0,100,3,0), COLORYELLOW;
STICKLINE(資金3 AND 資金,0,100,2.6,0), COLORRED;
STICKLINE(資金2,0,100,3,0), COLORGREEN;
STICKLINE(資金4,0,100,3,0), COLORGREEN;
機構資金:(HJ_3-HJ_4)*30000+40000,COLORYELLOW NODRAW;
DRAWTEXT(ISLASTBAR,90,' 紅加'),COLOR7800FF ;
敢死隊資金:(HJ_6-HJ_7)*20000+20000,COLORMAGENTA NODRAW;
DRAWTEXT(ISLASTBAR,40,' 機構'),COLOR7800FF ;
AAV:=VOL/((H-L)*2-ABS(C-O))NODRAW;
KKPU1:=IF(C>OPEN,AAV*(HIGH-LOW),IF(C<OPEN,AAV*((HIGH-OPEN)+(C-LOW)),VOL/2)),NODRAW;
KKPU2:=IF(C>OPEN,0-AAV*((HIGH-C)+(OPEN-LOW)),IF(C<OPEN,0-AAV*(HIGH-LOW),0-VOL/2)),NODRAW;
凈流入:=(KKPU1+KKPU2)/99,NODRAW;
KKPU3:=(C/REF(C,1)-1)*100;
A進:DRAWTEXT(凈流入>=200 AND KKPU3>=3,L*0.995,VARCAT(VARCAT('凈買:',VAR2STR(凈流入,0)),'萬')),COLORYELLOW NODRAW;
B出:DRAWTEXT(凈流入<-200 AND KKPU3<=-2,H*1.01,VARCAT(VARCAT('流出:',VAR2STR(凈流入,0)),'萬')),COLORGREEN NODRAW;
STICKLINE(A進,0,60,3,0),COLORRED;
STICKLINE(A進,0,60,2.5,0),COLORYELLOW;
STICKLINE(B出,0,100,3,0),COLORGREEN;
VAR2:=(CLOSE-LLV(LOW,24))/(HHV(HIGH,24)-LLV(LOW,24))*200*10 NODRAW;
能量: SMA(VAR2,5,1)/100,COLORRED NODRAW;
DRAWBAND(能量>REF(能量,1),RGB(250,0,120),0,RGB(0,180,180))NODRAW;
STICKLINE(能量>REF(能量,1),0,30,3.2,0),COLOR7800FF;
STICKLINE(能量<REF(能量,1),0,30,3.2,0),COLORFF7800;
X_1:=(CLOSE-EMA(CLOSE,5))/EMA(CLOSE,5)*100;
X_2:=(CLOSE-EMA(CLOSE,10))/EMA(CLOSE,10)*100;
X_3:=(CLOSE-EMA(CLOSE,20))/EMA(CLOSE,20)*100;
X_4:=(CLOSE-EMA(CLOSE,60))/EMA(CLOSE,60)*100;
X_5:=(CLOSE-EMA(CLOSE,120))/EMA(CLOSE,120)*100;
X_6:=X_1>1 AND X_2>2 AND X_3>3 AND X_4>4;
X_7:=X_1>2 AND X_2>4 AND X_3>6 AND X_4>8;
X_8:=X_1>3 AND X_2>5 AND X_3>7 AND X_4>9;
X_9:=X_1>4 AND X_2>6 AND X_3>8 AND X_4>10 AND X_5>12;
X_10:=BARSLASTCOUNT(X_7)=1 AND CROSS(CLOSE,EMA(CLOSE,50)*3.19) AND HIGH/CLOSE<1.05;
小魚:BARSLASTCOUNT(X_6)*3.5,NODRAW,COLORWHITE;
紅魚:BARSLASTCOUNT(X_7)*3.5,NODRAW,COLORRED;
紫魚:BARSLASTCOUNT(X_8)*3.5,NODRAW,COLORMAGENTA;
黃魚:BARSLASTCOUNT(X_9)*3.5,NODRAW,COLORYELLOW;
DRAWBAND(0,RGB(0,235,235),0,RGB(0,0,0));
STICKLINE(X_6,0,小魚*3,(-3),(-3)),COLORCYAN;
STICKLINE(X_7,0,紅魚*3.5,(-3),0),COLORRED;
STICKLINE(X_8,0,紫魚*3.5,(-3),0),COLORMAGENTA;
STICKLINE(X_8,0,黃魚*3.5,(-3),0),COLOR00AAAA;
STICKLINE(X_8,0,黃魚*3.5,1,0),COLORYELLOW;
STICKLINE(X_10,小魚*3.5+1,小魚*3.5+2,(-3),0),COLOR00AA00;
STICKLINE(X_10,小魚*3.5+1,小魚*3.5+2,1,0),COLORGREEN;
A5:=34;B5:=3;
RRR1:=EMA(100*(CLOSE-LLV(LOW,A5))/(HHV(HIGH,A5)-LLV(LOW,A5)),B5)/4,COLORFFFF00,LINETHICK2;
分界線:RRR1, NODRAW;
STICKLINE((CROSS(21.5,分界線)),0,100,3,0), COLORGREEN NODRAW;
DRAWICON(CROSS(21.5,分界線),21.H*2.8,8);
STICKLINE((CROSS(23.16,分界線)),0,45,3,0), COLORGREEN;
STICKLINE((CROSS(23.16,分界線)),0,45,1.5,0), COLORBLUE;
DRAWICON(CROSS(23.16,分界線),23.L*3.5,15);
B:DRAWICON(RANGE(TOPRANGE(V),87,50000) AND C<O,100,2)DRAWABOVE,COLORRED;
STICKLINE(B,0,45,3,0),COLORBLUE;
B2:DRAWICON(RANGE(TOPRANGE(V),87,50000) AND C<O,100,2)DRAWABOVE,COLORRED;
滬A漲家數(shù):="999999$ADVANCE",COLORRED,NODRAW;
滬A跌家數(shù):="999999$DECLINE",COLORGREEN,NODRAW;
深A漲家數(shù):="399001$ADVANCE",COLORRED,NODRAW;
深A跌家數(shù):="399001$DECLINE",COLORGREEN,NODRAW;
上漲總家數(shù):=滬A漲家數(shù)+深A漲家數(shù),COLORRED,NODRAW;
下跌總家數(shù):=滬A跌家數(shù)+深A跌家數(shù),COLORGREEN,NODRAW;
上漲總家數(shù)比:=上漲總家數(shù)/(上漲總家數(shù)+下跌總家數(shù))*100,COLORRED,NODRAW;
下跌總家數(shù)比:=下跌總家數(shù)/(上漲總家數(shù)+下跌總家數(shù))*100,COLORGREEN,NODRAW;
AAA1B:=STRCAT(STRCAT('上漲總家數(shù)比 ',CON2STR(上漲總家數(shù)比,0)),' %');
DRAWTEXT_FIX(ISLASTBAR,0.01,0.69,0,AAA1B),COLORWHITE;
AAA2B:=STRCAT(STRCAT('下跌總家數(shù)比 ',CON2STR(下跌總家數(shù)比,0)),' %');
DRAWTEXT_FIX(ISLASTBAR,0.01,0.89,0,AAA2B),COLORBLUE;
A:=C/REF(C,1)>1.048 AND C=H AND BETWEEN(FORCAST(V,4),0.2*FORCAST(V,12),2.1*FORCAST(V,12));
首板:FILTER(A,28);
A00:=SUM(IF((CLOSE> REF(CLOSE,1.000)),VOL,IF((CLOSE<REF(CLOSE,1.000)),(0-VOL),0)),0);
A01:=SUMBARS(VOL,CAPITAL);
A02:=IF((CLOSE>LLV(CLOSE,A01)),1.000,(0-1.000))*IF((A00 >LLV(A00,A01)),1.000,(0-1.000));
A03:=(COUNT((IF((A02=(0-1.000)),1.000,0)=1.000),8.000)>2.000);
A04:=((CLOSE-DMA((((3.000 * HIGH + LOW)+OPEN)+2.000 * CLOSE)/7.000,VOL/SUM(AMOUNT,13.000)/
AMOUNT/VOL/100.000/100.000))/DMA((((3.000*HIGH+LOW)+OPEN)+2.000*CLOSE)/7.000,VOL/SUM(AMOUNT,13.000)/
AMOUNT/VOL/100.000/100.000)*100.000<(0-18.000));
A05:=((CLOSE-MIN(REF(CLOSE,5.000)*0.865,REF(CLOSE,21.000)*0.772))/CLOSE<0.009);
A06:=((A03 AND A04) AND A05)NODRAW;
STICKLINE(A06,0,100,8,0),COLORMAGENTA;
該公式包含未來函數(shù):CAPITAL
注:
館內各種公式為學習編程而保存,實戰(zhàn)使用前一定要看其中是否有未來函數(shù)并自己親自測試成功率,決不能依據(jù)公式名稱的描述和形容去投資,據(jù)此入市造成投資損失由投資者自己承擔。
發(fā)文不易,如獲益,歡迎贊賞,贊賞必復!