组合副图
{N:2,100,7;M:2,100,5}
N:=7;M:=5;
{底部线}
VAR1:=(2*C+H+L)/4;
VAR2:=LLV(L,3);
VAR3:=HHV(H,3);
A:=EMA((VAR1-VAR2)/(VAR3-VAR2)*100,8),COLOR3366FF;
B:=EMA(A,3);
STICKLINE(A>0 AND A-B<=0,-5,0,4,0),COLOR00FF00;
STICKLINE(A>0 AND A-B>0,-5,0,4,0),COLORRED;
{顶部线}
UP:=SMA(IF(CLOSE>REF(CLOSE,1), CLOSE-REF(CLOSE,1),0),3,1);
DN:=SMA(IF (CLOSE<=REF(CLOSE,1),ABS(CLOSE-REF(CLOSE,1)),0),3,1);
指标:=100*UP/(UP+DN);
强弱:=EMA(指标,3),COLORRED;
平均:=EMA(强弱,3),COLORGREEN;
RSV:=(CLOSE-LLV(CLOSE,9))/(HHV(CLOSE,9)-LLV(CLOSE,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
QJJ:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
XVL:=(IF(CLOSE>OPEN,QJJ*(HIGH-LOW),IF(CLOSE<OPEN,QJJ*(HIGH-OPEN+CLOSE-LOW),VOL/2))+IF(CLOSE>OPEN,0-QJJ*(HIGH-CLOSE+OPEN-LOW),IF(CLOSE<OPEN,0-QJJ*(HIGH-LOW),0-VOL/2)));
HSL:=(XVL/20)/1.15;
攻击流量:=((HSL*0.55+(REF(HSL,1)*0.33))+(REF(HSL,2)*0.22));
LLJX:=EMA(攻击流量,2);
资金流:=LLJX/1000;
卖出:=强弱<平均 AND D<REF(D,1) AND 资金流<=0 AND MA(C,3)<REF(MA(C,3),1);
STICKLINE(卖出,100,105,4,0),COLORGREEN;
观望:=(强弱>=平均 OR D>=REF(D,1) OR MA(C,3)>=REF(MA(C,3),1)) OR (D>=REF(D,1) OR 资金流>0 OR MA(C,3)>=REF(MA(C,3),1)) OR(强弱>=平均 OR 资金流>0 OR MA(C,3)>=REF(MA(C,3),1)) OR (强弱>=平均 OR 资金流>0 OR D>=REF(D,1));
STICKLINE(观望,100,105,4,0),COLORFF8080;
买进:=强弱>=平均 AND D>=REF(D,1) AND 资金流>0 AND MA(C,3)>=REF(MA(C,3),1);
STICKLINE(买进,100,105,4,0),COLORRED;
{神奇曲线}
曲线:SMA(((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100),3,1),COLORRED;
DRAWBAND(曲线,RGB(155,50,50),50,RGB(0,100,50));
主力:3*曲线-2*SMA(曲线,3,1);
IF(主力>=REF(主力,1),主力,DRAWNULL),LINETHICK2,COLORRED;
IF(主力<=REF(主力,1),主力,DRAWNULL),LINETHICK1,COLOR00FF00;
{分界线}
STICKLINE(主力>=REF(主力,1),49,51,4,0),COLORRED;
STICKLINE(主力<=REF(主力,1),49,51,4,0),COLOR00FF00;
STICKLINE(C,90,90,1,0),COLORYELLOW;{风险线}
STICKLINE(C,10,10,1,0),COLORCYAN;{安全线}
{红柱抄底}
BIAS1:=(C-MA(C,6))/MA(C,6)*100;
BIAS2:=(C-MA(C,12))/MA(C,12)*100;
BIAS3:=(C-MA(C,24))/MA(C,24)*100;
BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;
乖离:=MA(BIAS,3);
STICKLINE(CROSS(BIAS,乖离) AND 乖离<-9.5,20,0,1.5,0),COLORRED;
{信号}
DRAWICON(CROSS(曲线,50),50,1);
DRAWICON(CROSS(50,曲线),50,2);
DRAWICON(CROSS(主力,曲线),曲线,11);
DRAWICON(CROSS(曲线,主力),曲线,12);
{建仓买点}
LC:=REF(CLOSE,1);
RSI5:=((SMA(MAX((CLOSE - LC),0),5,1) / SMA(ABS((CLOSE - LC)),5,1)) * 100);
WR10:=((100 * (HHV(HIGH,10) - CLOSE)) / (HHV(HIGH,10) - LLV(LOW,10)));
HD:=(HIGH - REF(HIGH,1));
LD:=(REF(LOW,1) - LOW);
TR1:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),10);
DMP:=SUM(IF(((HD>0) AND (HD>LD)),HD,0),10);
DMM:=SUM(IF(((LD>0) AND (LD>HD)),LD,0),10);
PDI:=((DMP*100)/TR1);
MDI:=((DMM*100)/TR1);
ADX:=MA(((ABS((MDI-PDI))/(MDI+PDI))*100),5);
DXR:=(((ADX+REF(ADX,5))/2)+RSI5);
AV:=(RSI5+ADX);
NEWVOL:=(RSI5-WR10);
最佳买入:=(AV+NEWVOL);
最佳买入选股:=IF(CROSS(最佳买入,0),10,0);
VAR01:=SMA(最佳买入选股,3,1);
VAR02:=SMA(VAR01,3,1);
VAR03:=SMA(VAR02,3,1);
建仓买点:IF(CROSS(VAR02,VAR03) AND (VAR02<40),40,0),LINETHICK2,COLOR0000FF;
{最佳买入时机}
{RSV:=(CLOSE-LLV(CLOSE,9))/(HHV(CLOSE,9)-LLV(CLOSE,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);}
J:=3*K-2*D;
X:=LLV(J,2)=LLV(J,8);
买入时机:IF(CROSS(J,3),35,0),LINETHICK1,COLORYELLOW;
{出手就赢}
D1:=K-REF(K,1);
出手就赢:IF(D1>7 AND REF(D1,1)<0 AND (D1-REF(D1,1))>9,25,0), STICK,COLORYELLOW;
DRAWICON(出手就赢>0,25,1);
{绝路航标}{N:2,100,7;M:2,100,5}
VARA:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*80;
AB:=SMA(VARA,N,1);
VAR12:=SMA(AB,M,1);
绝路航标:IF(CROSS(AB,VAR12) AND AB<40,30,0),COLORBLUE;
{MACD底背离}
DIFF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA:=EMA(DIFF,9),COLORFFFF00;
AQ1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,AQ1+1)>CLOSE AND DIFF>REF(DIFF,AQ1+1) AND CROSS(DIFF,DEA);
MACD底背离:IF(底背离,57,0),LINETHICK2,COLORFF00FF;
DRAWTEXT(底背离,54,'←底背离'),COLORWHITE;
{妖娆之心买卖信号}
VAR11:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
VAR22:=REF(VAR11,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR33:=REF(VAR22,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR44:=REF(VAR33,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR55:=REF(VAR44,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR66:=REF(VAR55,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR77:=REF(VAR66,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR88:=REF(VAR77,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR99:=REF(VAR88,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARAA:=REF(VAR99,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARBB:=REF(VARAA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARCC:=REF(VARBB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARDD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
VAREE:=REF(VARDD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARFF:=REF(VAREE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR100:=REF(VARFF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR110:=REF(VAR100,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR120:=REF(VAR110,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR130:=REF(VAR120,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR140:=REF(VAR130,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR150:=REF(VAR140,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR160:=REF(VAR150,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR170:=REF(VAR160,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR180:=REF(VAR170,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR190:=REF(VARDD OR VAREE OR VARFF OR VAR100 OR VAR110 OR VAR120 OR VAR130 OR
VAR140 OR VAR150 OR VAR160 OR VAR170 OR VAR180,1) AND VAR11;
VAR1A:=REF(VAR11 OR VAR22 OR VAR33 OR VAR44 OR VAR55 OR VAR66 OR VAR77 OR
VAR88 OR VAR99 OR VARAA OR VARBB OR VARCC,1) AND VARDD;
STICKLINE(VAR190,-7,-3,3,0),COLOR8080FF;
STICKLINE(VAR1A,103,107,3,0),COLORBLUE;
{长中短线}
AA:=-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14))+100,COLORRED;
BB:=EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4)+100,COLOR00FFFF;
CC:=MA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),19)+100;
STICKLINE(AA>=BB,-14,-10,4,0),COLORRED;
STICKLINE(AA<BB,-14,-10,4,0),COLOR00FF00;
{短中线叉:AA>BB,POINTDOT;}
STICKLINE(CC>=REF(CC,1),-20,-16,4,0),COLORRED;
STICKLINE(CC<REF(CC,1),-20,-16,4,0),COLOR00FF00;
{长线强弱:CC>=REF(CC,1),POINTDOT;}
DRAWTEXT(CURRBARSCOUNT=4,-12,'短中线'),COLORFF0000;
DRAWTEXT(CURRBARSCOUNT=4,-18,'长期线'),COLORFF0000;
|