{寻找买入点公式}
A01:=DYNAINFO(20);
A03:=BARSCOUNT(CLOSE);
A04:=(SMA((CLOSE /HHV(HIGH,120)),3,1) * 100);
A05:=IF((A03 >20),A04,0);
A06:=IF((LOW >A01),0,IF((HIGH < A01),1,(((A01 - LOW) + 0.009) / ((HIGH - LOW) + 0.009))));
A07:=DMA(A06,(VOL /CAPITAL)) * 60;
A09:=IF((((A07 >0) AND (A07 > REF(A07,1))) AND (A05 <= 88)),A07,0);
VAR1:=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);
VAR2:=EMA(VAR1,8);
VAR3:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
趋势:=EMA(VAR3,3)-10;
{(趋势>80);}
DRAWICON(CROSS(趋势,0),100,1);
{((A09 > 0 AND (趋势<20 OR 趋势>REF(趋势,1)AND 趋势<50))),COLORFFFF00;}
大庄建仓区:=0,LINETHICK0,COLORFFFF00;
VAR4:=(趋势-REF(趋势,1))/REF(趋势,1)*100;
STICKLINE(趋势<=13,0,20,5,0),COLORCC9900;
DRAWTEXT(FILTER(趋势<=13,15),30,'准备数钱\'),COLORCC9900;
STICKLINE(趋势<=13 AND VAR4>13,0,50,3,0),COLOR0099FF;
VAR5:=FILTER((趋势<=13 AND VAR4>13),10);
DRAWTEXT(VAR5,60,'明天买进\'),COLOR0099FF;
STICKLINE(趋势>=90 AND VAR4,0,30,3,0),COLORGRAY;
VAR6:=FILTER((趋势>=90 AND VAR4),10);
DRAWTEXT(VAR6,340,'清仓\'),COLORGRAY;
VAR7:=LLV(LOW,30);
VAR8:=HHV(HIGH,30);
VAR9:=EMA((CLOSE-VAR7)/(VAR8-VAR7)*4,4)*25;
STICKLINE(VAR9>90,100,105,10,2),COLORRED;
VAR10:=(VAR9-LLV(VAR9,4))/(HHV(VAR9,4)-LLV(VAR9,4))*100;
DRAWTEXT(IF(CROSS(VAR9,VAR10)AND VAR9>87,95,0),88,'小心\'),COLOR00FF00;
DRAWICON(CROSS(90,VAR9),95,9);
VAR11:=SMA(ABS(L-REF(L,1)),3,1)/SMA(MAX(L-REF(L,1),0),3,1)*100;
VAR12:=HHV(VAR11,30)*8;
五指山:EMA(IF(LOW<=VAR7 AND 趋势<40,(VAR11+VAR12),0),3)/618,COLORRED,LINETHICK2;
STICKLINE(五指山>0,0 ,五指山*1.2,8,0),COLORRED;
VAR13:=(MA(C,1)+MA(C,3)+MA(C,5)+MA(C,7)+MA(C,9))/5;
VAR14:=(MA(C,2)+MA(C,4)+MA(C,6)+MA(C,8)+MA(C,10))/5;
趋势线:趋势,COLORFF00FF;
{WWW.GUPANG.COM 股旁网_最新股票指标公式}
VAR16:=MAX(EMA(VAR13,2)-EMA(VAR14,5),0)*200;
VAR17:=EMA(VAR16,5);
分水岭:VAR17,STICK,COLORFF00FF;
STICKLINE(VAR17<REF(VAR17,1),0,VAR17,1,0),COLOR00FF00;
VAR18:=MA(趋势线,8);
{IF(CROSS(VAR2,VAR18)AND VAR2<15,50,0),COLORRED;}
DRAWTEXT(CROSS(趋势线,VAR2)AND趋势线>REF(趋势线,1)AND 趋势线<50,50,'全仓买进\'),COLORYELLOW;
{查看区域股票强弱公式}
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
BU:=CROSS(买线,卖线);
SEL:=CROSS(卖线,买线);
DRAWICON(BU,L-0.1,1);
DRAWICON(SEL,H+0.1,2);
STICKLINE(买线>=卖线,LOW,HIGH,0.0,1),COLORRED;
STICKLINE(买线>=卖线,CLOSE,OPEN,2,1),COLORRED;
STICKLINE(买线<卖线,LOW,HIGH,0.0,1),COLORGREEN;
STICKLINE(买线<卖线,CLOSE,OPEN,2,1),COLORGREEN;
散户:EMA(CLOSE,5),COLORWHITE;
操盘:MA(CLOSE,9),COLORCYAN,LINETHICK2;
界点:MA(CLOSE,20),COLORMAGENTA;
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE- LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
日:=150;昨前:=3;
高1:=REF(HHV(H,日),昨前);
低1:=REF(LLV(L,日),昨前);
H1:=高1-(高1-低1)*0.191;
H2:=高1-(高1-低1)*0.382;
H3:=高1-(高1-低1)*0.5;
H4:=高1-(高1-低1)*0.618;
H5:=高1-(高1-低1)*0.809;
顶:REFDATE(高1,DATE),COLORRED;
一0.809:REFDATE(H1,DATE),COLORYELLOW;
二0.618:REFDATE(H2,DATE),COLORMAGENTA;
三0.500:REFDATE(H3,DATE),COLORWHITE;
四0.382:REFDATE(H4,DATE),COLORGREEN;
五0.191:REFDATE(H5,DATE),COLORYELLOW;
低:REFDATE(低1,DATE),COLORRED;
{提示顶部和底部公式}
{精准峰谷线主图公式: 不懂设立参数的,就不要用了}
{设立参数:百分比(3,20,5), 右数峰序(2,20,2)}
{ZIG(3,5);}
{百分比:=5};
{右数峰序:=2;}
MA5:MA(C,5);{HTTP://U.178448.COM/SPACE.PHP?UID=30578}
MA10:MA(C,10);{WEN98编写}
MA20:MA(C,20);
波谷值: CONST(TROUGH(2,百分比,1)),NODRAW;{前M个ZIG转向波谷值}
波谷距离:= 1+CONST(TROUGHBARS(2,百分比,1)),NODRAW;{前M个ZIG转向波谷到当前距离}
{例如:TROUGH(2,5,2)表示%5最低价ZIG转向的前2个波谷到当前的周期数};
波峰值:= CONST(PEAK(1,百分比,右数峰序));
{例如:PEAK(1,5,1)表示%5最高价ZIG转向的上一个波峰的数值}
XG:= ABS(波峰值-波谷值)<=0.024 {AND BARSCOUNT(V)>60};
波峰距离:= 1+CONST(PEAKBARS(1,百分比,右数峰序)),NODRAW;
{PEAKBARS(K,N,M)表示之字转向ZIG(K,N)的前M个波峰到当前的周期数,M必须大于等于1}
距离:=CURRBARSCOUNT;
DRAWLINE(距离=波峰距离 AND XG,波谷值,距离=1,波谷值,1),COLORMAGENTA;
DRAWTEXT(距离=波谷距离 AND XG,L*0.98,' 峰谷线'),COLORYELLOW;
DRAWICON(距离=波峰距离,H*1.01,2);{波峰位置}
DRAWICON(距离=波谷距离,L*0.985,1);{波谷位置}
精准点:=(ABS(H-波谷值)<=0.024OR ABS(L-波谷值)<=0.024) {AND 距离<=120};
STICKLINE(精准点,波谷值,波谷值,3,1),COLORYELLOW;
{区域看股强弱公式}
STICKLINE( MA(CLOSE,60)>MA(CLOSE,120),MA(CLOSE,60),MA(CLOSE,120),8,0),COLOR000044;
STICKLINE(MA(CLOSE,60)<MA(CLOSE,120),MA(CLOSE,60),MA(CLOSE,120),8,0),COLOR004400;
DRAWKLINE(H,O,L,C);
MA1:MA(CLOSE,5);
MA2:MA(CLOSE,10);
MA3:MA(CLOSE,20);
MA4:MA(CLOSE,60),COLORMAGENTA;
MA5:MA(CLOSE,120),COLORGREEN;
MA6:=MA(CLOSE,250);
C2:=REF(C,1);
涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);
STICKLINE(涨停,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(涨停,H,L,0,0),COLORYELLOW;
跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);
STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;
STICKLINE(跌停,H,L,0,1),COLORGREEN;
DRAWICON(CROSS(MA1,MA2),MA1,1);
STICKLINE( C<MA4,H,L,0,0),COLOR777777;
STICKLINE( C<MA4,O,C,2.7,1),COLOR777777;
//当5日均线下穿10日均线时,只要此图形的子线有上传绿色线的趋势,则此股视为强势
{提示买入卖出,全仓进入}
A01:=DYNAINFO(20);
A03:=BARSCOUNT(CLOSE);
A04:=(SMA((CLOSE /HHV(HIGH,120)),3,1) * 100);
A05:=IF((A03 >20),A04,0);
A06:=IF((LOW >A01),0,IF((HIGH < A01),1,(((A01 - LOW) + 0.009) / ((HIGH - LOW) + 0.009))));
A07:=DMA(A06,(VOL /CAPITAL)) * 60;
A09:=IF((((A07 >0) AND (A07 > REF(A07,1))) AND (A05 <= 88)),A07,0);
VAR1:=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);
VAR2:=EMA(VAR1,8);
VAR3:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
趋势:=EMA(VAR3,3)-10;
{(趋势>80);}
DRAWICON(CROSS(趋势,0),100,1);
{((A09 > 0 AND (趋势<20 OR 趋势>REF(趋势,1)AND 趋势<50))),COLORFFFF00;}
大庄建仓区:=0,LINETHICK0,COLORFFFF00;
VAR4:=(趋势-REF(趋势,1))/REF(趋势,1)*100;
STICKLINE(趋势<=13,0,20,5,0),COLORCC9900;
DRAWTEXT(FILTER(趋势<=13,15),30,'准备数钱\'),COLORCC9900;
STICKLINE(趋势<=13 AND VAR4>13,0,50,3,0),COLOR0099FF;
VAR5:=FILTER((趋势<=13 AND VAR4>13),10);
DRAWTEXT(VAR5,60,'明天买进\'),COLOR0099FF;
STICKLINE(趋势>=90 AND VAR4,0,30,3,0),COLORGRAY;
VAR6:=FILTER((趋势>=90 AND VAR4),10);
DRAWTEXT(VAR6,340,'清仓\'),COLORGRAY;
VAR7:=LLV(LOW,30);
VAR8:=HHV(HIGH,30);
VAR9:=EMA((CLOSE-VAR7)/(VAR8-VAR7)*4,4)*25;
STICKLINE(VAR9>90,100,105,10,2),COLORRED;
VAR10:=(VAR9-LLV(VAR9,4))/(HHV(VAR9,4)-LLV(VAR9,4))*100;
DRAWTEXT(IF(CROSS(VAR9,VAR10)AND VAR9>87,95,0),88,'小心\'),COLOR00FF00;
DRAWICON(CROSS(90,VAR9),95,9);
VAR11:=SMA(ABS(L-REF(L,1)),3,1)/SMA(MAX(L-REF(L,1),0),3,1)*100;
VAR12:=HHV(VAR11,30)*8;
五指山:EMA(IF(LOW<=VAR7 AND 趋势<40,(VAR11+VAR12),0),3)/618,COLORRED,LINETHICK2;
STICKLINE(五指山>0,0 ,五指山*1.2,8,0),COLORRED;
VAR13:=(MA(C,1)+MA(C,3)+MA(C,5)+MA(C,7)+MA(C,9))/5;
VAR14:=(MA(C,2)+MA(C,4)+MA(C,6)+MA(C,8)+MA(C,10))/5;
趋势线:趋势,COLORFF00FF;
VAR16:=MAX(EMA(VAR13,2)-EMA(VAR14,5),0)*200;
VAR17:=EMA(VAR16,5);
分水岭:VAR17,STICK,COLORFF00FF;
STICKLINE(VAR17<REF(VAR17,1),0,VAR17,1,0),COLOR00FF00;
VAR18:=MA(趋势线,8);
{IF(CROSS(VAR2,VAR18)AND VAR2<15,50,0),COLORRED;}
DRAWTEXT(CROSS(趋势线,VAR2)AND趋势线>REF(趋势线,1)AND 趋势线<50,50,'全仓买进\'),COLORYELLOW;
{动态底部:提示主力吸盘,根据主力吸盘情况,寻找切入点}
VAR22:=REF(LOW,1);
VAR23:=((SMA(ABS((LOW- VAR22)),3,1) / SMA(MAX((LOW
- VAR22),0),3,1)) *100);
VAR24:=EMA(IF((CLOSE* 1.2),(VAR23 * 10),(VAR23 /10)),3);
VAR25:=LLV(LOW,38);
VAR26:=HHV(VAR24,38);
VAR27:=IF(LLV(LOW,90),1,0);
VAR28:=((EMA(IF((LOW<=VAR25),((VAR24 + (VAR26 * 2))/ 2),0),3)/618)*VAR27);
主力秘密筹码:STICKLINE(VAR28,0,VAR28,6,1),COLORRED;
动态底部:EMA(IF(L<=LLV(L,30),SMA(ABS(L-REF(L,1)),30,1)/SMA(MAX(L-REF(L,1),0),30,1),0),3)*10,STICK,COLORYELLOW,LINETHICK2;
{MACD背离}
DIFF :EMA(CLOSE,12) - EMA(CLOSE,26);
DEA : EMA(DIFF,9);
MACD : 2*(DIFF-DEA),COLORSTICK;
JC := DEA-DIFF;
绿柱面积:=IF(MACD<0,SUM(MACD,BARSLAST(JC<0)),0);
红柱面积:=IF(MACD>0,SUM(MACD,BARSLAST(JC>0)),0);
本次最低价:=LLV(L,BARSLAST(JC<0));
本次最高价:=HHV(H,BARSLAST(JC>0));
X1:=IF(MACD<0,BARSLAST(CROSS(DIFF,DEA)),0);
前次绿柱面积:=REF(绿柱面积,X1+1);
前次最低价:=REF(本次最低价,X1+1);
Y1:=IF((绿柱面积<0 AND ABS(绿柱面积)<ABS(前次绿柱面积)
AND 本次最低价<前次最低价 ),1,0);
RS1:= MACD<0 ANDREF(MACD,1)<0 AND C<前次最低价
AND ABS(绿柱面积)<ABS(前次绿柱面积) ANDABS(MACD)<ABS(REF(MACD,1));
底背驰:= IF (CROSS(DIFF,DEA),REF(Y1,1),0);
DRAWTEXT(底背驰,-0.01,'底背'),COLOR00FFFF;
STICKLINE(底背驰,0,-0.01,4,0),COLOR0000FF;
DRAWICON(底背驰,0,23),COLORYELLOW;
DRAWBAND(DIFF,RGB(200,50,55),DEA,RGB(50,100,10));
遵:IF(DIFF>=DEA,DIFF,DRAWNULL),COLORRED;
守:IF(DEA>=DIFF,DEA,DRAWNULL),COLORFF9900;
纪:IF(DIFF>=DEA,DEA,DRAWNULL),COLOR00FFFF;
律:IF(DEA>=DIFF,DIFF,DRAWNULL),COLOR00FF00;
X2:=IF(MACD>0,BARSLAST(CROSS(DEA,DIFF)),0);
前次红柱面积:=REF(红柱面积,X2+1);
前次最高价:=REF(本次最高价,X2+1);
Y2:=IF((红柱面积>0 AND 红柱面积<前次红柱面积 AND 本次最高价>前次最高价),1,0);
RS2:= MACD>0 ANDREF(MACD,1)>0 AND C>前次最高价 AND ABS(红柱面积)<ABS(前次红柱面积) AND ABS(MACD)<ABS(REF(MACD,1));
顶背驰:= IF (CROSS(DEA,DIFF),REF(Y2,1),0);
DRAWICON(顶背驰,0,19),COLOR00FF00;
STICKLINE(顶背驰,0,0.01,4,0),COLOR00FF00;
DRAWTEXT(顶背驰,0.01,'顶背'),COLORFF0000;
买:IFF(底背驰,0.1,0),COLOR0000FF;
卖:IFF(顶背驰,0.1,0),COLOR00FF00;
{选强势股 SJXXG四均线选股}
MA3:=MA(C,3);
MA5:=MA(C,5);
MA10:=MA(C,10);
MA20:=MA(C,20);
V0:=MA(C,3)>REF(MA(C,3),1)AND MA(C,5)>REF(MA(C,5),1) AND C>MA(C,3)
ANDMA(C,3)>MA(C,5) ; {均线C,MA3,MA5多头排列并向上;}
角度MA3:=ATAN((MA3/REF(MA3,1)-1)*100)*180/3.1416;
角度MA5:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416;
角度MA10:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;
角度MA20:=ATAN((MA20/REF(MA20,1)-1)*100)*180/3.1416;
选股MA20:IF(角度MA3>45AND 角度MA5>45 AND 角度MA10>60AND 角度MA20>45 ANDMA(C,250)>REF(MA(C,250),1),
1,0),COLOR00FF00;
{设计思路:
1.3日均线角度大于45度;
2:5日均线角度大于45度;
3:10日均线角度大于60度;
4.20日均线角度大于45度;
5.MA250向上;};
{寻找买入卖出片段}
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
BU:=CROSS(买线,卖线);
SEL:=CROSS(卖线,买线);
DRAWICON(BU,L-0.1,1);
DRAWICON(SEL,H+0.1,2);
STICKLINE(买线>=卖线,LOW,HIGH,0.0,1),COLORRED;
STICKLINE(买线>=卖线,CLOSE,OPEN,2,1),COLORRED;
STICKLINE(买线<卖线,LOW,HIGH,0.0,1),COLORGREEN;
STICKLINE(买线<卖线,CLOSE,OPEN,2,1),COLORGREEN;
散户:EMA(CLOSE,5),COLORWHITE;
操盘:MA(CLOSE,9),COLORCYAN,LINETHICK2;
界点:MA(CLOSE,20),COLORMAGENTA;
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE- LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
日:=150;昨前:=3;
高1:=REF(HHV(H,日),昨前);
低1:=REF(LLV(L,日),昨前);
H1:=高1-(高1-低1)*0.191;
H2:=高1-(高1-低1)*0.382;
H3:=高1-(高1-低1)*0.5;
H4:=高1-(高1-低1)*0.618;
H5:=高1-(高1-低1)*0.809;
顶:REFDATE(高1,DATE),COLORRED;
一0.809:REFDATE(H1,DATE),COLORYELLOW;
二0.618:REFDATE(H2,DATE),COLORMAGENTA;
三0.500:REFDATE(H3,DATE),COLORWHITE;
四0.382:REFDATE(H4,DATE),COLORGREEN;
五0.191:REFDATE(H5,DATE),COLORYELLOW;
低:REFDATE(低1,DATE),COLORRED;