通达信四季变天图源码
STICKLINE(PERIOD=5 AND WQ<N1 AND NOT(K0) AND BK1,WH,WO,1,0),COLOR770000;
STICKLINE(PERIOD=5 AND WQ<N1 AND NOT(K0) AND BK1,WC,WL,1,0),COLOR770000;
STICKLINE(PERIOD=5 AND WQ<N1 AND NOT(K0) AND K1=0,WC,WO,1,0),COLOR770000;
STICKLINE(PERIOD=5 AND WQ<N1 AND NOT(K0) AND (BK2 OR K3),WC,WO,1,0),COLOR770000;
STICKLINE(PERIOD=5 AND WQ<N1 AND NOT(K0) AND ((K1 AND BK2=0 AND K3=0) OR BK3),WC,WC,8,1),COLORFF0000;
STICKLINE(PERIOD=5 AND WQ<N1 AND NOT(K0) AND ((K1 AND BK2=0 AND K3=0) OR BK3),WC,WO,8,0),COLOR770000;
IF(BETWEEN(高点压力M,高点,低点),高点压力M,DRAWNULL),COLORYELLOW,LINETHICK1;
IF(BETWEEN(低点支撑M,高点,低点),低点支撑M,DRAWNULL),COLORYELLOW,LINETHICK1;
IF(BETWEEN(高点压力1,高点,低点),高点压力1,DRAWNULL),COLORGREEN,LINETHICK1;
IF(BETWEEN(低点支撑1,高点,低点),低点支撑1,DRAWNULL),COLORGREEN,LINETHICK1;
中:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
DRAWTEXT(ISLASTBAR,MT2,' ●'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,MT1,' ●'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,MT3,' ●'),COLORYELLOW;
AAAX:=(3*C+H+L+O)/6;
中长:IF(C,(8*AAAX+7*REF(AAAX,1)+6*REF(AAAX,2)+5*REF(AAAX,3)
+4*REF(AAAX,4)+3*REF(AAAX,5)+2*REF(AAAX,6)+REF(AAAX,8))/36,DRAWNULL),COLOR00FF00;
IF(中长> REF(中长,1),中长,DRAWNULL),COLORMAGENTA,LINETHICK2;
下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);
RRRSV:=SMA(下档线,3,1);
KKK:=SMA(RRRSV,3,1);
DDDDD:=((3 * RRRSV) - (2 * KKK));
JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);
RSV24:=SMA(JJ12,3,1);
K24:=SMA(RSV24,3,1);
D24:=((3 * RSV24) - (2 * K24));
压力2:=IF(CROSS(D24,DDDDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDDDD)))),COLORFFFFFF;
底部:=LLV(HIGH,30),COLOR00FF00;
压力位:=IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;
底部位:=IF(ISLASTBAR,底部,DRAWNULL),NODRAW;
底:=CONST(底部);
STICKLINE(ISLASTBAR ,压力位,压力位,30,0),COLORFFFFFF;
STICKLINE(ISLASTBAR ,底部位,底部位,25,0),COLOR00FFFF;
辰星线:=(20*YTSL+19*REF(YTSL,1)+18*REF(YTSL,2)+17*REF(YTSL,3)
+16*REF(YTSL,4)+15*REF(YTSL,5)+14*REF(YTSL,6)+13*REF(YTSL,7)
+12*REF(YTSL,8)+11*REF(YTSL,9)+10*REF(YTSL,10)+9*REF(YTSL,11)
+8*REF(YTSL,12)+7*REF(YTSL,13)+6*REF(YTSL,14)+5*REF(YTSL,15)
+4*REF(YTSL,16)+3*REF(YTSL,17)+2*REF(YTSL,18)+REF(YTSL,20))/211;
等待:=IF(MA3>辰星线,辰星线,MA3);
{卖出------------------------}
VAR55:=EMA(EMA(EMA(CLOSE,8),13),62);
VAR56:=((REF(HIGH,1) + REF(LOW,1)) / 2);
VAR57:=(MA(CLOSE,20) + (2 * STD(CLOSE,20)));
VAR58:=((SMA(MAX((CLOSE - REF(CLOSE,1)),0),7,1) / SMA(ABS((CLOSE - REF(CLOSE,1))),7,1)) * 100);
卖出1:=FILTER(CROSS(79,VAR58),4);
MA21:=REF(CLOSE,1);
ZX:=((SMA(MAX((CLOSE - MA21),0),6,1) / SMA(ABS((CLOSE - MA21)),6,1)) * 100);
卖出2:=CROSS(84,ZX),COLORFF00FF;
卖出3:=CROSS(90,RSI);
卖出:=卖出1 OR 卖出2 OR 卖出3;
{买入------------------------}
QQ2:=(CLOSE-LLV(LOW, 18))/(HHV(HIGH, 18)-LLV(LOW, 18))*100;
QQ3:=SMA(QQ2, 9, 1);
QQ4:=SMA(QQ3, 3, 1);
长趋势:=3*QQ3-2*QQ4,COLORWHITE,LINETHICK3;
趋势线:=EMA(QQ3, 3),COLORRED,LINETHICK3;
金叉:= CROSS(长趋势,趋势线);
AAAA1:=AMOUNT/V;
BBB1:=L<AAAA1*0.9;
CCC1:=(C-REF(C,1))/REF(C,1)*100>1.2;
DDD1:=L<MA(C,5)*0.921;
EEE1:=V<MA(V,5)*1.5;
老鼠仓:=BBB1 AND CCC1 AND DDD1 AND EEE1,,NODRAW;
X1:=(C+L+H)/3;
BB5:=ATAN(EMA(X1,7)-REF(EMA(X1,7),1))*3.1416*10;
VAR1:=(MA(CLOSE,80)-MA(CLOSE,13)/3);
VAR2:=( MA((CLOSE-VAR1)/VAR1,1));
VVAR3:=(CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100;
VVAR4:=SMA(VVAR3,4,1);
MMA:=EMA(VAR2,12)*0.7;
MMB:=EMA(VAR2,3);
快到底:=IF(LLV(MMB-MMA,12)>0,0,-20),LINETHICK2,COLORGREEN;
DIFF:=( EMA(CLOSE,12) - EMA(CLOSE,26))*100;
DEA:=EMA(DIFF,9);
MACD:= 2*(DIFF-DEA);
抄底:=IF(快到底<0 AND CROSS(MACD,0) AND VAR4<18,1,0);
AVAR2:=(2*CLOSE+HIGH+LOW)/4;
AVAR3:=IF(YEAR>=2099 AND MONTH>2,0,1);
AVAR4:=LLV(LOW,5);
AVAR5:=HHV(HIGH,4);
散户:= EMA((AVAR2-AVAR4)/(AVAR5-AVAR4)*100,4)*AVAR3;
庄家:= EMA(0.667*REF(散户,1)+0.333*散户,2)*AVAR3;
试买:=(((CROSS(散户,庄家) AND 散户<50 AND 29<散户)) NOT 大雪)
OR (CROSS(散户,庄家) AND 散户<30 ) OR 抄底;
AA05:=MA(C,5),COLOR0099CC;
五日乖离率:=(C-AA05)/AA05*100;
BB05:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;
速度5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);
加速度5:=EMA((速度5-REF(速度5,1)),3),NODRAW;
AA10:=MA(C,10);
AA20:=MA(C,20);BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416;
AA30:=MA(C,30);
三拾日乖离率:=(C-AA30)/AA30*100;
加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND
AA05>REF(AA05,1) AND 三拾日乖离率>REF(三拾日乖离率,1) AND
AA10>REF(AA10,1)
AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10) ;
DRAWICON(加仓,L*0.99,23);
IF(等待>REF(等待,1),等待,DRAWNULL),LINETHICK2,COLOR00FFFF;
- 上一篇公式:通达信分时组合源码
- 下一篇公式:自动画通道线主图指标 源码 无未来