指标改写成预警公式!

[复制链接]
查看41 | 回复0 | 2022-7-24 06:49:14 | 显示全部楼层 |阅读模式

指标改写成预警公式!

第一个 颜色区分异动(副图 源码 贴图)
 

 


 {颜色区分异动}
分量:=CONST(LLV(V/CONST(HHV(V,250)),250)); 
百量:=CONST(HHV(V/CONST(HHV(V,250)),250))-分量;
基点量:=CONST(LLV(L,250));  
基量:=CONST(HHV(H,250))-基点量;
CC比量:=(V/CONST(HHV(V,250))-分量)/百量; 
个股:=(CC比量*基量+基点量);
阳量:STICKLINE(C>0,基点量,个股,2.3,0),COLORRED;
阴量:STICKLINE(C<O,基点量,个股,2.3,0),COLORCYAN;
出量:STICKLINE(V>=2*REF(V,1),基点量,个股,3.2,0),COLORGREEN;
进量:STICKLINE(V>=3*REF(V,1),基点量,个股,3.2,0),COLORBROWN;
买入:STICKLINE(C>EMA(C,13),H,L,0,0),COLORMAGENTA;
持有:STICKLINE(C>EMA(C,13),C,O,-1,1),COLORMAGENTA;
谨慎:STICKLINE(C=EMA(C,13),H,L,0,0),COLORWHITE;
观望:STICKLINE(C<EMA(C,13),H,L,0,0),COLORYELLOW;
转世:STICKLINE(C<EMA(C,13),O,C,-1,1),COLORYELLOW;
空仓:STICKLINE(C<EMA(C,20),H,L,0,0),COLORCYAN;
持币:STICKLINE(C<EMA(C,20),O,C,-1,1),COLORCYAN;
分:=CONST(LLV(INDEXL,250));  百:=CONST(HHV(INDEXH,250))-分;
点:=CONST(LLV(L,250));   基:=CONST(HHV(H,250))-点;
CC比:=(INDEXC-分)/百; 
HH比:=(INDEXH-分)/百;
LL比:=(INDEXL-分)/百;
OO比:=(INDEXO-分)/百;
CX:=CC比*基+点;
HX:=HH比*基+点;
LX:=LL比*基+点;
OX:=OO比*基+点;
大盘:DRAWKLINE(HX,OX,LX,CX);
 A00:=SUM(IF((CLOSE> REF(CLOSE,1.000)),VOL,IF((CLOSE<REF(CLOSE,1.000)),(0-VOL),0)),0);
 A01:=SUMBARS(VOL,CAPITAL);
 A02:=IF((CLOSE>LLV(CLOSE,A01)),1.000,(0-1.000))*IF((A00 >LLV(A00,A01)),1.000,(0-1.000));
 A03:=(COUNT((IF((A02=(0-1.000)),1.000,0)=1.000),8.000)>2.000);
 A04:=((CLOSE-DMA((((3.000 * HIGH + LOW)+OPEN)+2.000 * CLOSE)/7.000,VOL/SUM(AMOUNT,13.000)/
 AMOUNT/VOL/100.000/100.000))/DMA((((3.000*HIGH+LOW)+OPEN)+2.000*CLOSE)/7.000,VOL/SUM(AMOUNT,13.000)/
 AMOUNT/VOL/100.000/100.000)*100.000<(0-18.000));
 A05:=((CLOSE-MIN(REF(CLOSE,5.000)*0.865,REF(CLOSE,21.000)*0.772))/CLOSE<0.009);
 A06:=((A03 AND A04) AND A05);
 A07:=(((((OPEN < EMA(CLOSE,5.000)) AND (CLOSE=HIGH)) AND (CLOSE/OPEN>=1.05)) AND (VOL/
 CAPITAL>=0.019)) AND (VOL/CAPITAL<=0.200));
 A08:=(A07 AND (COUNT(A07,5.000)=1.000));
 A09:=((((((((((((MA(CLOSE, 3.000)>REF(MA(CLOSE,3.000),1.000)) AND (MA(CLOSE, 5.000)>
 REF(MA(CLOSE,5.000),1.000))) AND (MA(CLOSE,10.000)>REF(MA(CLOSE,10.000),1.000))) AND
 (VOL/240.000>REF(VOL,30.000)*1.200/240.000*1.500)) AND (CLOSE>LOW*1.059)) AND (CLOSE>
 REF(MA(CLOSE,3.000),1.000))) AND REF(CLOSE,1.000)) AND (MA(CLOSE,5.000)>REF(MA(CLOSE,
 5.000),1.000))) AND (MA(CLOSE,10.000)>REF(MA(CLOSE,10.000),1.000))) AND (MA(CLOSE,20.000)>
 REF(MA(CLOSE,20.000),1.000))) AND (MA(VOL,5.000)>REF(MA(VOL,5.000),1.000))) AND ((MA(CLOSE,5.000)-MA
 (CLOSE,10.000))<= 0.579));
 A0A:=FILTER(A09,5.000);
超级黑码:((A06 OR A07) AND A0A)COLORMAGENTA;
 DRAWTEXT(超级黑码,7,'←超级黑码'),COLORMAGENTA;
 ZF:=(H-L)/REF(C,1)*100;
 M3:=EMA(C,3);
 M5:=EMA(C,5);
 M10:=EMA(C,10);
 HSL:=V/CAPITAL*100;
 VX1:=C>M3 AND M3>M5 AND M5>M10 AND C>REF(C,1) AND M3>REF(M3,1)
 AND M5>REF(M5,1) AND M10>REF(M10,1) AND C/O>1.01 AND (H-C)/C<0.02;
 VX2:=V>REF(V,1)*1.3 AND HSL>2;
 VA:=ZF>10 AND VX1 AND VX2;
加仓买:=IF(VA,1,0);
 STICKLINE(加仓买,买入,H,0.1,0 ),COLORYELLOW;
 DRAWTEXT(加仓买,7,'加仓买'),COLORMAGENTA;
 LS:=C/REF(C,1)>1.048 AND C=H AND BETWEEN(FORCAST(V,4),0.2*FORCAST(V,12),2.1*FORCAST(V,12));
拉:=FILTER(LS,28)COLORYELLOW;
 DRAWTEXT(拉,13,'▲★拉升★'),COLORYELLOW;
升:IF(拉=1 AND V>1,13.7,0)COLORYELLOW,LINETHICK1;
陆:=MA(C,60),LINETHICK1,COLORGREEN;
牛熊:=MA(C,120),COLORBLUE;
牛气冲天:CROSS(陆,牛熊),COLORGREEN;
牛头:IF(牛气冲天=1 AND V>1,7.1393,0)COLORGREEN,LINETHICK1;
 DRAWTEXT(牛气冲天,陆,'牛气冲天'),COLORGREEN;

 

 


第二个 日周月MACD金叉

月DI:="MACD.DIF#MONTH"COLOR0080FF;
月DE:="MACD.DEA#MONTH",COLOR0080FF,LINETHICK2;
周DI:="MACD.DIF#WEEK"COLORRED;
周DE:="MACD.DEA#WEEK",COLORRED,LINETHICK2;
日DI:="MACD.DIF",COLORWHITE;
日DE:="MACD.DEA",COLORWHITE,LINETHICK2;
日金叉:IF(CROSS(日DI,日DE),20,0),COLORWHITE;
周金叉:IF(CROSS(周DI,周DE),40,0),COLORRED;
月金叉:IF(CROSS(月DI,月DE),60,0),COLOR0080FF;
 DRAWICON(周金叉 AND 日金叉,5,15);
 DRAWICON(周金叉 AND 月金叉,8,11);
 DRAWICON(日金叉 AND 月金叉,13,17);
 WW:=IF((日DI>日DE AND 周DI>周DE AND 月金叉) OR ( 周DI>周DE AND 月DI>月DE AND 日金叉)
OR (月DI>月DE AND 日DI>日DE AND 周金叉) OR (日金叉 AND 周金叉 AND 月金叉),100,0);
日周月金叉:WW,COLORF00FF0,LINETHICK2;

 

623300319.jpg

623300319.jpg


第三个 日周月KDJ指标
月K:="KDJ.K#MONTH"COLOR0080FF;
月D:="KDJ.D#MONTH",COLOR0080FF,LINETHICK2;
周K:="KDJ.K#WEEK"COLORRED;
周D:="KDJ.D#WEEK",COLORRED,LINETHICK2;
日K:="KD.K",COLORWHITE;
日D:="KD.D",COLORWHITE,LINETHICK2;
日金叉:IF(CROSS(日K,日D),20,0),COLORWHITE;
周金叉:IF(CROSS(周K,周D),40,0),COLORRED;
月金叉:IF(CROSS(月K,月D),60,0),COLOR0080FF;
 DRAWICON(周金叉 AND 日金叉,5,15);
 DRAWICON(周金叉 AND 月金叉,8,11);
 DRAWICON(日金叉 AND 月金叉,13,17);
 WW:=IF((日K>日D AND 周K>周D AND 月金叉) OR ( 周K>周D AND 月K>月D AND 日金叉)
OR(月K>月D AND 日K>日D AND 周金叉) OR (日金叉 AND 周金叉 AND 月金叉),100,0);
日周月金叉:WW;

623411381.jpg

623411381.jpg

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则