同花顺公式DDQSXX
试一试,供大家参考。
x:=(3*C+L+O+H)/6;
A0X:=REF(EMA(C,14),1);
A1X:=(EMA(C,10)-A0X)/A0X*100;
A2X:=IF(A1X>=0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),REF(EMA(C,10),BARSLAST(CROSS(0,A1X))+1));
A3X:=(20*x+19*REF(x,1)+18*REF(x,2)+17*REF(x,3)+16*REF(x,4)+15*REF(x,5)+14*REF(x,6)
+13*REF(x,7)+12*REF(x,8)+11*REF(x,9)+10*REF(x,10)+9*REF(x,11)+8*REF(x,12)
+7*REF(x,13)+6*REF(x,14)+5*REF(x,15)+4*REF(x,16)+3*REF(x,17)+2*REF(x,18)+
REF(x,20))/210;
STICKLINE(A3X>=REF(A2X,1),A3X,A2X,12,0),Color115588;
STICKLINE(A3X<REF(A2X,1),A3X,A2X,12,0),Color994400;
PARTLINE(A3X,A3X>=REF(A2X,1),RGB(0,0,0),A3X<=REF(A2X,1),RGB(0,0,0)),LINETHICK3;
XOPEN:=(REF(OPEN,1)+REF(CLOSE,1))/2;
XCLOSE:=(HIGH+LOW+CLOSE+OPEN)/4;
XHIGH:=MAX(XOPEN,XCLOSE,HIGH);
XLOW:=MIN(XOPEN,XCLOSE,LOW);
XXOPEN:=(REF(XOPEN,2)+REF(XCLOSE,2))/2;
XXCLOSE:=(XHIGH+XLOW+XCLOSE+XOPEN)/4;
XXHIGH:=MAX(XXOPEN,XXCLOSE,HHV(XHIGH,2));
XXLOW:=MIN(XXOPEN,XXCLOSE,LLV(Xlow,2));
MA1:MA(MA(CLOSE,5),3),coloryellow,layer0;
MA2:MA(MA(CLOSE,8),3),coloryellow,layer0;
MA3:MA(MA(CLOSE,10),3),coloryellow,layer0;
持币:=HHV(MA(MA((LOW+HIGH+CLOSE)/3,4),3*1),2);
持股:=LLV(MA(MA((LOW+HIGH+CLOSE)/3,4),3*1),1);
FILLRGN(持股,持币,持股<持币,RGB(0,200,255)) ;
MVAR3:=MA(CLOSE,13);
MVAR4:=100-ABS((CLOSE-MVAR3)/MVAR3*100);
MVAR5:=MA(WINNER(CLOSE*0.95)*100,3);
拉高出货:=MVAR5>MVAR4,LINETHICK0;
MVAR6:=REF(LOW,1)*0.9;
MVAR7:=LOW*0.9;
MVAR10:=(MVAR7*VOL+MVAR6*(CAPITAL-VOL))/CAPITAL;
MVAR11:=EMA(MVAR10,30);
MVAR12:=CLOSE-REF(CLOSE,1);
MVAR13:=MAX(MVAR12,0);
MVAR14:=ABS(MVAR12);
MVAR15:=SMA(MVAR13,7,1)/SMA(MVAR14,7,1)*100;
MVAR16:=SMA(MVAR13,13,1)/SMA(MVAR14,13,1)*100;
MVAR17:=BARSCOUNT(CLOSE);
MVAR18:=SMA(MAX(MVAR12,0),6,1)/SMA(ABS(MVAR12),6,1)*100;
MVAR19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;
MVAR20:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
MVAR21:=SMA((SMA(MVAR20,4,1)-50)*2,3,1);
MVAR22:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;
MVAR23:=SMA(MVAR22,4,1);
MVAR24:=SMA(MVAR23,3,1);
MVAR25:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;
打压建仓:=MVAR18<=25 AND MVAR19<-95 AND MVAR25>20 AND MVAR21<-30 AND MVAR24<30 AND MVAR11-CLOSE>=-0.25 AND MVAR15<22 AND MVAR16<28 AND MVAR17>50,colorred ;
MVAR31:=REF(C,2)*0.865;
MVAR32:=REF(C,13)*0.772;
MVAR33:=100*VOL/CAPITAL;
抄底:=IF((C-MIN(MVAR31,MVAR32))/C<0.1 AND SUM(MVAR33,5)/5<1.8,-5, 0),Color00FF00;
MVAR34:=SMA(MAX(CLOSE-REF(CLOSE,1),0),5,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;
抛压:=CROSS(84,MVAR34),COLORff00aa,LINETHICK0;
MVAR35:=100-3*SMA((CLOSE-LLV(LOW,66))/(HHV(HIGH,66)-LLV(LOW,66))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,66))/(HHV(HIGH,66)-LLV(LOW,66))*100,20,1),15,1);
MVAR36:=100-3*SMA((OPEN-LLV(LOW,66))/(HHV(HIGH,66)-LLV(LOW,66))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,66))/(HHV(HIGH,66)-LLV(LOW,66))*100,20,1),15,1);
MVAR37:=MVAR35<REF(MVAR36,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
大资金:=(MVAR37 AND COUNT(MVAR37,30)=1),colorred;
MVAR38:=AMOUNT/VOL/1000;
MVAR39:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;
MVAR40:=SUM(AMOUNT,13)/MVAR38/1000;
MVAR41:=DMA(MVAR39,VOL/MVAR40);
MVAR42:=(CLOSE-MVAR41)/MVAR41*1000;
极低:=(CROSS(MVAR42,-166)),colorcyan;
MVAR43:=((AMOUNT)/(VOL))/(100);
MVAR44:=((3)*(HIGH)+LOW+OPEN+(2)*(CLOSE))/(7);
MVAR45:=((SUM(AMOUNT,7))/(MVAR43))/(100);
MVAR46:=DMA(MVAR44,(VOL)/(MVAR45));
MVAR47:=((CLOSE-MVAR46)/(MVAR46))*(100);
MVAR48:=((CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)))*(100);
MVAR49:=MA(MVAR47,20)+STD(MVAR47,20);
MVAR50:=((CLOSE-MA(CLOSE,18))/(MA(CLOSE,18)))*(100);
MVAR51:=SMA(MVAR48,3,1);
风险:=(REF(MVAR50,1)>=5 AND CROSS(MVAR49,MVAR47) AND MVAR51>79),colorgreen;
STICKLINE(XXclose>XXopen,XXclose ,XXopen ,8,0),color0066cc;
STICKLINE(XXclose<=XXopen,XXclose ,XXopen ,8,0 ),colorffff66;
STICKLINE(XXclose>XXopen,XXhigh ,XXclose ,3,0 ),color0099cc;
STICKLINE(XXclose>XXopen,XXopen ,XXlow ,3,0 ),color0099cc;
STICKLINE(XXclose<=XXopen,XXopen ,XXhigh ,3,0 ),colorffff66;
STICKLINE(XXclose<=XXopen,XXclose ,XXlow ,3,0 ),colorffff66;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,11,0),COLOR000000;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,9,0),COLOR000084;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0),COLOR000095;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0),COLOR0000A2;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0),COLOR0000B3;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,11,0),COLOR000000;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,9,0),COLOR008800;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,8,0),COLOR008E00;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,7,0),COLOR009900;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,6,0),COLOR00A600;
STICKLINE(C<持股 AND C<A2X,C,O,5,0),COLOR00B500;
STICKLINE(C<持股 AND C<A2X,C,O,4,0),COLOR00C600;
STICKLINE(C<持股 AND C<A2X,C,O,3,0),COLOR00D500;
STICKLINE(C<持股 AND C<A2X,C,O,2,0),COLOR00E600;
STICKLINE(C<持股 AND C<A2X,H,L,1,0),COLOR00F500;
STICKLINE(C<持股 AND C<A2X,H,L,0.5,0),COLOR00F600;
STICKLINE(C>持股 AND C>A2X,C,O,5,0),COLOR0000A3;
STICKLINE(C>持股 AND C>A2X,C,O,4,0),COLOR0000B3;
STICKLINE(C>持股 AND C>A2X,C,O,3,0),COLOR0000D7;
STICKLINE(C>持股 AND C>A2X,C,O,2,0),COLOR0000EA;
STICKLINE(C>持股 AND C>A2X,H,H,1,0),COLOR0000FF;
STICKLINE(C>持股 AND C>A2X,H,H,1,0),COLOR0011FF;
STICKLINE(C<持股 AND C>A2X,C,O,4,0),color00ABFF;
STICKLINE(C<持股 AND C>A2X,C,O,3,0),color00C0FF;
STICKLINE(C<持股 AND C>A2X,C,O,2,0),color00D1FF;
STICKLINE(C<持股 AND C>A2X,C,O,1,0),color00EAFF;
STICKLINE(C<持股 AND C>A2X,H,L,0.5,0),color00FFFF;
STICKLINE(C>持股 AND C<A2X,C,O,4,0),COLORFF43FF;
STICKLINE(C>持股 AND C<A2X,C,O,3,0),COLORFF63FF;
STICKLINE(C>持股 AND C<A2X,C,O,2,0),COLORFF83FF;
STICKLINE(C>持股 AND C<A2X,H,L,1,0),Colorff00ff;
STICKLINE(大资金,OPEN,C,11,0),COLOR106FFF;
STICKLINE(大资金,OPEN,C,10,0),COLOR000095;
STICKLINE(大资金,OPEN,C,9,0),COLOR00AAFF;
STICKLINE(大资金,OPEN,C,7,0),COLOR00BBFF;
STICKLINE(大资金,OPEN,C,5,0),COLOR00CCFF;
STICKLINE(大资金,OPEN,C,3,0),COLOR00DDFF;
STICKLINE(大资金,OPEN,C,2,0),COLOR00EEFF;
STICKLINE(大资金,OPEN,C,1,0),COLOR00FFFF;
DRAWTEXT(打压建仓 ,L*0.98,'打'),colorgreen;
DRAWTEXT((抛压=1),H*1.01,'抛压'),colorgreen;
DRAWTEXT(CROSS(MVAR42,-166),L*0.998,'低买'),colorcyan;
DRAWTEXT(REF(MVAR50,1)>=5 AND CROSS(MVAR49,MVAR47) AND MVAR51>79,H*1.02,'风险'),coloryellow;
DRAWTEXT(抄底 ,L,'短'),colorgreen;
DRAWTEXT(抄底 ,L*0.98,'底'),colorgreen;
DRAWTEXT(拉高出货 ,H*1.03,'货'),colorgreen;
DRAWTEXT((大资金=1),L,'大资金'),coloryellow;
MVAR61:=BARSLAST(CROSS((MA((HIGH + LOW) / 5,4)) - (MA((HIGH + LOW) / 5,34)),0));
MVAR62:=BARSLAST(CROSS(0,(MA((HIGH + LOW) / 5,4)) - (MA((HIGH + LOW) / 5,34))));
MVAR63:=BARSLAST(REF(CROSS((MA((HIGH + LOW) / 5,4)) - (MA((HIGH + LOW) / 5,34)),0),1));
MVAR64:=BARSLAST(REF(CROSS(0,(MA((HIGH + LOW) / 5,4)) - (MA((HIGH + LOW) / 5,34))),1));
MVAR65:=IF((MVAR63 < MVAR64),(REF((HHV(HIGH,2)),MVAR63)),(REF((LLV(LOW,2)),MVAR64)));
MVAR66:=(((REF(CLOSE,1)) <= (REF(MVAR65,1))) AND (CLOSE > MVAR65)) AND (MVAR61 <MVAR62);
MVAR67:=(((REF(CLOSE,1)) >= (REF(MVAR65,1))) AND (CLOSE < MVAR65)) AND (MVAR62< MVAR61);
MVAR68:=MVAR66 AND ((COUNT(MVAR66,MVAR61)) = 1);
MVAR69:=MVAR67 AND ((COUNT(MVAR67,MVAR62)) = 1);
MVAR70:=MVAR68 AND ((REF(BARSLAST(MVAR69),1)) < (REF(BARSLAST(MVAR68),1)));
DRAWTEXT(MVAR70,A2X,'●'),coloryellow;
赢损线:MA(FORCAST(C,21),3),coloryellow,linethick2;