VAR1:=MA(CLOSE,20);
布林极限:=100*(CLOSE-VAR1)/STD(CLOSE,20);
布林K值:=EMA(布林极限,10);
VAR2:=EMA(布林极限,5);
VAR3:=EMA(布林K值,5);
VAR4:=EMA(HHV(HIGH,500),21);
VAR5:=EMA(HHV(HIGH,250),21);
VAR6:=EMA(HHV(HIGH,90),21);
VAR7:=EMA(LLV(LOW,500),21);
VAR8:=EMA(LLV(LOW,250),21);
VAR9:=EMA(LLV(LOW,90),21);
VARA:=EMA((VAR7*0.96+VAR8*0.96+VAR9*0.96+VAR4*0.558+VAR5*0.558+VAR6*0.558)/6,21);
VARB:=EMA((VAR7*1.25+VAR8*1.23+VAR9*1.2+VAR4*0.55+VAR5*0.55+VAR6*0.65)/6,21);
VARC:=EMA((VAR7*1.3+VAR8*1.3+VAR9*1.3+VAR4*0.68+VAR5*0.68+VAR6*0.68)/6,21);
VARD:=EMA((VARA*3+VARB*2+VARC)/6*1.738,21);
VARE:=REF(LOW,1);
VARF:=SMA(ABS(LOW-VARE),3,1)/SMA(MAX(LOW-VARE,0),3,1)*100;
VAR10:=IF(CLOSE*1.35<=VARD,VARF*10,VARF/10);
VAR11:=EMA(VAR10,3);
VAR12:=LLV(LOW,30);
VAR13:=HHV(VAR11,30);
VAR14:=IF(LOW<=VAR12,(VAR11+VAR13*2)/2,0);
VAR15:=EMA(VAR14,3)/500-100;
VAR16:=0.2*VAR15;
VAR17:=1.2*VAR15;
VAR18:=(2*CLOSE+HIGH+LOW)/4;
VAR19:=LLV(LOW,34);
VAR1A:=HHV(HIGH,34);
VAR1B:=(VAR18-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*100;
VAR1C:=EMA(VAR1B,3);
VAR1D:=EMA(VAR1C,3);
VAR1E:=EMA((VAR18-VAR19)/(VAR1A-VAR19)*100,9);
VAR1F:=EMA(0.667*REF(VAR1E,1)+0.333*VAR1E,3);
VAR20:=LLV(HIGH,240);
VAR21:=100*(CLOSE-VAR20)/VAR20;
VAR22:=HHV(HIGH,240);
VAR23:=100*(VAR22-CLOSE)/CLOSE;
VAR24:=REF(HHV(CLOSE,60),1);
VAR25:=REF(LLV(CLOSE,60),1);
VAR26:=100*(CLOSE-VAR25)/(VAR24-VAR25);
{摇铃引牛起步}
摇铃引牛起步: IF(VAR16<REF(VAR16,1) AND REF(VAR16,1)>REF(VAR16,2) AND REF(VAR16,2)>REF(VAR16,3)
AND VAR17<REF(VAR17,1) AND REF(VAR17,1)>REF(VAR17,2) AND REF(VAR17,2)>REF(VAR17,3)
AND REF(VAR17,1)>0,260,0),STICK,LINETHICK3,COLORBLUE;
牵牛起:IF(CROSS(VAR26,VAR21) AND CROSS(布林极限,布林K值) AND CLOSE>=OPEN AND VAR1E<=50 AND VAR1F<=50
AND VAR1C>=VAR1E AND VAR1D>=VAR1F,260,0),STICK,LINETHICK6,COLOR006600;
骑牛背:IF(CROSS(VAR26,VAR21) AND CROSS(布林极限,布林K值) AND CLOSE>=OPEN AND VAR1E<=50 AND VAR1F<=50
AND VAR1C>=VAR1E AND VAR1D>=VAR1F,260,0),STICK,LINETHICK2,COLOR009900;
敢牛走:IF(CROSS(VAR26,VAR21) AND CROSS(布林极限,布林K值) AND CLOSE>=OPEN AND VAR1E<=50 AND VAR1F<=50
AND VAR1C>=VAR1E AND VAR1D>=VAR1F,260,0),STICK,LINETHICK1,COLOR00EE00;
中线拽牛上路:IF(CROSS(REF(VAR26,1),REF(VAR21,1)) AND CROSS(布林极限,布林K值) AND CLOSE>=OPEN AND VAR1E<=50
AND VAR1F<=50 AND VAR1C>=VAR1E AND VAR1D>=VAR1F,260,0),STICK,LINETHICK3,COLORGREEN;
STICKLINE(布林极限>=布林K值,布林极限,布林K值,6,0),COLORMAGENTA;
STICKLINE(布林极限<布林K值,布林K值,布林极限,8,0),COLOR006600;
STICKLINE(布林极限<布林K值,布林K值,布林极限,4,0),COLOR009900;
STICKLINE(布林极限<布林K值,布林K值,布林极限,1,0),COLOR00EE00;
STICKLINE(VAR2>=VAR3,VAR2,VAR3,6,0),COLORMAGENTA;
STICKLINE(VAR2<VAR3,VAR3,VAR2,8,0),COLOR006600;
STICKLINE(VAR2<VAR3,VAR3,VAR2,4,0),COLOR009900;
STICKLINE(VAR2<VAR3,VAR3,VAR2,1,0),COLOR00EE00;
STICKLINE(CROSS(布林极限,布林K值),布林极限,布林K值,6,0),COLORMAGENTA;
STICKLINE(布林极限>=170,布林极限,布林K值,8,0),COLOR0055AA;
STICKLINE(布林极限>=170,布林极限,布林K值,4,0),COLOR0077CC;
STICKLINE(布林极限>=170,布林极限,布林K值,1,0),COLOR00BBFF;
{波段铃铛引路}
LC:=REF(CLOSE,1);
RSI5:=((SMA(MAX((CLOSE - LC),0),5,1) / SMA(ABS((CLOSE - LC)),5,1)) * 100);
TR1:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),10);
HD:=(HIGH - REF(HIGH,1));
LD:=(REF(LOW,1) - LOW);
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);
AV:=(RSI5 + ADX);
DXR:=(((ADX + REF(ADX,5)) / 2) + RSI5);
WR10:=((100 * (HHV(HIGH,10) - CLOSE)) / (HHV(HIGH,10) - LLV(LOW,10)));
NEWVOL:=(RSI5 - WR10);
最佳买入:=(AV + NEWVOL);
最佳买入选股:=(CROSS(最佳买入,0));
STICKLINE(最佳买入选股,L*0.99,L*0.81,6,0),COLOR33FFFF;
RSV:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 50);
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
X:=LLV(J,2)=LLV(J,8);
波段铃铛引路:(CROSS(J,3)),COLORRED;
DRAWICON(波段铃铛引路,L*0.993,1);
机构建仓:=(最佳买入<5);
DRAWTEXT(机构建仓,L*0.98,'*'),COLORRED;{信号为粉色*};
选股公式源码:
{敢牛走选股}
VAR1:=MA(CLOSE,20);布林极限:=100*(CLOSE-VAR1)/STD(CLOSE,20);布林K值:=EMA(布林极限,10);
VAR18:=(2*CLOSE+HIGH+LOW)/4;
VAR19:=LLV(LOW,34);
VAR20:=LLV(HIGH,240);VAR21:=100*(CLOSE-VAR20)/VAR20;
VAR24:=REF(HHV(CLOSE,60),1);
VAR25:=REF(LLV(CLOSE,60),1);
VAR26:=100*(CLOSE-VAR25)/(VAR24-VAR25);
VAR1A:=HHV(HIGH,34);
VAR1B:=(VAR18-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*100;
VAR1C:=EMA(VAR1B,3);VAR1D:=EMA(VAR1C,3);
VAR1E:=EMA((VAR18-VAR19)/(VAR1A-VAR19)*100,9);
VAR1F:=EMA(0.667*REF(VAR1E,1)+0.333*VAR1E,3);
敢牛走:CROSS(VAR26,VAR21) AND CROSS(布林极限,布林K值) AND CLOSE>=OPEN AND VAR1E<=50 AND VAR1F<=50 AND VAR1C>=VAR1E AND VAR1D>=VAR1F;
|