{主力潜伏}
N3:=14;
M:=156;
TYP:=(HIGH+LOW+CLOSE)/3;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA1:=EMA(DIFF,9);
macd1:=2*(DIFF-DEA1);
主力潜伏中:=COUNT(MacD1<0,10)=10;
STICKLINE(主力潜伏中,0,4,3,0),COLOR00CCFF;
DRAWTEXT(ISLASTBAR,6,'--主力潜伏'),COLOR00CCFF;
获利盘:WINNER(CLOSE)*100,COLOR00CCFF,LINETHICK0.03;
{主力出逃}
资金:=EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3)/4;
外围游资:=(资金>23.16);
STICKLINE((资金>23.16),0,4,4,0),COLORGREEN;
{DRAWTEXT(外围游资,2.5,'*'),COLOR2828FF;}
DRAWTEXT(ISLASTBAR,2,'--主力出逃'),COLOR00FF00;
{出手就赢}
VAR2H:=REF(LOW,1);
VAR3H:=SMA(Abs(LOW-VAR2H),3,1)/SMA(MAX(LOW-VAR2H,0),3,1)*100;
VAR4H:=EMA(IF(CLOSE*1.3,VAR3H*10,VAR3H/10),3);
VAR5H:=LLV(LOW,30);
VAR6H:=HHV(VAR4H,30);
VAR7H:=IF(MA(CLOSE,58),1,0);
VAR8H:=EMA(IF(LOW<=VAR5H,(VAR4H+VAR6H*2)/2,0),3)/618*VAR7H;
VAR9H:=IF(VAR8H>100,100,VAR8H);
STICKLINE(VAR9H>-150,0,VAR9H,4,0.3),COLOR888888;
底部吸筹指标:= (CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100;
DRAWICON(crOSS(底部吸筹指标,-24),30,26);
先知:= (CLOSE-MA(CLOSE,5))/MA(CLOSE,5)/10;
DRAWICON(先知,30,1);
{可能放量拉升:= IF(CROSS(底部吸筹指标,-24),1,0);
短线获利:=STICKLINE(REF("kdj.J",1)<0 AND "kdJ.J">0);}
VARK1:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
VARK2:=REVERSE(VARK1);
VARK3:=SMA(VARK1,3,1);
{波段王:=SMA(VARK3,3,1);
波段鬼:=SMA(波段王,2.5,1);}
趋势线:= 3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1), ,COLORFF6666,LINETHICK2;
RSV9:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K1:=SMA(RSV9,3,1);DK1:=K1-REF(K1,1);
出手就赢:=(DK1>7 AND REF(DK1,1)<0 AND (DK1-REF(DK1,1))>9);
DRAWICON(出手就赢>0,30,1);
买点准备:=(趋势线<=10);
DRAWICON(REF("KDJ.J",1)<0 AND "KDJ.J">0,30,25);
DRAWTEXT(ISLASTBAR,30,'--出手就赢');
{主力进场}
VAR1A:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR2A:=SMA(ABS(LOW-VAR1A),13,1)/SMA(MAX(LOW-VAR1A,0),10,1);
VAR3A:=EMA(VAR2A,10);
VAR4A:=LLV(LOW,33);
VAR5A:=EMA(IF(LOW<=VAR4A,VAR3A,0),3);
主力进场:=(VAR5A>REF(VAR5A,1));
DRAWICON(主力进场,40,1);
DRAWTEXT(ISLASTBAR,40,'--主力进场');
{抄底魔鬼}
底7:=(CLOSE-MA(CLOSE,58))/MA(CLOSE,58)<-0.225;
DRAWICON(底7,10,26);
VAR2:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
VAR3:=SMA(SMA(VAR2,3,1),3,1);
VAR4:=SMA(VAR3,3,1);
VAR5:=3*VAR3-2*VAR4;
VAR6:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA
(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
VAR7:=10;
底3:=(CROSS(VAR6,VAR7));
DRAWICON(底3,10,1);
VAR8:=(CLOSE-LLV(LOW,60.135))/(HHV(HIGH,60.135)-LLV(LOW,60))*80;
VAR9:=SMA(VAR8,7,1); VARA:=SMA(VAR9,5,1);
底4:=(CROSS(VAR9,VARA AND VAR9<20));
DRAWICON(CROSS(VAR9,VARA AND VAR9<20),10,1);
VARB:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
VARC:=SMA(VARB,5,1); VARD:=SMA(VARC,5,1);
底5:=(CROSS(VARC,VARD AND VARC<20));
DRAWICON(底5,10,1);
VARE:=1/WINNER(CLOSE); VARF:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
VAR10:=100-ABS(VARF); VAR11:=IF(VARE>5,IF(VARE<100,VARE,VAR10-10),0);
VAR12:=HHV(HIGH,25); VAR13:=LLV(LOW,25);
VAR14:=EMA((CLOSE-VAR13)/(VAR12-VAR13)*100,5);
底6:=(CROSS(VAR14,VAR11));
DRAWICON(底6,10,13);
DRAWTEXT(ISLASTBAR,10,'--抄底魔鬼');
{cci合并}
DRAWICON(CROSS(200,CCI),70,27);
DRAWICON( CROSS(CCI,-200),70,26);
DRAWICON( CROSS(CCI,-100),70,1);
DRAWTEXT(ISLASTBAR,70,'--CCI合并');
{机会来临}
VAR2K:=REF(LOW,1);
VAR3K:=SMA(ABS(LOW-VAR2K),13,1)/SMA(MAX(LOW-VAR2K,0),13,1)*100;
VAR4K:=EMA(IF(CLOSE*1.2,VAR3K*13,VAR3K/13),13);
VAR5K:=LLV(LOW,34);
VAR6K:=HHV(VAR4K,34);
VAR7K:=IF(LLV(LOW,55),1,0);
VAR8K:=EMA(IF(LOW<=VAR5K,(VAR4K+VAR6K*2)/2,0),3)/618*VAR7K;
VAR9K:=EMA(CLOSE,5);
VAR10K:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*(-10);
VAR11K:=EMA(IF(LOW<=VAR5K,(VAR4K+VAR6K*2)/2,0),3)/618*VAR7K*(-1);
VAR12K:=EMA(CLOSE,5)*(-1);
XL1:=MA(LOW,2)*0.96;
XL2:=MA(LOW,26)*0.85;
XL3:=REF(XL1,1)
VA:=(2*C+H+L)/4;
VB:=LLV(L,5);
VC:=HHV(H,5);
红线上穿买:EMA((VA-VB)/(VC-VB)*27,5)*4,COLOR0000D2;
红线下穿卖:EMA(红线上穿买,3),COLORFF9900;
散户:= EMA(((2*CLOSE+HIGH+LOW)/4-LLV(LOW,5))/(HHV(HIGH,4)-LLV(LOW,5))*100,4);
庄家:= EMA(0.667*REF(散户,1)+0.333*散户,2);
DRAWICON(CROSS(散户,庄家) AND 散户<30,80,1);
DRAWICON(CROSS(庄家,散户) AND 散户>70,80,2);
极品底:=((MA(C,5)-C)/C>0.04 AND (MA(C,10)-MA(C,5))/MA(C,5)>0.04);
DRAWICON(极品底,80,25);
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;
X:=LLV(J,2)=LLV(J,8);
DRAWICON(CROSS(J,REF(J+0.01,1)) AND X AND J<19,80,1);
QVAR1A:=((HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21)))*(100)-10;
QVAR1B:=((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21)))*(100);
QVAR1C:=SMA(QVAR1B,13,8);
QVAR1D:=SMA(QVAR1A,21,8);
机会来临:=SMA(QVAR1C,13,8);
AAS:=FILTER((COUNT((机会来临-QVAR1D<(-65)),3)=3),34);
DRAWICON(AAS,80,1);
DRAWTEXT(ISLASTBAR,80,'--机会来临');
{最佳买入选股}
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));
DRAWICON(最佳买入选股,50,1);
RSVA:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 50);
KA:=SMA(RSVA,3,1);
DA:=SMA(KA,3,1);
JA:=3*KA-2*DA;
XB:=LLV(JA,2)=LLV(JA,8);
最佳买入时机:= (CROSS(JA,3));
DRAWICON(最佳买入时机,50,25);
DRAWTEXT(ISLASTBAR,50,'--最佳买入');
{短线套利}
MA18:=MA(C,21);
加码价:=((C-REF(MA18,1))/18+MA18)*1.004;
{- }
短线套利:=(CROSS(C,加码价) AND 加码价>REF(加码价,1));
DRAWICON(短线套利,20,1);
{短炒公式}
VARO:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;
DRAWICON(VARO<-9 AND VARO> REF (VARO,1),20,26);
{DRAWICON(短底,20,26);}
DRAWTEXT(ISLASTBAR,20,'--短线套利');
{不求人}
{VAR1L:=(EMA(C,12)-EMA(C,26))*100+50;
VAR2L:=EMA(VAR1L,9);
VAR3L:=((HHV(H,21)-C)/(HHV(H,21)-LLV(L,21)))*100-10;
VAR4L:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
VAR5L:=SMA(VAR4L,13,8);
VAR6L:=SMA(VAR3L,21,8);
VAR7L:=MA(C,80)-MA(C,10)/7;
VAR8L:=EMA(C,5);
VAR9L:=MA((LLV(C,9))*1.1,14);
VAR10L:=2*VAR9L-VAR8L-C*0.1;
VAR11L:=IF(((VAR8L-VAR10L)*5>0),(POW((VAR8L-VAR10L)*5,2))/10,(-1*(POW((VAR8L-VAR10L)*(5),2)))/(10));
VAR12L:=IF((VAR11L>0),VAR11L-0,12);
VAR13L:=SMA(MAX(C-REF(C,2),0),7,1)/SMA(ABS(C-REF(C,2)),7,1)*100;
趋势:=CEILING(SMA(VAR5,13,8)),LINETHICK0.02;
看底:=(趋势-VAR6<-65);
顶峰:=(趋势-VAR6>85);
黄金区:=VAR13<8;}
{DRAWICON(黄金区,90,1);}
{STICKLINE(VAR13<8,88,93,5,0.2),COLOR51FFFF;
操盘线:=MA(3*SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1)-2*SMA(SMA((C- LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1),3,1),5),LINETHICK2,COLORBLUE;
DRAWICON(FILTER(趋势75 OR CROSS(趋势,操盘线)
AND 趋势60,5),90,2);
DRAWICON(FILTER(CROSS(趋势,VAR12)AND 趋势REF(C,1)
OR 趋势>REF(趋势,1)AND 趋势<35 AND C>REF(C,1),5),90,1);
DRAWTEXT(ISLASTBAR,90,'--不求人');}
{赌涨停}
MA5:=MA(C,5);
MA10:=MA(C,10);
MA30:=MA(C,30);
ZX:=(MA5+MA10)/2;
QSXS:=MA5>=MA30 AND MA30>REF(MA30,1);
GD:=ZX>=REF(ZX,1) AND REF(ZX,1)
YB:=C>REF((O-C)/2+C,2);
买:=CROSS(C,ZX) AND (GD OR YB) AND QSXS;
赌涨停:=买 AND MA5>REF(MA5,1);
DRAWICON(赌涨停,100,13);
{KDJ买点}
RSVV:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 50);
K5:=SMA(RSVV,3,1);
D5:=SMA(K5,3,1);
J5:=3*K5-2*D5;
J1:=REVERSE(J5);
AA:=REF(MA(C,1),10)>REF(MA(C,60),10);
KDJ买点:=CROSS(J5,J1) AND AA,;
DRAWICON(KDJ买点,100,1);
DRAWTEXT(ISLASTBAR,98,'--KDJ买,赌停');
{收银台}
QVAR2:=IF((HIGH+LOW<=REF(HIGH,1)+REF(LOW,1)),0,MAX(ABS(HIGH-REF(HIGH,1)),
ABS(LOW-REF(LOW,1))));
QVAR3:=IF((HIGH+LOW>=REF(HIGH,1)+REF(LOW,1)),0,MAX(ABS(HIGH-REF(HIGH,1)),
ABS(LOW-REF(LOW,1))));
QVAR4:=(SUM(QVAR2,13))/(SUM(QVAR2,13)+SUM(QVAR3,13));
QVAR5:=(SUM(QVAR3,13))/(SUM(QVAR3,13)+SUM(QVAR2,13));
QVAR9:=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));
QVARA:=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));
QVARB:=(QVAR9REF(VOL,1)) AND (CLOSE>REF(CLOSE,1));
{QVAR1A:=((HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21)))*(100)-10;
QVAR1B:=((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21)))*(100);
QVAR1C:=SMA(QVAR1B,13,8);
QVAR1D:=SMA(QVAR1A,21,8);}
生意上门:=SMA(QVAR1C,13,8);
收银台:=(生意上门-QVAR1D<-65);
DRAWICON(收银台,60,1);
AAS1:=FILTER((COUNT((生意上门-QVAR1D<(-65)),3)=3),34);
收银:=AAS1;
DRAWICON(收银,60,26);
QVAR1E:=(CLOSE+OPEN+HIGH+LOW)/(4);
AAA:=QVARB AND (COUNT(QVARB,1)=1) AND (生意上门<80);
VAR1Z:=(((EMA(CLOSE,5))/(EMA(EMA(CLOSE,9),16))<=0.85000002)
AND ((CLOSE)/(REF(CLOSE,1))>0.90499997) AND ((CLOSE)/(REF(CLOSE,1))<1.05)
AND (((VOL)/(CAPITAL))*(100)<5),50,0);
买卖顺意:=MA((((-100))*(HHV(HIGH,34)-CLOSE))/(HHV(HIGH,34)-LLV(LOW,34))+100,5);
VAR3Z:=(((-100))*(HHV(HIGH,50)-CLOSE))/(HHV(HIGH,50)-LLV(LOW,50))+100;
VAR4Z:=(((-100))*(HHV(HIGH,70)-CLOSE))/(HHV(HIGH,70)-LLV(LOW,70))+100;
VAR5Z:=(((CLOSE-MA(CLOSE,34))/(MA(CLOSE,34)))*(100)+10)*(5);
VAR6Z:=(((CLOSE-MA(CLOSE,50))/(MA(CLOSE,50)))*(100)+10)*(5);
VAR7Z:=(((CLOSE-MA(CLOSE,70))/(MA(CLOSE,70)))*(100)+10)*(5);
VAR8Z:=(买卖顺意+VAR3Z+VAR4Z+VAR5Z+VAR6Z+VAR7Z)/(6);
VAR21:=MA(CLOSE,80)-(MA(CLOSE,13))/(3);
VAR22:=MA((CLOSE-VAR21)/(VAR21),1);
VAR23:=(EMA(VAR22,12))*(0.69999998);
VAR24:=EMA(VAR22,3);
VAR25:=((LLV(VAR24-VAR23,12)>0));
VAR26:=FILTER((COUNT((VAR25<(-20)),3)=3),34);
顺意:=VAR26;
DRAWICON(顺意,60,1);
DRAWTEXT(ISLASTBAR,60,'--收银台');
{绝地反击}
VAR1P:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
VAR2P:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR3P:=(SMA(VAR2P,3,1)-18)*1.55;
VAR4P:=SMA(VAR3P,3,1);
VAR5P:=(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100))*100;
VAR6P:=SMA(VAR5P,10,1);
VAR7P:=(EMA(SMA(VAR6P,8,1),34)-25)*2.6;
VAR8P:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);
VAR9P:=POW(MA(LOW,5),2)+MA(LOW,5);
VARAP:=POW(MA(HIGH,5),2)+MA(HIGH,5);
VARBP:=((VAR8P-LLV(VAR9P,64))/(HHV(VARAP,64)-LLV(VAR9P,64))*150+65-10)/2;
VARCP:=SMA(VARBP,3,1)*1.5-46;
VARDP:=SMA(VARCP,3,1);
VAREP:=3*VARCP-2*VARDP;
VARFP:=(VAR1P+VAR2P+VAR5P)/3;
VAR10P:=((VAR3P+VAR3P+VAR6P+VARCP)/4-15)*1.67;
VAR11P:=((VAR4P+VAR4P+VAR7P+VARDP)/4-15)*1.67;
VAR12P:=((VAR1P+VAR5P*2+VARFP+VAR10P+VAR11P+VARBP+VARCP+VARDP+VAREP)/10-15)*1.67;
VAR13P:=(HHV(HIGH,5)-CLOSE)/(HHV(HIGH,5)-LLV(LOW,5))*(-1)+0.9;
VAR14P:=(HHV(HIGH,10)-CLOSE)/(HHV(HIGH,10)-LLV(LOW,10))*(-1)+0.92;
VAR15P:=(HHV(HIGH,15)-CLOSE)/(HHV(HIGH,15)-LLV(LOW,15))*(-1)+0.93;
VAR16P:=(HHV(HIGH,55)-CLOSE)/(HHV(HIGH,55)-LLV(LOW,55))*(-1)+0.94;
VAR17P:=(HHV(HIGH,89)-CLOSE)/(HHV(HIGH,89)-LLV(LOW,89))*(-1)+0.95;
VAR18P:=(HHV(HIGH,120)-CLOSE)/(HHV(HIGH,120)-LLV(LOW,120))*(-1)+0.91;
VAR19P:=(HHV(HIGH,180)-CLOSE)/(HHV(HIGH,180)-LLV(LOW,180))*(-1)+0.96;
VAR1AP:=((VAR13P*8+VAR14P*8+VAR15P*8+VAR16P+VAR17P+VAR18P+VAR19P)/28-0.1)*185;
VAR1B:=SMA(VAR1AP,3,1);
VAR1C:=(SMA(VAR1B,8,1)-8)*1.18;
VARA1:=(CLOSE-LLV(LOW,60.13547854))/(HHV(HIGH,60.13547854)-LLV(LOW,60))*80;
VARB1:=SMA(VARA1,7,1);
VARC1:=SMA(VARB1,5,1);
英雄:=IF(CROSS(VARBP,VARCP) AND VARBP<20,100,0);
VAR2N:=LLV(LOW,3)<=LLV(LOW,60);
VAR3N:=C>O AND (C/O>1.03 OR C>1.03*REF(C,1));
绝地反击:IF(VAR2N AND VAR3N,90,0)COLOR00FF00;
准备反击:=VAR2N;
反击:=VAR2N AND VAR3N;
DRAWICON(准备反击,90,1);
DRAWICON(反击,90,13);
DRAWICON(英雄,90,25);
DRAWTEXT(ISLASTBAR,90,'--绝地反击');