通达信新猪腾四海指标优化版
底层红绿颜色是kdj,买点是:当两种同时变成红柱和橙柱时发出时是买点
底部:=-10{XG51};
STICKLINE(15,100,0,5,0),COLOR8B0000{XG51};
RSV:=(CLOSE-LLV(LOW,85))/(HHV(HIGH,85)-LLV(LOW,85))*100{XG51};
K:=Sma(RSV,7,1){XG51};
D:=SMA(K,6,1){XG51};
J:=3*K-2*D{XG51};
DRAWBAND(D,RGB(0,100,10),J,RGB(60,0,0));
VAR1:=(CLOSE+HIGH+LOW+OPEN)/4;
VAR2:=SUMBARS(vol,CAPITAL);
VAR3:=HHV(VAR1,VAR2);
VAR4:=LLV(VAR1,VAR2);
VAR5:=(2*VAR1-VAR4-REF(VAR4,1))/(VAR3-VAR4);
VAR6:=(VAR1-VAR4)/(VAR3-VAR4);
VAR7:=IF(VAR1<=VAR4,VAR5*60,VAR6*60);
VAR8:=600*(ema(CLOSE,3)-EMA(LOW,30))/EMA(LOW,30);
VAR9:=EMA(VAR8,7);
VARA:=(WINNER(120*CLOSE/100)-WINNER(100*CLOSE/100))*100;
VARB:=(-100)*(WINNER(120*CLOSE/100)-WINNER(100*CLOSE/100))+5;
波段买入: IF(VARA+VARB<7 AND crOSS(VAR8,VAR9) AND VAR9<-18 AND VAR9<VARB,60,50),COLORBLUE , ;
DRAWICON(波段买入=60,70,1),COLORWHITE;
猪腾四海:100-100*(HHV(HIGH,5*8)-CLOSE)/(HHV(HIGH,5*8)-LLV(LOW,5*8)),COLORFFFFFF,LINETHICK1{XG51};
海面:20,LINETHICK1,COLORCYAN;
海天分界线:50,LINETHICK1,COLORBLUE;
天际:80,LINETHICK1,COLORWHITE{XG51};
RSV1:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*60{XG51};
K1:=SMA(RSV1,5,1){XG51};
D1:=SMA(K1,5,1){XG51};
J1:=3*K1-2*D1{XG51};
AA1:=EMA(J1,5){XG51};
AA2:=REF(AA1,1){XG51};
STICKLINE(AA1>AA2,AA1,AA2,2.5,0),COLOR0055AA{XG51};
STICKLINE(AA1>AA2,AA1,AA2,0.5,0),COLORRED{XG51};
STICKLINE(AA1<=AA2,AA1,AA2,2.53,0),COLOR00BB00{XG51};
STICKLINE(AA1<=AA2,AA1,AA2,0.1,0),COLORRED{XG51};
RSV2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100{XG51};
K2:=SMA(RSV2,3,1){XG51};
D2:=SMA(K2,3,1){XG51};
J2:=3*K2-2*D2{XG51};
BB1:=EMA(J2,5){XG51};
BB2:=REF(BB1,1){XG51};
STICKLINE(BB1>BB2,BB1,BB2,2.8,0),COLOR000088{XG51};
STICKLINE(BB1>BB2,BB1,BB2,1,0),COLOR0000BB{XG51};
STICKLINE(BB1<=BB2,BB1,BB2,2.8,0),COLOR353500{XG51};
STICKLINE(BB1<=BB2,BB1,BB2,1.3,0),COLOR757500{XG51};
STICKLINE(BB1<=BB2,BB1,BB2,0.1,0),COLOR858500{XG51};
LCK := REF(CLOSE,1){XG51};
rsiK:=SMA(MAX(CLOSE-LCK,0),6,1)/SMA(Abs(CLOSE-LCK),6,1)*100{XG51};
T0K:=BARSCOUNT(C)>12{XG51};
T1K:=C=LLV(C,12){XG51};
T2K:=RSIK>LLV(RSIK,12){XG51};
T3K:=RSIK<21{XG51};
TRSI:=T0K AND T1K AND T2K AND T3K AND C/HHV(C,120)<0.7{XG51};
RSI成W底:IF((REF(TRSI,1) AND C>REF(C,1)),60,0),LINETHICK2,COLORWHITE;
拉升力:=(CLOSE-LLV(LOW,26))/(HHV(HIGH,33)-LLV(LOW,46))*1.8*CLOSE{XG51};
拉升力A:=SMA(拉升力,9,1){XG51};
波峰波谷:=SMA(拉升力A,4,1){XG51};
拉升力B:=3*拉升力A-2*波峰波谷{XG51};
空方:=3*波峰波谷-1* 拉升力A{XG51};
短线:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*88{XG51};
中线:=(CLOSE-MA(CLOSE,4))/MA(CLOSE,4)*88{XG51};
红柱:=SMA(短线,3,1){XG51};
蓝柱:=SMA(中线,3,1){XG51};
{红柱}
STICKLINE(红柱<REF(红柱,1)AND 红柱>0,0,红柱,2.4,0),COLOR0000AA{XG51};
STICKLINE(红柱<REF(红柱,1)AND 红柱>0,0,红柱,1,0),COLOR0000FF{XG51};
STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,2.6,0),COLOR0000AA{XG51};
STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,1,0),COLOR0000FF{XG51};
STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,2.6,0),COLOR0000FF{XG51};
STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,1.3,0),COLOR00BBFF{XG51};
{蓝柱}
STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,2.6,0),COLORFF0000{XG51};
STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,1.3,0),COLORFFBB00{XG51};
STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,2.3,0),COLORFF0000{XG51};
STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,2.2,0),COLORFFBB00{XG51};
STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,2.7,0),COLOR998800{XG51};
STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,1.3,0),COLORDDCC99{XG51};
VAR3Q:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100{XG51};
VAR4Q:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100{XG51};
VAR5Q:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100{XG51};
VAR6Q:=(VAR3Q+VAR4Q+VAR5Q)/3{XG51};
VAR7Q:=EMA(VAR6Q,5){XG51};
指标:=EMA(EMA(VAR3Q,5),5)*3{XG51};
VAR8Q:=IF(VAR6Q<=-20,10,0){XG51};
VAR9Q:=HHV(VAR8Q,10){XG51};
VARAQ:=IF(VAR9Q AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0){XG51};
DRAWTEXT(VAR8Q=10 AND FILTER(VAR8Q=10,5),-10{15},'近底部'),LINETHICK1,COLORBLUE{XG51};
DRAWTEXT(VARAQ=20,15,'底部'),LINETHICK1,COLORRED;
VAR2A:=(((CLOSE - MA(CLOSE,6)) / MA(CLOSE,6)) * 100){XG51};
VAR3A:=(((CLOSE - MA(CLOSE,12)) / MA(CLOSE,12)) * 100){XG51};
VAR4A:=(((CLOSE - MA(CLOSE,24)) / MA(CLOSE,24)) * 100){XG51};
VAR5A:=(((VAR2A + (2 * VAR3A)) + (3 * VAR4A)) / 6){XG51};
VAR6A:=MA(VAR5A,3){XG51};
底部1:IF((VAR6A < 底部),20,0),COLORFFFF00{XG51};
STICKLINE((CROSS(J,K) AND (底部1 >= 20)),35,0,0.1,0),COLORFFFFFF{XG51};
DRAWTEXT((CROSS(J,K) AND (底部1 >= 20)),38,'全仓'){XG51};
{+W~W.W=G_P.G~S_C_N_{*}