股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信生命线支撑公式


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2023-10-9 14:27:02

以下是通达信生命线支撑公式

通达信生命线支撑公式

源码

VAR4:=100*(CLOSE-LLV(HIGH,240))/LLV(HIGH,240);

VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;

VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;

VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;

VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;

VAR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);

VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);

VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);

VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);

VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);

VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);

VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);

VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);

VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);

VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);

顶:BBI+3*STD(BBI,13),COLORFFFF00,LINETHICK1;

底:BBI-3*STD(BBI,13),COLORFFFF00,LINETHICK1;

DRAWBAND(BBI,RGB(100,50,50),顶,RGB(100,50,50));

DRAWBAND(BBI,RGB(0,60,100),底,RGB(0,60,100));

生命线:EMA(((SLOPE(CLOSE,22) * 23) + CLOSE),50),COLORYELLOW,LINETHICK2;

IF(C<生命线,生命线,DRAWNULL),COLORGREEN,LINETHICK3;

STICKLINE(C>O ,H,L,0,0),COLORRED;

STICKLINE(C>O ,O,C,3,1),COLORRED;

STICKLINE(C<=O ,H,L,0,0),COLORCYAN;

STICKLINE(C<=O ,O,C,3,1),COLORCYAN;

MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;

牛线:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLORRED;

马线:MA(牛线,6),COLORGREEN;

五日线:MA(CLOSE,5),POINTDOT,COLORLIBLUE;

水平面:MA(CLOSE,60),POINTDOT,COLORYELLOW;

HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLAY:=0;

AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);

QY:=BACKSET(AA,HIGHN+1);

CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);

DRAWICON(CC,H*1.02,2);

DDD:=BARSLAST(CC);

GDTS:=IF(CC,CURRBARSCOUNT,0);

DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}

DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);

DINGBU1:=REF(DINGBU,DDD+1);

GDCS1:=CONST(DINGBUTS);

DINGBUTS1:=REF(DINGBUTS,DDD+1);

GDCS2:=CONST(DINGBUTS1);

DINGBU2:=REF(DINGBU1,DDD+1);

MM:=IF(CURRBARSCOUNT>GDCS2,0,1);

买1:=VAR10;

买2:=(VAR11+VAR13+VAR15+VAR17);

卖1:=(VAR12+VAR14+VAR16+VAR18);

DRAWTEXT(买1>0 OR 买2>0,LOW*0.97,'买入'),COLORRED;

买入:IF(买1>0 OR 买2>0,LOW*0.97,DRAWNULL),CROSSDOT,LINETHICK3,COLORRED;

DRAWTEXT(卖1>0,HIGH*1.02,'卖出'),COLORGREEN;

卖出:IF(卖1>0,HIGH*1.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;





回复

举报

QQ|

GMT+8, 2024-11-19 04:31

快速回复 返回顶部 返回列表