用法:
两线合一,上涨
两线分开,逃吧
R主图
{N1 1 100 10 N2 0 30 3}
N:=5;
N1:=10;
N2:=3;
A1:=BACKSET(ISLASTBAR,PEAKBARS(1,N,1)+1);
A2:=A1>REF(A1,1);
B1:=BACKSET(ISLASTBAR,PEAKBARS(1,N,2)+1);
B2:=B1>REF(B1,1);
C1:=BACKSET(ISLASTBAR,PEAKBARS(1,N,3)+1);
C2:=C1>REF(C1,1);
DRAWLINE(B2,H,A2,H,1);
DRAWLINE(C2,H,B2,H,0);{N:3.1.99,主图叠加};
IF(A1,PEAK(1,N,1),DRAWNULL);
{DRAWLINE(C2,H,A2,H,1);}
A11:=BACKSET(ISLASTBAR,TROUGHBARS(2,N,1)+1);
A21:=A11>REF(A11,1);
B11:=BACKSET(ISLASTBAR,TROUGHBARS(2,N,2)+1);
B21:=B11>REF(B11,1);
C11:=BACKSET(ISLASTBAR,TROUGHBARS(2,N,3)+1);
C21:=C11>REF(C11,1);
DRAWLINE(B21,L,A21,L,1);
DRAWLINE(C21,L,B21,L,0);
{DRAWLINE(C21,L,A21,L,1);}
IF(A11,TROUGH(2,N,1),DRAWNULL); LC := REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100,COLOR9900FF;
DRAWTEXT(CROSS(RSI1,80),(HIGH * 1.1),'卖'),COLORYELLOW;
DRAWICON(CROSS(RSI1,80),(HIGH)*(1.02),2);
B36:=MA(CLOSE,3) - MA(CLOSE,6);
B612:=MA(CLOSE,6) - MA(CLOSE,12);
W:=((B36)/(CLOSE))*(10);
J1:=((B612)/(CLOSE))*(10);
DRAWTEXT((W < (-0.2)) AND (J1 < (-0.2)) AND CROSS(W,J1),(LOW)*(0.95),'庄'),COLORRED;
庄家:=(W < (-0.2)) AND (J1 < (-0.2)) AND CROSS(W,J1);
STICKLINE(庄家,O,C,4,1),LINETHICK2,COLORFFFFFF;
M1:=SUM((EMA((CLOSE + LOW)/(2),2))/(2.98),3),POINTDOT,COLORFFFFFF;
M2:=EMA(M1,21),COLORFF00FF;
M30:=MA(CLOSE,30),LINETHICK1,COLORFF0000;
VAR1:=(2)*(MA((LLV((CLOSE + LOW)/(2),8))*(1.1),13)) - EMA((CLOSE + LOW)/(2),3) - ((CLOSE + LOW)/(2))*(0.1);
VAR2:=IF(((EMA((CLOSE + LOW)/(2),3) - VAR1)*(5) > 0),(POW((EMA((CLOSE + LOW)/(2),3) - VAR1)*(5),2))/(10),(((-1))*(POW((EMA((CLOSE + LOW)/(2),3) - VAR1)*(5),2)))/(10));
VAR3:=IF((VAR2 > 0),VAR2 - 0,(-1));
工作线:=MA(CLOSE,1);
M3:=MA(CLOSE,3);
M13:=MA(CLOSE,13);
EMA13:=EMA(C,13);
EMA34:=EMA(C,34);
EMA55:=EMA(C,55);
EMA120:=EMA(C,120);
AR1:=EMA55>EMA34 AND EMA34>EMA13;
AR2:=BARSLAST((C-EMA13)/EMA13*100<-6);
AR3:=EMA13>=REF(EMA13,2);
AR4:=COUNT(CROSS(C,EMA13),AR2)=1;
AR5:=AR1 AND AR2 AND AR3 AND AR4;
AR6:=AR5 AND FILTER(AR5,10);
V1:=EMA(CLOSE,5);
V2:=EMA(EMA(CLOSE,90)*1.01,10);
DRAWTEXT(CROSS(V1,V2),L-0.09,'起'),COLOR00FF00;
AA1:=AMOUNT/V;
BB1:=L<AA1*0.9;
CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;
DD1:=L<MA(C,5)*0.921;
EE1:=V<MA(V,5)*1.5;
FF1:=BB1 AND CC1 AND DD1 AND EE1;
A1AA:=9;
A2AA:=(REF(CLOSE,A1AA+1)<CLOSE);
DRAWTEXT(FILTER((A2AA>-0.5),84),(HIGH)*(1.04),'变'),COLORFFFFFF;
DRAWICON(FILTER((A2AA>-0.5),84),(HIGH)*(1.02),2);
TT2:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4.15),0.9);
TT1:=REF(EMA(TT2,3),1);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
EMA1:=EMA(C,1);
MA30:=MA(C,30),COLORYELLOW,POINTDOT,LINETHICK2;
生命:=EMA(CLOSE,453),COLORFF00FF,POINTDOT,LINETHICK2;
LOCK:=1;
M8:=EMA(CLOSE,8);
VAR21:=EMA(M13,62);
VAR22:=(CLOSE+HIGH+LOW)/3;
VAR23:=EMA(VAR22,10)*LOCK;
VAR24:=REF(VAR23,1)*LOCK;
DRAWTEXT(AR6,L-0.25,'杏'),COLOR00CCFF;
STICKLINE(AR6,H,L,0.5,1),COLOR00CCFF;
STICKLINE(AR6,O,C,6,1),LINETHICK2,COLOR00CCFF;
BR1:=COUNT(BETWEEN((C-REF(C,1))/REF(C,1)*100,0,5) ,5)=5;
BR2:=ABS((EMA13-EMA34)+(EMA34-EMA55))/C<0.2;
BR3:=C>EMA55 AND (REF(C,1)<REF(EMA55,1) OR REF(C,2)<REF(EMA55,2) OR REF(C,3)<REF(EMA55,3) OR REF(C,4)<REF(EMA55,4) OR REF(C,5)<REF(EMA55,5));
BR4:=BR1 AND BR2 AND BR3;
DRAWTEXT(BR4 AND FILTER(BR4,10),H*1.08,'蚁'),COLOR00C5FF;
STICKLINE(BR4 AND FILTER(BR4,10),H,L,0.5,1),COLOR00C5FF;
STICKLINE(BR4 AND FILTER(BR4,10),O,C,6,1),LINETHICK2,COLOR00C5FF;
X20:=DRAWTEXT(CROSS(EMA34,EMA55),L-0.5,'重'),COLORYELLOW;
STICKLINE(CROSS(EMA34,EMA55),H,L,0.5,1),COLOR00CCFF;
STICKLINE(CROSS(EMA34,EMA55),O,C,6,1),LINETHICK2,COLOR00CCFF;
DRAWTEXT(CROSS(RSI1,50),L-1.08,'买'),COLORRED;
DRAWICON(CROSS(RSI1,50),L-0.58,1);
DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'顶'),COLOR1880FF;
VAR11:=IF(C>=O,H,0);
VAR12:=IF(C<=O,REF(H,1),VAR11);
VAR13:=IF(C>=O,V,0);
VAR14:=IF(C<=O,REF(V,1),VAR3);
VAR15:=COUNT(VAR12>REF(VAR12,1) AND VAR14<REF(VAR14,1),3)>=2 AND C>O;
量价背离:=VAR15*40,STICK,COLORF5CCEB,LINETHICK2;
DRAWTEXT(量价背离,HIGH * 1.02,'离'),COLORYELLOW;
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR60:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR61:=VARF<REF(VAR60,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
大资金:=(VAR61 AND COUNT(VAR61,30)=1);
DRAWTEXT(大资金,LOW*0.9,'▲');
DRAWTEXT(大资金,LOW*0.8,'大资金');
GJ:=(C+H+L+O)/4;
明日阻力:=L+(GJ-L)+(C-L);
明日支撑:=L+(C-GJ);
今日阻力:REF(明日阻力 , 1),NODRAW;
今日支撑:REF(明日支撑 , 1),NODRAW;
STICKLINE(ISLASTBAR AND C>=今日阻力,今日阻力,今日阻力,10,1),COLOR0000FF;
STICKLINE(ISLASTBAR AND C<今日阻力,今日阻力,今日阻力,10,1),COLOR00FF00;
STICKLINE(ISLASTBAR AND C>=今日支撑,今日支撑,今日支撑,10,1),COLORFF00FF;
STICKLINE(ISLASTBAR AND C<今日支撑,今日支撑,今日支撑,10,1),COLORFF8800;
MID1:=(3*CLOSE+LOW+OPEN+HIGH)/6;
MA1:=MA(MID1,8),COLORWHITE;
MA2:=MA(MID1,13),COLORFFCCCC;
MA3:=MA(MID1,21),COLORFFCC66;
MA55:=MA(MID1,55),LINETHICK2;
MA144:=MA(MID1,144),LINETHICK2;
MA233:=MA(MID1,233),LINETHICK2;
乖离线:=((C-REF(MA1,1))/20+MA1)*1.20;
回调认同:=EMA(EXPMA(MID1,20),13),COLORRED,CROSSDOT;
信号线:HHV(FORCAST(C,10),8),COLORFF00FF;
合力线:FORCAST(C,10),COLOR00FF00;
RSV11:=(C - LLV(LOW,27))/(HHV(HIGH,3) - LLV(LOW,27)) * 100;
F := SMA(RSV11, 3, 1);
K11 := SMA(F,3, 1);
D11 := SMA(K11,3, 1);
WAV:=3*K11-2*D11;
A41:=IF(1,C,IF(C<REF(O,1) AND L<REF(L,1),L,C));
A42:=IF(C<REF(L,1),L,A41);
A43:=IF(H<REF(O,1),L,A42);
A44:=IF(O<=REF(C,1) AND C<REF(O,1),L,A43);
A:=IF(C<O AND O<REF(O,1) AND L<REF(L,1),L,A44);
AJ1:=ATAN((A/REF(A,1)-1)*100)*180/3.1416;
LJIAO:=ATAN((VOL/REF(VOL,1)-1)*100)*180/3.1416;
DSLJ:=LJIAO>0 AND ABS(LJIAO-AJ1)<30;
JIA5:=WAV-REF(WAV,4)>50;
DSALE:=DSLJ AND (JIA5 OR WAV>90);
DILJ:=LJIAO<0 AND ABS(LJIAO-AJ1)<30;
JIA6:=WAV-REF(WAV,4)<-50;
DBUY:=DILJ AND (JIA6 OR WAV<10);
PLX:=((C-MA(C,10))/MA(C,10)+(C-MA(C,5))/MA(C,5))*100;
DING1:=PLX>25;
DI1:=PLX<-25;
跌幅:=(C-HHV(C,10))/HHV(C,10)*100;
DI2:=跌幅<-20;
涨幅:=(C-LLV(C,10))/LLV(C,10)*100;
DING2:=涨幅>20;
DING:=DSALE OR DING2;
DI:=DBUY OR DI1 OR DI2;
QSA:=(MA(C,60)-REF(MA(C,60),10))/REF(MA(C,60),10)*100;
QS:=SMA(QSA,10,1);
DS:=QS<-3 OR MA(C,60)<REF(MA(C,60),1);
QC:=DS AND DING AND DING!=REF(DING,1);
DRAWTEXT(QC,H*1.05,'◇'),COLORRED;
DRAWTEXT(QC,H*1.15,'做空'),COLORRED;
VARA:=LLV(LOW,36);
VARB:=HHV(HIGH,30);
VARC:=EMA((CLOSE-VARA)/(VARB-VARA)*4,4)*25;
趋势:= VARC, COLOR33FFFF;
顶背: STICKLINE(VARC>90,OPEN,CLOSE,3,0) , COLORRED;
阴线买入:=C>O && MA(C,5)<MA(C |