通达信分时五线谱完整版—分时主图公式
通达信分时五线谱完整版—分时主图公式
让你值得拥有,看盘靠谱,有底气!!喜欢的给与支持
点击下载通达信分时五线谱完整版—分时主图公式
HH:EMA(C,8);
H2:EMA(HH,20);
{STICKLINE(HH>H2,HH,H2,0.5,1),COLORRED;
STICKLINE(HH< H2,HH,H2,0.5,1),COLORGREEN;}
DRAWBAND(H2,RGB(0,180,50),HH,RGB(150,50,40));
GET:=ZIG(3,5),COLOR00FFFF,DOTLINE,LINETHICK1;
PL5:=ZIG(3,5);
EN1:=PL5>REF(PL5,1) AND REF(PL5,1)<=REF(PL5,2) AND REF(PL5,2)<=REF(PL5,3);
EX1:=PL5<REF(PL5,1) AND REF(PL5,1)>=REF(PL5,2) AND REF(PL5,2)>=REF(PL5,3);
PL10:=ZIG(3,10);
EN2:=PL10>REF(PL10,1) AND REF(PL10,1)<=REF(PL10,2) AND REF(PL10,2)<=REF(PL10,3);
EX2:=PL10<REF(PL10,1) AND REF(PL10,1)>=REF(PL10,2) AND REF(PL10,2)>=REF(PL10,3);
PL20:=ZIG(3,20);
EN3:=PL20>REF(PL20,1) AND REF(PL20,1)<=REF(PL20,2) AND REF(PL20,2)<=REF(PL20,3);
EX3:=PL20<REF(PL20,1) AND REF(PL20,1)>=REF(PL20,2) AND REF(PL20,2)>=REF(PL20,3);
走强1:=BARSLAST(PL5<REF(PL5,1));
走弱1:=BARSLAST(PL5>REF(PL5,1));
走强2:=BARSLAST(PL10<REF(PL10,1));
走弱2:=BARSLAST(PL10>REF(PL10,1));
走强3:=BARSLAST(PL20<REF(PL20,1));
走弱3:=BARSLAST(PL20>REF(PL20,1));
ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);
ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);
DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);
DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);
ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);
ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);
DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);
DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);
DRAWTEXT(EN2 AND DTJZ10=1,L,'买(2)'),COLORRED;
DRAWTEXT(EN3 AND ZTJZ10=1,L,'买1'),COLORMAGENTA;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H,'卖2'),COLORYELLOW;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L,'买2'),COLORLIRED;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,H,'卖1'),COLORYELLOW;
"引用.ZH#DAY",COLORYELLOW,LINETHICK4;
"引用.ZL#DAY",COLORGREEN;
现价1:=C;
均价:SUM(C*V,BARSCOUNT(C))/SUM(V,BARSCOUNT(C)),COLORCYAN;
DRAWICON(CROSS(现价1,引用.ZH#DAY),"引用.ZH#DAY",13);
RQ:=DATETODAY(DATE)-DATETODAY(REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT))+1;
JY:=BARSLAST((RQ-REF(RQ,1))!=WEEKDAY-REF(WEEKDAY,1) OR TOTALBARSCOUNT-CURRBARSCOUNT=0)+1;
MA1:=REF(C,JY);
MA2:=REF(MA1,JY);
MA3:=REF(MA2,JY);
MA4:=REF(MA3,JY);
MA5:=REF(MA4,JY);
MA6:=REF(MA5,JY);
MA7:=REF(MA6,JY);
MA8:=REF(MA7,JY);
MA9:=REF(MA8,JY);
CK:REFDATE((C+MA1+MA2+MA3+MA4+MA5+MA6+MA7+MA8+MA9)/10,DATE),COLORAC59FF,CIRCLEDOT;
DRAWTEXT(ISLASTBAR,CK,' 参考线'),COLOR0000FF;
DRAWTEXT(ISLASTBAR,引用.ZH#DAY-0.001,' 昨高'),COLOR0000FF;
DRAWTEXT(ISLASTBAR,引用.ZL#DAY+0.001,' 昨低'),COLOR00FF00;
DIF:=(EMA(CLOSE,13) - EMA(CLOSE,24));
DEA:=(EMA(DIF,6));
MACD:=5*(DIF-DEA);
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),引用.ZL#DAY,引用.ZL#DAY+MACD*2,1,0),COLORRED,LINETHICK1;
STICKLINE(MACD>=0 AND MACD< REF(MACD,1),引用.ZL#DAY,引用.ZL#DAY+MACD*2,1,0),COLORFF00FF,LINETHICK1;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),引用.ZL#DAY,引用.ZL#DAY+MACD*2,1,0),COLORBLUE,LINETHICK1;
STICKLINE(MACD<0 AND MACD< REF(MACD,1),引用.ZL#DAY,引用.ZL#DAY+MACD*2,1,0),COLORGREEN,LINETHICK1;
现价:C,LINETHICK2,COLORFFFF00;
{支撑}
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:L1+P1*7/8,COLOR00FFCC,POINTDOT;
支撑:L1+P1*0.5/8,COLORLICYAN,CIRCLEDOT;
DRAWTEXT(ISLASTBAR,支撑,' 支撑'),COLOR00FF00;
DRAWTEXT(ISLASTBAR,阻力,' 阻力'),COLORYELLOW;
DRAWICON(LONGCROSS(支撑,现价,2) AND (MACD>=0 OR CROSS(DIF,DEA)),支撑*1.001,1);
DRAWICON(LONGCROSS(现价,阻力,2),现价,2);
DRAWTEXT(CROSS(现价,CK) AND (MACD>=0 OR CROSS(DIF,DEA)),CK,'↑关注'),COLOR00FF00;
中:(支撑+阻力)/2,COLORFFFFFF,DOTLINE;
MR:=C<支撑 AND CROSS(C,REF(C,2));
STICKLINE(CROSS(现价,支撑),C,中,2,0),COLOR00CCCC;
STICKLINE(MR=1,支撑,中,2,0),COLOR00CCCC;
DRAWICON(MR=1 OR CROSS(现价,支撑),中,34);
STICKLINE(CROSS(支撑,现价),支撑,(支撑-中)/5+支撑,2,0),COLOR00CCCC;
MC:=C>阻力 AND CROSS(REF(C,2),C);
STICKLINE(CROSS(阻力,现价),C,中,2,0),COLOR8C8C00;
STICKLINE(MC=1,阻力,中,2,0),COLOR8C8C00;
DRAWICON(MC=1 OR CROSS(阻力,现价),中,35);
STICKLINE(CROSS(现价,阻力),阻力,阻力-(支撑-中)/5,2,0),COLOR8C8C00;
DRAWTEXT(ISLASTBAR,(支撑+阻力)/2,' 中'),COLORFFFFFF;
上涨家数:=CONST(IF(PERIOD=0 ,'FSKY2.上涨家数#DAY',DRAWNULL)),NODRAW;
下跌家数:=CONST(IF(PERIOD=0 ,'FSKY2.下跌家数#DAY',DRAWNULL)),NODRAW;
- 上一篇公式:通达信神奇买点卖点副图源码
- 下一篇公式:通达信机构减仓进场源码附图