通达信回踩就涨主图公式源码
通达信回踩就涨主图公式源码
{K线}
DRAWKLINE(H,O,L,C);
STICKLINE(C<O,H,L,0,0),COLORFF9900;
STICKLINE(C<O,O,C,3,1),COLORFF9900;
操盘线:=MA(C,4),NODRAW,COLORRED;
安全线:=MA(C,19),LINETHICK2,COLORYELLOW;
{DRAWTEXT(CROSS(安全线,操盘线),H*1.01,'←S 卖出'),COLOR00FF00;
DRAWTEXT(CROSS(操盘线,安全线),L*0.99,'←B 买入'),COLOR00FFFF;
DRAWICON(CROSS(操盘线,安全线),L*0.98,1);
DRAWICON(CROSS(安全线,操盘线),H*1,2);}
空:=EMA(CLOSE,5);
均衡:=EMA(空,0),COLORFFFFFF;
下趋势双线持币:=HHV(MA(HIGH,3),2),LINETHICK2,COLORGREEN;
上趋势单线持股:=LLV(MA(HIGH,3),1),LINETHICK2,COLORRED;
STICKLINE(CROSS(操盘线,安全线) AND (操盘线>安全线) AND
(CLOSE>安全线),OPEN,CLOSE,3,0),COLORYELLOW;
STICKLINE(CROSS(操盘线,安全线) AND (操盘线>安全线) AND
(CLOSE>安全线),H,L,0,0),COLORYELLOW;
VAR5:=FILTER(均衡>REF(均衡,1) AND 下趋势双线持币<REF(下趋势双线持币,1) AND CLOSE>REF(CLOSE,1),11);
IF(VAR5>=1,L*0.996,DRAWNULL),COLORMAGENTA,CIRCLEDOT;
{ DRAWTEXT(VAR5>=1,L,'金股回踩'),COLORMAGENTA;}
VAR1:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);
VAR2:=CROSS(VAR1,0.9);
VAR3:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);
VAR4:=CROSS(VAR3,0.9);
压力:= REF(HIGH,BARSLAST(VAR2)), POINTDOT,COLOREA91B5;
STICKLINE(CLOSE,REF(HIGH,BARSLAST(VAR2)),REF(HIGH,BARSLAST(VAR2)),2,1),COLOREA91B5,LINETHICK3;
支撑:= REF(LOW,BARSLAST(VAR4)), POINTDOT,COLOR00B4FF;
STICKLINE(CLOSE,REF(LOW,BARSLAST(VAR4)),REF(LOW,BARSLAST(VAR4)),2,1),COLOR00B4FF,LINETHICK3;
下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);
ARSV:=SMA(下档线,3,1);
AK:=SMA(ARSV,3,1);
AD:=((3 * ARSV) - (2 * AK));
AJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);
ARSV24:=SMA(AJ12,3,1);
AK24:=SMA(ARSV24,3,1);
{M5:MA(CLOSE,5)COLORWHITE;}
MA5:=MA(C,5);
{M13:MA(CLOSE,13),COLORFF00FF,LINETHICK2;
IF(M13<REF(M13,1),M13,DRAWNULL),COLORGREEN,LINETHICK1;}
MA20:=MA(C,20),COLORYELLOW;
BBI:='BBI'.BBI,COLORLIRED,LINETHICK1;
IF(BBI<REF(BBI,1),BBI,DRAWNULL),COLORCYAN,LINETHICK1;
趋势线: (EMA(CLOSE,14)+MA(CLOSE,28)+MA(CLOSE,56))/3,COLORRED,DOTLINE;
E5:EMA(CLOSE,55),COLORCYAN;
M12:MA(CLOSE,120)COLORLIGRAY;
M25:=MA(CLOSE,250);
QQ:=L<=LLV(L,30);
BB:=BARSLAST(QQ);
{出手:=DRAWLINE(QQ AND CURRBARSCOUNT<=120,CLOSE,ISLASTBAR,
REF(CLOSE,BB),1),COLORRED,DOTLINE,LINETHICK1;
DRAWTEXT(ISLASTBAR,出手,'就赢'),COLORMAGENTA;
就赢:=REFDATE(出手,DATE),COLORMAGENTA,DOTLINE;}
TY:=C;{www.gpxiazai.com}
HD:=FILTER(BACKSET(FILTER(REF(TY,10)=HHV(TY,2*10+1),10),10+1),10);
LD:=FILTER(BACKSET(FILTER(REF(TY,10)=LLV(TY,2*10+1),10),10+1),10);
A:=REF(C,BARSLAST(HD));
B:=REF(C,BARSLAST(LD));
T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
浪顶:IF(T1,A,A),COLORFF00FF,DOTLINE;
STICKLINE(T1,A,A,9,0),COLORFF00FF;
浪底:IF(T2,B,B),COLOR80FF00,DOTLINE;
XU:PEAK(C,IF(PERIOD<5,5,10),1)*0.999,COLORFFCC99,LINETHICK1;{箱顶}
XD:TROUGH(C,IF(PERIOD<5,5,10),1)*0.998,COLORFF99CC,LINETHICK1;{箱底}
XH:=(XU-XD)/XD*100,NODRAW,COLORYELLOW;
XDU:=IF(EMA(EMA(EMA(C,2),2),2)>REF(EMA(EMA(EMA(C,2),2),2),1),XD,XU);
XR:=(C-XDU)/XDU*100,COLORRED,NODRAW;
XTB:=XD!=REF(XD,2) && XD=REF(XD,1);
XTS:=XU!=REF(XU,2) && XU=REF(XU,1);
DRAWICON(XTB,MIN(XD,L)*0.991,1);
{DRAWTEXT(XTB,MIN(XD,L)*0.988,'起点!满仓'),COLOR0000DD;}
DRAWICON(XTS,MAX(XU,H)*1.004,2);
{DRAWTEXT(XTS,MIN(XU,H)*1.01,'跌点!清仓')COLOR00DD00;}
{上升段:DRAWLINE(XTB,MIN(LLV(L,1),XD),XTS,MAX(HHV(H,1),XU),0)
COLOR000099,LINETHICK2;{XTBL}
{下跌段:DRAWLINE(XTS,MAX(HHV(H,1),XU),XTB,MIN(LLV(L,1),XD),0)
COLOR009900,LINETHICK2;{XTSL};
ZDT:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDT>9.8,O,C,2,0),COLORYELLOW;
STICKLINE(ZDT<-9.8,O,C,2,0),COLOR00FF00;
涨停:=ZDT>9.8;
不破价:=REF(L,BARSLAST(涨停));
LS0:=BARSLAST(涨停);
LS11:=IF(1,LS0=1,涨停);
LS21:=IF(1,LLV(L,1)>REF(L,1),1);
涨停不破:=LS11 AND LS21;
STICKLINE(涨停不破,不破价-不破价*0.002,不破价,4,0),COLORRED;
DRAWTEXT(涨停不破,不破价-不破价*0.02,'1'),COLORGREEN;
LS12:=IF(2,LS0=2,涨停);
LS22:=IF(2,LLV(L,2)>REF(L,2),1);
涨停不破2:=LS12 AND LS22;
STICKLINE(涨停不破2,不破价-不破价*0.002,不破价,4,0),COLORRED;
DRAWTEXT(涨停不破2,不破价-不破价*0.02,'2'),COLORGREEN;
LS13:=IF(3,LS0=3,涨停);
LS23:=IF(3,LLV(L,3)>REF(L,3),1);
涨停不破3:=LS13 AND LS23;
STICKLINE(涨停不破3,不破价-不破价*0.002,不破价,4,0),COLORRED;
DRAWTEXT(涨停不破3,不破价-不破价*0.02,'3'),COLORGREEN;
LS14:=IF(4,LS0=4,涨停);
LS24:=IF(4,LLV(L,4)>REF(L,4),1);
涨停不破4:=LS14 AND LS24;
STICKLINE(涨停不破4,不破价-不破价*0.002,不破价,4,0),COLORRED;
DRAWTEXT(涨停不破4,不破价-不破价*0.02,'4'),COLORGREEN;
LS15:=IF(5,LS0=5,涨停);
LS25:=IF(5,LLV(L,5)>REF(L,5),1);
涨停不破5:=LS15 AND LS25;
- 上一篇公式:通达信出手必有斩获副图指标
- 下一篇公式:通达信搜索低点副图选股源吗帖图大智慧通用无未来