通達信月周共振三角主圖指標公式原始碼

指标公式分享發表於2024-03-10
{ 通達信月周共振三角主圖指標公式原始碼 }

DRAWTEXT_FIX(1,0.4,0,0,'當主圖出現共振訊號後1~10個交易日內,觀察副圖對應的幾日內,有無黃金坑,有則最佳'),COLORGRAY;
DRAWTEXT_FIX(1,0.4,0.1,0,'當隨後某日,5日線上穿10日線為第一買點;k線放量上穿60均線,則視為是大漲在即,為第二買點'),COLORGRAY;
DRAWTEXT_FIX(1,0.4,0.2,0,'共振訊號結合探底點、決策線洋紅色三角、量王紅色線上穿藍色線,可判斷底部'),COLORGRAY;
DRAWTEXT_FIX(ISLASTBAR,0.01,0.01,0,HYBLOCK),COLOR0000FF;
DRAWTEXT_FIX(ISLASTBAR,0.01,0.07,0,DYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.01,0.13,0,GNBLOCK),COLORFF00FF;
DRAWTEXT_FIX(ISLASTBAR,0.01,0.2,0,FGBLOCK),COLOR0080FF;
M5:=MA(C,5);
M10:=MA(C,10);
M30:=MA(C,30);
MM:=MIN(M5,M30);
MM2:=MIN(M10,M30);
HM:=MAX(M5,M30);
HM2:=MAX(M10,M30);
TC1:DRAWBAND(MM,RGB(255,0,0),MM2,0);
MA5:MA(C,5),COLORWHITE;
MA10:MA(C,10),COLORYELLOW;
MA30:MA(C,30),COLORGREEN;
MA60:MA(C,60),LINETHICK2,COLORFF00FF;{要求必須站上60日均線;經研究發現,在出現金銀三角附近,
60均線呈水平一段時間(大於5日)時,容易出現超級牛股啟動!此時,該60均線水平段與
回踩支撐位藍色線呈平行或重疊狀態最佳!}
MA120:MA(C,120),LINETHICK2,COLORCYAN,NODRAW;
三角:=MA(C,5)>MA(C,10) AND MA(C,10)>MA(C,30) AND crOSS(MA(C,10),MA(C,30));
DRAWTEXT(三角 AND MA(C,5)<ma(c,120),ma(c,30)-0.08,'銀三角'),colormagenta;
DRAWTEXT(三角 AND MA(C,30)>MA(C,120),MA(C,30)-0.08,'金三角'),COLORYELLOW;
支撐位:IF(BArslAST(三角),REF(M30,BARSLAST(三角)),DRAWNULL),LINETHICK2,COLORFF0000;
DRAWTEXT(ISLASTBAR,支撐位-0.08,'回踩支撐位'),COLOR0000FF;
DD11:=0.9;
DD22:=1.2;
{黃金柱}
M:=30;
N:=15;
AJ:=HHV(H,M)=H;
AJT:=BARSLAST(AJ);
AJ1:=LLV(L,N)=L;
AJ1T:=BARSLAST(AJ1);
TJ:=HHV(H,M)=H;
TJT:=BARSLAST(TJ);
TJ1T:=BARSLAST(AJ1);
{STICKLINE((TJT=0,H,TJ1T=0) AND AJ1 AND FILTERX(AJ1,TJT+1) ,REF(L,TJ1T)
,REF(H,TJT),0,0)COLORBLUE,LINETHICK3;}
OUT:=STICKLINE((TJT=0,H,TJ1T=0) AND AJ1 AND FILTERX(AJ1,TJT+1) ,REF(L,TJ1T)
,REF(H,TJT),0,0);
{kdj日金}
日K:="kdJ.K#DAY"(9,3,3);
日D:="KDJ.D#DAY"(9,3,3);
{macd日金}
日DIF:="MacD.DIF#DAY"(12,26,9);
日DEA:="MACD.DEA#DAY"(12,26,9);
{rsi日}
日RSI:="RSI.RSI1#DAY"(9);
{KDJ周金}
周K:="KDJ.K#WEEK"(9,3,3);
周D:="KDJ.D#WEEK"(9,3,3);
{MACD周金}
周DIF:="MACD.DIF#WEEK"(12,26,9);
周DEA:="MACD.DEA#WEEK"(12,26,9);
{RSI周}
周RSI:="RSI.RSI1#WEEK"(9);
{KDJ月金}
月K:="KDJ.K#MONTH"(9,3,3);
月D:="KDJ.D#MONTH"(9,3,3);
{MACD月金}
月DIF:="MACD.DIF#MONTH"(12,26,9);
月DEA:="MACD.DEA#MONTH"(12,26,9);
{RSI月}
月RSI:="RSI.RSI1#MONTH"(9);
X1:=日K>日D;
X2:=日DIF>日DEA;
X3:=日RSI>50;
X4:=周K>周D;
X5:=周DIF>周DEA;
X6:=周RSI>50;
X7:=月K>月D;
X8:=月DIF>月DEA;
X9:=月RSI>50;
黑馬初顯:=X1 AND X2 AND X3 AND X4 AND X5 AND X6 AND X7 AND X8 AND X9;
月RSI1:="RSI.RSI1#MONTH"(9);
A:=月RSI1>50;
月共振:=CROSS(A>REF(A,1),0.5);
周RSI1:="RSI.RSI1#WEEK"(9);
AAAA:=周RSI1>50;
周共振:=CROSS(AAAA>REF(AAAA,1),0.5);
周K1:="KDJ.K#WEEK"(9,3,3),COLORBLUE;
周D1:="KDJ.D#WEEK"(9,3,3),COLORBLUE;
AAAAAA:=周K1>周D1;
首周K:=CROSS(AAAAAA>REF(AAAAAA,1),0.5);
AK1:=IF(INBLOCK('創業板'),1,0);
{創業板}
流通市值:=FINANCE(40)/100000000;
AK2:=流通市值<=300 AND FINANCE(42)>10 AND C<=60;
{流通市值小於300億,上市天數大於10天,股價低於60元}
AK:={AK1 AND }AK2;
MMM1:=月共振 AND NOT(周共振) AND AK;
MMM2:=月共振 AND 周共振 AND AK;
MMM3:=MMM1 AND 首周K;
MMM4:=MMM2 AND 首周K;
DRAWICON(MMM1,L*0.98,24);
DRAWICON(MMM2,L*0.98,25);
DRAWBMP(MMM1,H*1.2,'Q1A');
DRAWBMP(MMM2,H*1.2,'15A');
DRAWICON(MMM1,L*0.92,18);
DRAWICON(MMM2,L*0.92,42);
DRAWICON(MMM3,L*0.87,1);
DRAWICON(MMM4,L*0.87,1);

相關文章