通达信【梨花剑】主图指标 斩杀妖股真简单 用法详解 源码

HGWT1:=MA(C,1);
HGWT2:=SMA(SMA(SMA(HGWT1,2,1),2,1),2,1);
HGWT3:=MA(HGWT2,3);
HGWT4:=(2*CLOSE+HIGH+LOW)/4;
HGWT5:=MA(HGWT4,7);
HGWT6:=HGWT5-MA(HGWT4,7/2)<0;
HGWT7:=HGWT5-MA(HGWT4,7/2)>0;
HGWT8:=BARSLAST(HGWT6);
HGWT9:=0-BARSLAST(HGWT7);
HGWT10:=IF(HGWT6<=0,HGWT8,HGWT9);
HGWT11:=(CLOSE*2+HIGH+LOW)/4;
HGWT12:=EMA(HGWT11,13)-EMA(HGWT11,34);
HGWT13:=((CLOSE>REF(CLOSE,1)) AND (CLOSE>REF(CLOSE,2)));
HGWT14:=((REF(HGWT13,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT15:=((REF(HGWT14,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT16:=((REF(HGWT15,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT17:=((REF(HGWT16,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT18:=((REF(HGWT17,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT19:=((REF(HGWT18,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT20:=((REF(HGWT19,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT21:=((REF(HGWT20,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT22:=((REF(HGWT21,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT23:=((REF(HGWT22,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT24:=((REF(HGWT23,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT25:=((CLOSE<REF(CLOSE,1)) AND (CLOSE<REF(CLOSE,2)));
HGWT26:=((REF(HGWT25,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT27:=((REF(HGWT26,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT28:=((REF(HGWT27,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT29:=((REF(HGWT28,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT30:=((REF(HGWT29,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT31:=((REF(HGWT30,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT32:=((REF(HGWT31,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT33:=((REF(HGWT32,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT34:=((REF(HGWT33,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT35:=((REF(HGWT34,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT36:=((REF(HGWT35,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT37:=(REF((((((((((((HGWT25 OR HGWT26) OR HGWT27) OR HGWT28) OR HGWT29) OR HGWT30) OR HGWT31) OR HGWT32) OR HGWT33) OR HGWT34) OR HGWT35) OR HGWT36),1) AND HGWT13);
HGWT38:=(REF((((((((((((HGWT13 OR HGWT14) OR HGWT15) OR HGWT16) OR HGWT17) OR HGWT18) OR HGWT19) OR HGWT20)OR HGWT21) OR HGWT22) OR HGWT23) OR HGWT24),1) AND HGWT25);
HGWT39:=MA(CLOSE,75);
HGWT40:=EMA(HGWT39,3);
HGWT41:=(HIGH+LOW)/5;
HGWT42:=(MA(HGWT41,4))-(MA(HGWT41,34));
HGWT43:=CROSS(HGWT42,0);
HGWT44:=CROSS(0,HGWT42);
HGWT45:=BARSLAST(HGWT43);
HGWT46:=BARSLAST(HGWT44);
HGWT47:=REF(HGWT43,1);
HGWT48:=REF(HGWT44,1);
HGWT49:=BARSLAST(HGWT47);
HGWT50:=BARSLAST(HGWT48);
HGWT51:=IF((HGWT49<HGWT50),(REF((HHV(HIGH,2)),HGWT49)),(REF((LLV(LOW,2)),HGWT50)));
HGWT52:=(((REF(CLOSE,1))<=(REF(HGWT51,1))) AND (CLOSE>HGWT51)) AND (HGWT45<HGWT46);
HGWT53:=(((REF(CLOSE,1))>=(REF(HGWT51,1))) AND (CLOSE<HGWT51)) AND (HGWT46<HGWT45);
HGWT54:=HGWT52 AND ((COUNT(HGWT52,HGWT45))=1);
HGWT55:=HGWT53 AND ((COUNT(HGWT53,HGWT46))=1);
HGWT56:=HGWT54 AND ((REF(BARSLAST(HGWT55),1))<(REF(BARSLAST(HGWT54),1)));
HGWT58:=AMOUNT/(VOL);
HGWT59:=MA(HGWT58,13);
HGWT60:=(C-HGWT59)/HGWT59*100;
HGWT61:=MA(CLOSE,22);
HGWT62:=HGWT61+2*STD(C,22);
HGWT63:=HGWT61-2*STD(C,22);
HGWT68:=(C-HGWT63)/(HGWT62-HGWT63);
HGWT69:=(REF(HGWT60,1)<-15 AND REF(HGWT68,1)<0 AND HGWT60>REF(HGWT60,1));
梨花剑买入:IF(LLV(MA(HGWT2,8),3)<HGWT2,LLV(MA(HGWT2,8),3),HGWT2),LINETHICK2;
梨花剑卖出:HHV(MA(HGWT2,1),13),COLORYELLOW,LINETHICK2;
IF(HGWT2>HGWT3,HGWT2,DRAWNULL),COLORRED,LINETHICK4;
IF(HGWT2<HGWT3,HGWT2,DRAWNULL),COLORGREEN,LINETHICK4;
STICKLINE(梨花剑卖出>HGWT2 AND HGWT2>HGWT3,梨花剑卖出,HGWT2,0,1),COLORLIBLUE;
STICKLINE(梨花剑卖出>HGWT3 AND HGWT2<HGWT3,梨花剑卖出,HGWT3,0,1),COLORBLUE;
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;
STICKLINE(HGWT37,O,O+(C-O)/3,4,0),COLOR1029FF;
STICKLINE(HGWT37,O,O+(C-O)/3,3.4,0),COLOR1040FF;
STICKLINE(HGWT37,O,O+(C-O)/3,2.8,0),COLOR1083FF;
STICKLINE(HGWT37,O,O+(C-O)/3,2.2,0),COLOR10ABFF;
STICKLINE(HGWT37,O,O+(C-O)/3,1.6,0),COLOR10D0FF;
STICKLINE(HGWT37,O,O+(C-O)/3,1,0),COLOR10FFFF;
STICKLINE(HGWT37,O,O+(C-O)/3,0.3,0),COLOR00FFFF;
STICKLINE(HGWT38,O,O+(C-O)/3,4.3,0),COLOR009900;
STICKLINE(HGWT38,O,O+(C-O)/3,3.2,0),COLOR00AA00;
STICKLINE(HGWT38,O,O+(C-O)/3,2.4,0),COLOR00BB00;
STICKLINE(HGWT38,O,O+(C-O)/3,1.7,0),COLOR00CC00;
STICKLINE(HGWT38,O,O+(C-O)/3,1.1,0),COLOR00DD00;
STICKLINE(HGWT38,O,O+(C-O)/3,0.5,0),COLOR00EE00;
STICKLINE(HGWT38,O,O+(C-O)/3,0.2,0),COLOR00FF00;
DRAWTEXT(HGWT56,HGWT3*0.99,'←梨花剑'),COLORYELLOW;
STICKLINE(HGWT69,LOW*0.93,LOW*0.95,6,0)COLORRED;
STICKLINE(HGWT69>0,C,O,4,0),COLORRED;
STICKLINE(HGWT69>0,C,O,3.4,0),COLOR1029FF;
STICKLINE(HGWT69>0,C,O,2.8,0),COLOR1040FF;
STICKLINE(HGWT69>0,C,O,2.2,0),COLOR1083FF;
STICKLINE(HGWT69>0,C,O,1.6,0),COLOR10ABFF;
STICKLINE(HGWT69>0,C,O,1,0),COLOR10D0FF;
STICKLINE(HGWT69>0,C,O,0.3,0),COLOR10FFFF;
DRAWTEXT(HGWT69>0,LOW*0.98,'$'),COLORFF00FF;
DRAWTEXT(HGWT69>0,LOW*0.92,'探头'),COLORFF00FF;



来函数检测结果如下:
该公式没有未来函数


解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

HGWT1赋值:C的1日简单移动平均
HGWT1的2日[1日权重]移动平均
HGWT3赋值:HGWT2的3日简单移动平均
HGWT4赋值:(2*收盘价+最高价+最低价)/4
HGWT5赋值:HGWT4的7日简单移动平均
HGWT6赋值:HGWT5-HGWT4的7/2日简单移动平均<0
HGWT7赋值:HGWT5-HGWT4的7/2日简单移动平均>0
HGWT8赋值:上次HGWT6距今天数
HGWT9赋值:0-上次HGWT7距今天数
如果HGWT6<=0返回HGWT8否则返回HGWT9
HGWT11:=(收盘价*2+最高价+最低价)/4
HGWT12:=HGWT11的13日指数移动平均-HGWT11的34日指数移动平均
HGWT13:=((收盘价>1日前的收盘价) AND (收盘价>2日前的收盘价))
HGWT14:=((1日前的HGWT13 AND (收盘价<=1日前的收盘价)) AND (收盘价>=2日前的收盘价))
HGWT15:=((1日前的HGWT14 AND (收盘价>=1日前的收盘价)) AND (收盘价<=2日前的收盘价))
HGWT16:=((1日前的HGWT15 AND (收盘价<=1日前的收盘价)) AND (收盘价>=2日前的收盘价))
HGWT17:=((1日前的HGWT16 AND (收盘价>=1日前的收盘价)) AND (收盘价<=2日前的收盘价))
HGWT18:=((1日前的HGWT17 AND (收盘价<=1日前的收盘价)) AND (收盘价>=2日前的收盘价))
HGWT19:=((1日前的HGWT18 AND (收盘价>=1日前的收盘价)) AND (收盘价<=2日前的收盘价))
HGWT20:=((1日前的HGWT19 AND (收盘价<=1日前的收盘价)) AND (收盘价>=2日前的收盘价))
HGWT21:=((1日前的HGWT20 AND (收盘价>=1日前的收盘价)) AND (收盘价<=2日前的收盘价))
HGWT22:=((1日前的HGWT21 AND (收盘价<=1日前的收盘价)) AND (收盘价>=2日前的收盘价))
HGWT23:=((1日前的HGWT22 AND (收盘价>=1日前的收盘价)) AND (收盘价<=2日前的收盘价))
HGWT24:=((1日前的HGWT23 AND (收盘价<=1日前的收盘价)) AND (收盘价>=2日前的收盘价))
HGWT25:=((收盘价<1日前的收盘价) AND (收盘价<2日前的收盘价))
HGWT26:=((1日前的HGWT25 AND (收盘价>=1日前的收盘价)) AND (收盘价<=2日前的收盘价))
HGWT27:=((1日前的HGWT26 AND (收盘价<=1日前的收盘价)) AND (收盘价>=2日前的收盘价))
HGWT28:=((1日前的HGWT27 AND (收盘价>=1日前的收盘价)) AND (收盘价<=2日前的收盘价))
HGWT29:=((1日前的HGWT28 AND (收盘价<=1日前的收盘价)) AND (收盘价>=2日前的收盘价))
HGWT30:=((1日前的HGWT29 AND (收盘价>=1日前的收盘价)) AND (收盘价<=2日前的收盘价))
HGWT31:=((1日前的HGWT30 AND (收盘价<=1日前的收盘价)) AND (收盘价>=2日前的收盘价))
HGWT32:=((1日前的HGWT31 AND (收盘价>=1日前的收盘价)) AND (收盘价<=2日前的收盘价))
HGWT33:=((1日前的HGWT32 AND (收盘价<=1日前的收盘价)) AND (收盘价>=2日前的收盘价))
HGWT34:=((1日前的HGWT33 AND (收盘价>=1日前的收盘价)) AND (收盘价<=2日前的收盘价))
HGWT35:=((1日前的HGWT34 AND (收盘价<=1日前的收盘价)) AND (收盘价>=2日前的收盘价))
HGWT36:=((1日前的HGWT35 AND (收盘价>=1日前的收盘价)) AND (收盘价<=2日前的收盘价))
HGWT37:=(REF((((((((((((HGWT25 OR HGWT26) OR HGWT27) OR HGWT28) OR HGWT29) OR HGWT30) OR HGWT31) OR HGWT32) OR HGWT33) OR HGWT34) OR HGWT35) OR HGWT36),1) AND HGWT13)
HGWT38:=(REF((((((((((((HGWT13 OR HGWT14) OR HGWT15) OR HGWT16) OR HGWT17) OR HGWT18) OR HGWT19) OR HGWT20)OR HGWT21) OR HGWT22) OR HGWT23) OR HGWT24),1) AND HGWT25)
HGWT39:=收盘价的75日简单移动平均
HGWT40:=HGWT39的3日指数移动平均
HGWT41:=(最高价+最低价)/5
HGWT42:=(HGWT41的4日简单移动平均)-(HGWT41的34日简单移动平均)
HGWT43:=HGWT42上穿0
HGWT44:=0上穿HGWT42
HGWT45:=上次HGWT43距今天数
HGWT46:=上次HGWT44距今天数
HGWT47:=1日前的HGWT43
HGWT48:=1日前的HGWT44
HGWT49:=上次HGWT47距今天数
HGWT50:=上次HGWT48距今天数
HGWT51:=IF((HGWT49 HGWT52:=(((1日前的收盘价)<=(1日前的HGWT51)) AND (收盘价>HGWT51)) AND (HGWT45 HGWT53:=(((1日前的收盘价)>=(1日前的HGWT51)) AND (收盘价 HGWT54:=HGWT52 AND ((统计HGWT45日满足HGWT52的天数)=1)
HGWT55:=HGWT53 AND ((统计HGWT46日满足HGWT53的天数)=1)
HGWT56:=HGWT54 AND ((REF(上次HGWT55距今天数,1))<(REF(BARSLAST(HGWT54),1)))
HGWT58:=成交额/(成交量)
HGWT59:=HGWT58的13日简单移动平均
HGWT60:=(C-HGWT59)/HGWT59*100
HGWT61:=收盘价的22日简单移动平均
HGWT62:=HGWT61+2*C的22估算标准差
HGWT63:=HGWT61-2*C的22估算标准差
HGWT68:=(C-HGWT63)/(HGWT62-HGWT63)
HGWT69:=(1日前的HGWT60<-15 AND 1日前的HGWT68<0 AND HGWT60>1日前的HGWT60)
输出梨花剑买入:IF(LLV(HGWT2的8日简单移动平均,3) 输出梨花剑卖出:HHV(HGWT2的1日简单移动平均,13),画黄色, 线宽为2
如果HGWT2>HGWT3返回HGWT2否则返回DRAWNULL
如果HGWT2当满足条件梨花剑卖出>HGWT2 AND HGWT2>HGWT3时,在梨花剑卖出和HGWT2之间画柱状线
当满足条件梨花剑卖出>HGWT3 AND HGWT2 STICKLINE((C>=O),开盘价,最低价,0,0),COLOR0726CA
STICKLINE((C>=O),收盘价,最高价,0,0),COLOR0726CA
STICKLINE((C STICKLINE((C STICKLINE((C STICKLINE((C STICKLINE((C STICKLINE((C STICKLINE((C STICKLINE((C STICKLINE((C STICKLINE((C>O),收盘价,开盘价,4,0),COLOR070084
STICKLINE((C>O),收盘价,开盘价,3.4,0),COLOR0000A3
STICKLINE((C>O),收盘价,开盘价,2.8,0),COLOR0000B7
STICKLINE((C>O),收盘价,开盘价,2.2,0),COLOR0000CD
STICKLINE((C>O),收盘价,开盘价,1.6,0),COLOR0000E9
STICKLINE((C>O),收盘价,开盘价,1,0),COLOR0754E9
STICKLINE((C>O),收盘价,开盘价,0.5,0),COLOR076EF3
STICKLINE((C>O),收盘价,开盘价,0.2,0),COLOR077BF3
STICKLINE(HGWT37,O,O+(C-O)/3,4,0),COLOR1029FF
STICKLINE(HGWT37,O,O+(C-O)/3,3.4,0),COLOR1040FF
STICKLINE(HGWT37,O,O+(C-O)/3,2.8,0),COLOR1083FF
STICKLINE(HGWT37,O,O+(C-O)/3,2.2,0),COLOR10ABFF
STICKLINE(HGWT37,O,O+(C-O)/3,1.6,0),COLOR10D0FF
STICKLINE(HGWT37,O,O+(C-O)/3,1,0),COLOR10FFFF
STICKLINE(HGWT37,O,O+(C-O)/3,0.3,0),COLOR00FFFF
STICKLINE(HGWT38,O,O+(C-O)/3,4.3,0),COLOR009900
STICKLINE(HGWT38,O,O+(C-O)/3,3.2,0),COLOR00AA00
STICKLINE(HGWT38,O,O+(C-O)/3,2.4,0),COLOR00BB00
STICKLINE(HGWT38,O,O+(C-O)/3,1.7,0),COLOR00CC00
STICKLINE(HGWT38,O,O+(C-O)/3,1.1,0),COLOR00DD00
STICKLINE(HGWT38,O,O+(C-O)/3,0.5,0),COLOR00EE00
STICKLINE(HGWT38,O,O+(C-O)/3,0.2,0),COLOR00FF00
当满足条件HGWT56时,在HGWT3*0.99和'←梨花剑'位置书写文字
当满足条件HGWT69时,在最低价*0.93和最低价*0.95之间画柱状线
当满足条件HGWT69>0时,在C和O之间画柱状线
当满足条件HGWT69>0时,在C和O之间画柱状线
当满足条件HGWT69>0时,在C和O之间画柱状线
当满足条件HGWT69>0时,在C和O之间画柱状线
当满足条件HGWT69>0时,在C和O之间画柱状线
当满足条件HGWT69>0时,在C和O之间画柱状线
当满足条件HGWT69>0时,在C和O之间画柱状线
当满足条件HGWT69>0时,在最低价*0.98和'$'位置书写文字
当满足条件HGWT69>0时,在最低价*0.92和'探头'位置书写文字

指标安装下载帮助  |   联系我们  |  指标公式网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 浙ICP备2024071487号-2 指标公式网别名指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
免责声明:指标公式网所有指标公式及文章由网络收集,不保障实时性和真实性, 仅供学习研究并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。
QQ:88652583 微信 88652583
sitemap站点地图