大智慧新发动机指标公式

[复制链接]
查看180 | 回复0 | 2021-8-21 13:54:11 | 显示全部楼层 |阅读模式

{背景颜色设定}
{DRAWGBKLAST(CLOSE>0,STRIP(RGB(55,75,55),RGB(10,10,20),0));}
DRAWRECTREL(0,10,200,1000,rgb(0,0,255)),layer0;
{能量线 {测能量动力,很像KDJ公式的J值}
{原神猴探月公式 将原神猴线改名能量线}
CS:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
YJD:=(EMA(CS,3)-50)*2;能量线:YJD,LINETHICK0;
中线:0,LINETHICK2,COLORYELLOW,LAYER1;
DRAWICON(cross(YJD,中线),0,7),ALIGN1;
{原 庄家克星的抄底逃顶公式 将山水线改名抛留线,去掉倒影线}
能量线1:=能量线>=0;
能量线2:=能量线<=0;
Var1:=(2*CLOSE+HIGH+LOW)/4;
Var2:=LLV(LOW,5);
Var3:=HHV(HIGH,4);
Var5:=(Var1-LLV(LOW,4))/(HHV(HIGH,4)-LLV(LOW,4))*100;
Var6:=SMA(Var5,2,1);
sK:EMA((Var1-Var2)/(Var3-Var2)*100,4),LINETHICK0,precis2;
sD:EMA(0.667*REF(sK,1)+0.333*sK,2),LINETHICK0,precis2;
sJ:2*sK-1*sD,LINETHICK0,precis2;
sKD差:sK-sD,colorred,LINETHICK0,precis2;
抛留线: SMA(Var6,2,1),COLOR889999,linethick0;
PARTLINE(抛留线,抛留线>REF(抛留线,1),RGB(255,0,0),抛留线<REF(抛留线,1),RGB(0,250,0)),linethick1;{红留,变绿一定卖}
金叉:if(CROSS(sK,sD),抛留线,0),colorffffff,LINETHICK2,layer1;{买入点}
{金叉:if(CROSS(sK,sD),30,0),COLORWHITE,POINTDOT,LINETHICK0;
STICKLINE(金叉,30,40,6,0),COLORffffff;
drawtext(金叉,35,'金叉'),ALIGN1,color6600FF,layer0;}
VERTLINE(CROSS(金叉,0.1),2),COLORffffff,layer7;
金叉天数:barslast(cross(sK,sD)),linethick0;{计算几日前金叉}
{能量线用柱表示}
{绿色 0线上 表示下跌}
STICKLINE(YJD<ref(YJD,1)and YJD>0,0,YJD,8,0 ),COLOr008800;
STICKLINE(YJD<ref(YJD,1)and YJD>0,0,YJD,7,0 ),COLOR009900;
STICKLINE(YJD<ref(YJD,1)and YJD>0,0,YJD,6,0 ),COLOR00aa00;
STICKLINE(YJD<ref(YJD,1)and YJD>0,0,YJD,5,0 ),COLOR00bb00;
STICKLINE(YJD<ref(YJD,1)and YJD>0,0,YJD,4,0 ),COLOR00cc00;
STICKLINE(YJD<ref(YJD,1)and YJD>0,0,YJD,3,0 ),COLOR00dd00;
STICKLINE(YJD<ref(YJD,1)and YJD>0,0,YJD,2,0 ),COLOR00ee00;
STICKLINE(YJD<ref(YJD,1)and YJD>0,0,YJD,1,0 ),COLOR00ff00;
{红色 0线上 表示上涨}
STICKLINE(YJD>=ref(YJD,1)and YJD>0,0,YJD,8,0 ),COLOR000088;
STICKLINE(YJD>=ref(YJD,1)and YJD>0,0,YJD,7,0 ),COLOR000099;
STICKLINE(YJD>=ref(YJD,1)and YJD>0,0,YJD,6,0 ),COLOR0000aa;
STICKLINE(YJD>=ref(YJD,1)and YJD>0,0,YJD,5,0 ),COLOR0000bb;
STICKLINE(YJD>=ref(YJD,1)and YJD>0,0,YJD,4,0 ),COLOR0000cc;
STICKLINE(YJD>=ref(YJD,1)and YJD>0,0,YJD,3,0 ),COLOR0000dd;
STICKLINE(YJD>=ref(YJD,1)and YJD>0,0,YJD,2,0 ),COLOR0000ee;
STICKLINE(YJD>=ref(YJD,1)and YJD>0,0,YJD,1,0 ),COLOR0000ff;
{黄色 0线下 表示上涨}
STICKLINE(YJD>ref(YJD,1)and YJD<0,0,YJD,8,0 ),COLOR338fdd;
STICKLINE(YJD>ref(YJD,1)and YJD<0,0,YJD,7,0 ),COLOR339fdd;
STICKLINE(YJD>ref(YJD,1)and YJD<0,0,YJD,6,0 ),COLOR33afdd;
STICKLINE(YJD>ref(YJD,1)and YJD<0,0,YJD,5,0 ),COLOR33bfdd;
STICKLINE(YJD>ref(YJD,1)and YJD<0,0,YJD,4,0 ),COLOR33cfdd;
STICKLINE(YJD>ref(YJD,1)and YJD<0,0,YJD,3,0 ),COLOR33dfdd;
STICKLINE(YJD>ref(YJD,1)and YJD<0,0,YJD,2,0 ),COLOR33efdd;
STICKLINE(YJD>ref(YJD,1)and YJD<0,0,YJD,1,0 ),COLOR33ffdd;
{蓝色 0线下 表示下跌}
STICKLINE(YJD<=ref(YJD,1)and YJD<0,0,YJD,8,0 ),COLORFF4400;
STICKLINE(YJD<=ref(YJD,1)and YJD<0,0,YJD,7,0 ),COLORFF6600;
STICKLINE(YJD<=ref(YJD,1)and YJD<0,0,YJD,6,0 ),COLORFF7700;
STICKLINE(YJD<=ref(YJD,1)and YJD<0,0,YJD,5,0 ),COLORFF8800;
STICKLINE(YJD<=ref(YJD,1)and YJD<0,0,YJD,4,0 ),COLORFF9900;
STICKLINE(YJD<=ref(YJD,1)and YJD<0,0,YJD,3,0 ),COLORFFaa00;
STICKLINE(YJD<=ref(YJD,1)and YJD<0,0,YJD,2,0 ),COLORFFbb00;
STICKLINE(YJD<=ref(YJD,1)and YJD<0,0,YJD,1,0 ),COLORFFcc00;
{当日及时行情}
DRAWTEXTREL(5,30,'■' ),COLORffffff,linethick1,layer0;
DRAWTEXTREL(5,50,' 金 叉:'+NUMTOSTRN(金叉,2)),COLORffffff,linethick1,layer0;
DRAWTEXTREL(5,190,'今 '),COLORgreen,linethick1,layer0;
DRAWTEXTREL(5,350,'日 能量线:'+NUMTOSTRN(YJD,2)),COLORffffff,linethick1,layer0;
DRAWTEXTREL(5,510,'行 '),COLORgreen,linethick1,layer0;
DRAWTEXTREL(5,670,'情 抛留线:'+NUMTOSTRN(抛留线,2)),COLORffffff,linethick1,layer0;
DRAWTEXTREL(5,830,'■ '),COLORgreen,linethick1,layer0;
JC0:=金叉 < 35 and 金叉 >0 and YJD > ref(yjd,1) and 抛留线 > ref(抛留线,1);
JC1:=金叉 < 35 and 金叉 >0 and (YJD < ref(yjd,1) OR 抛留线 < ref(抛留线,1));
JC2:=金叉 <= 55 and 金叉 > 35 and YJD > ref(yjd,1) and 抛留线 > ref(抛留线,1);
JC3:=金叉 <=55 and 金叉 > 35 and (YJD < ref(yjd,1) or 抛留线 < ref(抛留线,1));
JC4:=金叉 > 55;
IF BARSTATUS=2 AND JC0 THEN BEGIN
DRAWTEXTREL(25,190,' ● 低位好 能量抛留见红 买'),colorred,layer0;
END
ELSE
IF BARSTATUS=2 AND JC1 THEN BEGIN
DRAWTEXTREL(25,190,' ● 低位好 能量或抛留回跌 可考虑买'),colorred,layer0;
END
ELSE
IF BARSTATUS=2 AND JC2 THEN BEGIN
DRAWTEXTREL(25,190,' ● 中位可 能量抛留见红 买'),colorred,layer0;
END
ELSE
IF BARSTATUS=2 AND JC3 THEN BEGIN
DRAWTEXTREL(25,190,' ● 中位可 能量线见绿 观望'),coloryellow,layer0;
END
ELSE
IF BARSTATUS=2 AND JC4 THEN BEGIN
DRAWTEXTREL(25,190,' ● 高位可能有暴利也是陷阱!!'),coloryellow,layer0;
END;
DRAWTEXTABS(5,5,'股旁网 www.gupang.com'),linethick1,COLOR00EEff;
NJC1:=金叉 = 0 AND 金叉天数 <=1 and YJD > ref(yjd,1) and 抛留线 > ref(抛留线,1) and YJD <30;
NJC2:=金叉 = 0 AND 金叉天数 <=1 and YJD > ref(yjd,1) and 抛留线 > ref(抛留线,1) and YJD <60 and YJD >30;
NJC3:=金叉 = 0 AND 金叉天数 <=1 and YJD > ref(yjd,1) and 抛留线 > ref(抛留线,1) and YJD >60 ;
NJC4:=金叉 = 0 AND 金叉天数 <=1 and (YJD < ref(yjd,1) or 抛留线 < ref(抛留线,1)) ;
NJC5:=金叉 = 0 AND 金叉天数 =2 ;
NJC6:=金叉 = 0 AND 金叉天数 >2 and YJD > ref(yjd,1) and 抛留线 > ref(抛留线,1);
NJC7:=金叉 = 0 AND 金叉天数 >2 and (YJD < ref(yjd,1) or 抛留线 < ref(抛留线,1)) ;
NJC8:=金叉 = 0 AND 金叉天数 >2 and YJD < ref(yjd,1) and 抛留线 < ref(抛留线,1) ;
IF BARSTATUS=2 AND NJC1 THEN BEGIN
DRAWTEXTREL(25,30,' ● '+NUMTOSTRN(金叉天数,0)+'天前金叉'),colorred,layer0;
DRAWTEXTREL(25,190,' ● 低位可进场'),colorred,layer0;
END
ELSE
IF BARSTATUS=2 AND NJC2 THEN BEGIN
DRAWTEXTREL(25,30,' ● '+NUMTOSTRN(金叉天数,0)+'天前金叉'),colorred,layer0;
DRAWTEXTREL(25,190,' ● 中位可进场'),colorred,layer0;
END
ELSE
IF BARSTATUS=2 AND NJC3 THEN BEGIN
DRAWTEXTREL(25,30,' ● '+NUMTOSTRN(金叉天数,0)+'天前金叉'),coloryellow,layer0;
DRAWTEXTREL(25,190,' ● 高位小心 牛现 还是?'),coloryellow,layer0;
END
ELSE
IF BARSTATUS=2 AND NJC4 THEN BEGIN
DRAWTEXTREL(25,30,' ● '+NUMTOSTRN(金叉天数,0)+'天前金叉'),coloryellow,layer0;
DRAWTEXTREL(25,190,' ● 陷阱 还是?'),coloryellow,layer0;
END
ELSE
IF BARSTATUS=2 AND NJC5 THEN BEGIN
DRAWTEXTREL(25,30,' ● '+NUMTOSTRN(金叉天数,0)+'天前金叉'),coloryellow,layer0;
DRAWTEXTREL(25,190,' ● 今日没买 下次再来!'),coloryellow,layer0;
END
ELSE
IF BARSTATUS=2 AND NJC6 THEN BEGIN
DRAWTEXTREL(25,30,' ● '+NUMTOSTRN(金叉天数,0)+'天前金叉'),colorYELLOW,layer0;
DRAWTEXTREL(25,190,' ● 陷阱 还是?'),colorYELLOW,layer0;
END
ELSE
IF BARSTATUS=2 AND NJC7 THEN BEGIN
DRAWTEXTREL(25,30,' ● '+NUMTOSTRN(金叉天数,0)+'天前金叉'),colorgreen,layer0;
DRAWTEXTREL(25,190,' ● 喝茶去吧!'),colorgreen,layer0;
END
ELSE
IF BARSTATUS=2 AND NJC8 THEN BEGIN
DRAWTEXTREL(25,190,' ● 喝咖啡去了!'),colorgreen,layer0;
END;
NL0:=YJD > ref(yjd,1) and YJD >0 and YJD <70;
NL1:=YJD < ref(yjd,1) and YJD >0 and YJD <70;
NL2:=YJD > ref(yjd,1) and YJD <0 ;
NL3:=YJD < ref(yjd,1) and YJD <0 ;
NL4:=YJD >0 and YJD > ref(yjd,1) and YJD >70 ;
NL5:=YJD >0 and YJD < ref(yjd,1) and YJD >70 ;
IF BARSTATUS=2 AND NL0 THEN BEGIN
DRAWTEXTREL(25,350,' ● 进入买区'),colorred,layer0;
DRAWTEXTREL(25,510,' ● 见红 势好'),colorred,layer0;
END
ELSE
IF BARSTATUS=2 AND NL1 THEN BEGIN
DRAWTEXTREL(25,350,' ● 进入买区'),colorgreen,layer0;
DRAWTEXTREL(25,510,' ● 见绿 下车'),colorgreen,layer0;
END
ELSE
IF BARSTATUS=2 AND NL2 THEN BEGIN
DRAWTEXTREL(25,350,' ● 不在买区'),colorgreen,layer0;
DRAWTEXTREL(25,510,' ● 趋势上升'),colorred,layer0;
END
ELSE
IF BARSTATUS=2 AND NL3 THEN BEGIN
DRAWTEXTREL(25,350,' ● 不在买区'),colorgreen,layer0;
DRAWTEXTREL(25,510,' ● 喝茶吧!'),colorgreen,layer0;
END
ELSE
IF BARSTATUS=2 AND NL4 THEN BEGIN
DRAWTEXTREL(25,350,' ● 在买区'),colorgreen,layer0;
DRAWTEXTREL(25,510,' ● 超过70小心!'),coloryellow,layer0;
END
ELSE
IF BARSTATUS=2 AND NL5 THEN BEGIN
DRAWTEXTREL(25,350,' ● 在买区'),colorgreen,layer0;
DRAWTEXTREL(25,510,' ● 70下跌快逃!'),colorgreen,layer0;
END;
PL1:=抛留线 > ref(抛留线,1);
PL2:=抛留线 < ref(抛留线,1);
IF BARSTATUS=2 AND PL1 THEN BEGIN
DRAWTEXTREL(25,670,' ● 见红 势好'),colorred,layer0;
END
ELSE
IF BARSTATUS=2 AND PL2 THEN BEGIN
DRAWTEXTREL(25,670,' ● 见绿 走人'),colorgreen,layer0;
END;
PL3:=抛留线 > 65 and 抛留线 <70;
PL4:=抛留线 > 70;
IF BARSTATUS=2 AND PL3 THEN BEGIN
DRAWTEXTREL(25,830,' ● 超过65小心!'),coloryellow,layer0;
END
ELSE
IF BARSTATUS=2 AND PL4 THEN BEGIN
DRAWTEXTREL(25,830,' ● 超过70走人!'),colorgreen,layer0;
END;
顶线:80,COLORred,dotline,layer7;
强势:65,COLORffffff,dotline,precis2,layer7;
均线:-65,COLORred,dotline,precis2,layer7;
底线:-80,COLORgreen,dotline,layer7;

202108211250.jpg

202108211250.jpg

 

回复

使用道具 举报

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

本版积分规则