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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信分享一个主图指标锁喉枪主图指标公式


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

以下是通达信分享一个主图指标锁喉枪主图指标公式

B1:=MA(C,1);

B2:=SMA(SMA(SMA(B1,2,1),2,1),2,1);

SMA2:=MA(B2,3);

三枪买入:IF(LLV(MA(B2,8),3)<B2,LLV(MA(B2,8),3),B2);

IF(B2>SMA2,B2,DRAWNULL),COLORRED,LINETHICK4;

IF(B2<SMA2,B2,DRAWNULL),COLORGREEN,LINETHICK4;

三枪卖出:HHV(MA(B2,1),13),COLORYELLOW;

VAR1:=(2*CLOSE+HIGH+LOW)/4;

VAR2:=MA(VAR1,7);

VAR3:=VAR2-MA(VAR1,7/2)<0;

VAR4:=VAR2-MA(VAR1,7/2)>0;

VAR5:=BARSLAST(VAR3);

VAR6:=0-BARSLAST(VAR4);

VAR7:=IF(VAR3<=0,VAR5,VAR6);

STICKLINE(三枪卖出>B2 AND B2>SMA2,三枪卖出,B2,0,1),COLORLIBLUE;

STICKLINE(三枪卖出>SMA2 AND B2<SMA2,三枪卖出,SMA2,0,1),COLORBLUE;

VAR11:=(CLOSE*2+HIGH+LOW)/4;

VAR21:=EMA(VAR11,13)-EMA(VAR11,34);

VAR31:=EMA(VAR21,5);

STICKLINE((C>=O),OPEN,LOW,0,0),COLOR0726CA;

STICKLINE((C>=O),CLOSE,HIGH,0,0),COLOR0726CA;

STICKLINE((C<O),CLOSE,LOW,0,0),COLORDE9100;

STICKLINE((C<O),OPEN,HIGH,0,0),COLORDE9100;

STICKLINE((C<O),CLOSE,OPEN,4,0),COLORFF5B00;

STICKLINE((C<O),CLOSE,OPEN,3.4,0),COLORFF6C00;

STICKLINE((C<O),CLOSE,OPEN,2.8,0),COLORFF7B00;

STICKLINE((C<O),CLOSE,OPEN,2.2,0),COLORFF9C00;

STICKLINE((C<O),CLOSE,OPEN,1.6,0),COLORFFBE00;

STICKLINE((C<O),CLOSE,OPEN,1,0),COLORFFCC00;

STICKLINE((C<O),CLOSE,OPEN,0.3,0),COLORFFFF00;

STICKLINE((C>O),CLOSE,OPEN,4,0),COLOR070084;

STICKLINE((C>O),CLOSE,OPEN,3.4,0),COLOR0000A3;

STICKLINE((C>O),CLOSE,OPEN,2.8,0),COLOR0000B7;

STICKLINE((C>O),CLOSE,OPEN,2.2,0),COLOR0000CD;

STICKLINE((C>O),CLOSE,OPEN,1.6,0),COLOR0000E9;

STICKLINE((C>O),CLOSE,OPEN,1,0),COLOR0754E9;

STICKLINE((C>O),CLOSE,OPEN,0.5,0),COLOR076EF3;

STICKLINE((C>O),CLOSE,OPEN,0.2,0),COLOR077BF3;

VAR2A:=((CLOSE > REF(CLOSE,1)) AND (CLOSE > REF(CLOSE,2)));

VAR3A:=((REF(VAR2A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));

VAR4A:=((REF(VAR3A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));

VAR5A:=((REF(VAR4A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));

VAR6A:=((REF(VAR5A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));

VAR7A:=((REF(VAR6A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));

VAR8A:=((REF(VAR7A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));

VAR9A:=((REF(VAR8A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));

VARAA:=((REF(VAR9A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));

VARBA:=((REF(VARAA,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));

VARCA:=((REF(VARBA,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));

VARDA:=((REF(VARCA,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));

VAREAA:=((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,2)));

VARFA:=((REF(VAREAA,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));

VAR10A:=((REF(VARFA,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));

VAR11A:=((REF(VAR10A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));

VAR12A:=((REF(VAR11A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));

VAR13A:=((REF(VAR12A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));

VAR14A:=((REF(VAR13A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));

VAR15A:=((REF(VAR14A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));

VAR16A:=((REF(VAR15A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));

VAR17A:=((REF(VAR16A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));

VAR18A:=((REF(VAR17A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));

VAR19A:=((REF(VAR18A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));

VAR1A:=(REF((((((((((((VAREAA OR VARFA) OR VAR10A) OR VAR11A) OR VAR12A) OR

VAR13A) OR VAR14A) OR VAR15A) OR VAR16A) OR VAR17A) OR VAR18A) OR VAR19A),1) ANDVAR2A);

STICKLINE(VAR1A,O,O+(C-O)/3,4,0),COLOR1029FF;

STICKLINE(VAR1A,O,O+(C-O)/3,3.4,0),COLOR1040FF;

STICKLINE(VAR1A,O,O+(C-O)/3,2.8,0),COLOR1083FF;

STICKLINE(VAR1A,O,O+(C-O)/3,2.2,0),COLOR10ABFF;

STICKLINE(VAR1A,O,O+(C-O)/3,1.6,0),COLOR10D0FF;

STICKLINE(VAR1A,O,O+(C-O)/3,1,0),COLOR10FFFF;

STICKLINE(VAR1A,O,O+(C-O)/3,0.3,0),COLOR00FFFF;

AA:=(REF((((((((((((VAR2A OR VAR3A) OR VAR4A) OR VAR5A) OR VAR6A) OR VAR7A) OR

VAR8A) OR VAR9A)OR VARAA) OR VARBA) OR VARCA) OR VARDA),1) AND VAREAA);

STICKLINE(AA,O,O+(C-O)/3,4.3,0),COLOR009900;

STICKLINE(AA,O,O+(C-O)/3,3.2,0),COLOR00AA00;

STICKLINE(AA,O,O+(C-O)/3,2.4,0),COLOR00BB00;

STICKLINE(AA,O,O+(C-O)/3,1.7,0),COLOR00CC00;

STICKLINE(AA,O,O+(C-O)/3,1.1,0),COLOR00DD00;

STICKLINE(AA,O,O+(C-O)/3,0.5,0),COLOR00EE00;

STICKLINE(AA,O,O+(C-O)/3,0.2,0),COLOR00FF00;

A13:=EMA(CLOSE,55);

A14:=MA(CLOSE,75);

A15:=EMA(A14,3);

A16:=EMA(A15,3);

A17:=(HIGH + LOW) / 5;

A18:=(MA(A17,4)) - (MA(A17,34));

A19:=CROSS(A18,0);

A20:=CROSS(0,A18);

A21:=BARSLAST(A19);

A22:=BARSLAST(A20);

A23:=REF(A19,1);

A24:=REF(A20,1);

A25:=BARSLAST(A23);

A26:=BARSLAST(A24);

A27:=IF((A25 < A26),(REF((HHV(HIGH,2)),A25)),(REF((LLV(LOW,2)),A26)));

A28:=(((REF(CLOSE,1)) <= (REF(A27,1))) AND (CLOSE > A27)) AND (A21 < A22);

A29:=(((REF(CLOSE,1)) >= (REF(A27,1))) AND (CLOSE < A27)) AND (A22 < A21);

A30:=A28 AND ((COUNT(A28,A21)) = 1);

A31:=A29 AND ((COUNT(A29,A22)) = 1);

A32:=A30 AND ((REF(BARSLAST(A31),1)) < (REF(BARSLAST(A30),1)));

A33:=A31 AND ((REF(BARSLAST(A31),1)) > (REF(BARSLAST(A30),1)));

DRAWTEXT(A32,SMA2*0.99,'←锁喉'),COLORYELLOW;

AC:=AMOUNT/(VOL);

YY:=MA(AC,13);

LLL:=(C-YY)/YY*100;

MIDC := MA(CLOSE,22);

UPPERC:= MIDC + 2*STD(C,22);

LOWERC:= MIDC - 2*STD(C,22);

BBA:=(C-LOWERC)/(UPPERC-LOWERC);

LIFENGCYC:=(REF(LLL,1)<-15 AND REF(BBA,1)<0 AND LLL>REF(LLL,1));

STICKLINE(LIFENGCYC,LOW*0.93,LOW*0.95,6,0)COLORRED;

STICKLINE(LIFENGCYC>0,C,O,4,0),COLORRED;

STICKLINE(LIFENGCYC>0,C,O,3.4,0),COLOR1029FF;

STICKLINE(LIFENGCYC>0,C,O,2.8,0),COLOR1040FF;

STICKLINE(LIFENGCYC>0,C,O,2.2,0),COLOR1083FF;

STICKLINE(LIFENGCYC>0,C,O,1.6,0),COLOR10ABFF;

STICKLINE(LIFENGCYC>0,C,O,1,0),COLOR10D0FF;

STICKLINE(LIFENGCYC>0,C,O,0.3,0),COLOR10FFFF;

DRAWTEXT(LIFENGCYC>0,LOW*0.98,'


回复

举报

QQ|

GMT+8, 2024-11-18 06:28

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