通达信一线趋势主副图 钻石信号买入 用法详解 源码

HGW1:=IF(CURRBARSCOUNT=1,VOL*240/FROMOPEN,VOL);
HGW2:=HGW1*10000/FINANCE(7);
HGW3:=IF(CURRBARSCOUNT=1,REF(CLOSE,1)*1.1,DRAWNULL);
HGW4:=IF(CURRBARSCOUNT=1,REF(CLOSE,1)*0.9,DRAWNULL);
HGW5:=CONST(BARSLAST(HGW2=HHV(HGW2,180)));
HGW6:=IF(CURRBARSCOUNT<=HGW5+1,CONST(REF((CLOSE+OPEN+HIGH+LOW)/4,HGW5)),DRAWNULL);
HGW7:=HGW6;
HGW8:=MA(CLOSE,5);
HGW9:=MA(CLOSE,6);
HGW10:=MA(CLOSE,7);
HGW11:=MA(CLOSE,8);
HGW12:=MA(CLOSE,9);
HGW13:=MA(CLOSE,10);
HGW14:=MA(CLOSE,11);
HGW15:=MA(CLOSE,12);
HGW16:=MA(CLOSE,13);
HGW17:=MA(CLOSE,14);
HGW18:=MA(CLOSE,15);
HGW19:=MA(CLOSE,16);
HGW20:=MA(CLOSE,17);
HGW21:=MA(CLOSE,18);
HGW22:=MA(CLOSE,19);
HGW23:=MA(CLOSE,20);
HGW24:=MA(CLOSE,21);
HGW25:=MA(CLOSE,22);
HGW26:=MA(CLOSE,23);
HGW27:=MA(CLOSE,24);
HGW28:=MA(CLOSE,25);
HGW29:=MA(CLOSE,26);
HGW30:=MA(CLOSE,27);
HGW31:=MA(CLOSE,28);
HGW32:=MA(CLOSE,29);
HGW33:=MA(CLOSE,30);
HGW34:=MA(CLOSE,31);
HGW35:=MAX(MAX(MAX(MAX(HGW8,HGW9),HGW10),HGW11),HGW12);
HGW36:=MAX(MAX(MAX(MAX(HGW13,HGW14),HGW15),HGW16),HGW17);
HGW37:=MAX(MAX(MAX(MAX(HGW18,HGW19),HGW20),HGW21),HGW22);
HGW38:=MAX(MAX(MAX(MAX(MAX(HGW23,HGW24),HGW25),HGW26),HGW27),HGW28);
HGW39:=MAX(MAX(MAX(MAX(MAX(HGW29,HGW30),HGW31),HGW32),HGW33),HGW34);
HGW40:=MAX(MAX(MAX(MAX(HGW35,HGW36),HGW37),HGW38),HGW39);
HGW41:=IF(HGW40=HGW8,5,IF(HGW40=HGW9,6,IF(HGW40=HGW10,7,IF(HGW40=HGW11,8,IF(HGW40=HGW12,9,IF(HGW40=HGW13,10,IF(HGW40=HGW14,11,IF(HGW40=HGW15,12,IF(HGW40=HGW16,13,IF(HGW40=HGW17,14,IF(HGW40=HGW18,15,IF(HGW40=HGW19,16,IF(HGW40=HGW20,17,IF(HGW40=HGW21,18,IF(HGW40=HGW22,19,IF(HGW40=HGW23,20,IF(HGW40=HGW24,21,IF(HGW40=HGW25,22,IF(HGW40=HGW26,23,IF(HGW40=HGW27,24,IF(HGW40=HGW28,25,DRAWNULL)))))))))))))))))))));
HGW42:=IF(HGW40=MA(CLOSE,HGW41),HGW41,IF(HGW40=HGW29,26,IF(HGW40=HGW30,27,IF(HGW40=HGW31,28,IF(HGW40=HGW32,29,IF(HGW40=HGW33,30,IF(HGW40=HGW34,31,32)))))));
HGW43:=IF(BARSCOUNT(CLOSE)>=31,(HGW40*3+MA(CLOSE,31))/4,MAX(MA(CLOSE,5),MA(CLOSE,BARSCOUNT(CLOSE))));
HGW44:=HGW1=HHV(HGW1,HGW42);
HGW45:=OPEN/CLOSE=HHV(OPEN/CLOSE,HGW42) AND CLOSE<OPEN;
HGW46:=CLOSE/OPEN=HHV(CLOSE/OPEN,HGW42);
HGW47:=HGW46 AND HGW44;
涨%:ROUND(INDEXADV/(INDEXADV+INDEXDEC)*100),NODRAW,COLORRED;
流通市值:FINANCE(40)/100000000,NODRAW,COLORRED;
STICKLINE(CURRBARSCOUNT=1,HGW3,MAX(OPEN,CLOSE),(-1),(-1)),COLORGRAY;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
STICKLINE(CURRBARSCOUNT=1,HGW4,MIN(OPEN,CLOSE),(-1),(-1)),COLORBLUE;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
多空线:HGW7,COLORYELLOW;
DRAWTEXT(ISLASTBAR,HGW7,4),COLORYELLOW;
变线:HGW43,COLORWHITE;
STICKLINE(HGW45,OPEN,CLOSE,2,0),COLORGREEN;
STICKLINE(HGW46,OPEN,CLOSE,2,0),COLORRED;
STICKLINE(HGW47,OPEN,CLOSE,2,0),COLORYELLOW;
HGW48:=HGW45 AND HGW1>MA(HGW1,HGW42) AND CLOSE>变线*1.05 AND HGW1>MA(HGW1,5) AND CLOSE<OPEN AND CLOSE<REF(CLOSE,1) AND HIGH/变线=HHV(HIGH/变线,5);
HGW49:=REF(HHV((HIGH+CLOSE+LOW+HIGH)/4,7),BARSLAST(CROSS(HGW13,HGW8)));
HGW50:=REF(LLV(MIN(OPEN,CLOSE),10),BARSLAST(CROSS(HGW8,HGW13)));
HGW51:=REF(HHV(MAX(CLOSE,OPEN),7),BARSLAST(CROSS(MA(CLOSE,10),MA(CLOSE,5))));
HGW52:=REF(LLV(MIN(CLOSE,OPEN),10),BARSLAST(CROSS(MA(CLOSE,5),MA(CLOSE,10))));
HGW53:=IF(CLOSE>500,HGW51,HGW49);
HGW54:=IF(CLOSE>500,HGW52,HGW50);
HGW55:=EVERY(CLOSE/REF(CLOSE,1)>INDEXC/REF(INDEXC,1),5) OR COUNT(CLOSE/REF(CLOSE,1)>INDEXC/REF(INDEXC,1),9)=8;
HGW56:=COUNT(HGW55,2) AND DYNAINFO(4)>0 AND IF(CLOSE<OPEN,HGW1<REF(VOL,1),1);
HGW57:=REF(MIN(REF(LOW,BARSLAST(HGW44)),REF(HIGH,BARSLAST(HGW44)+1)),1);
HGW58:=MAX(MAX(HHV((HIGH+CLOSE)/2,5),变线+MA(HIGH-变线,HGW42)),IF(变线>REF(变线,1),变线*1.03,变线));
HGW59:=IF(CLOSE<HGW49,MIN(HGW49,HGW58),HGW58);
HGW60:=ABS(LOW-OPEN)<ABS(OPEN-CLOSE) AND CLOSE/REF(CLOSE,1)>1.033 AND REF(CLOSE,1)/REF(CLOSE,2)<1.093 AND REF(CLOSE,2)/REF(CLOSE,3)<1.093 AND REF(CLOSE,3)/REF(CLOSE,4)<1.093 AND REF(CLOSE,4)/REF(CLOSE,5)<1.093 AND REF(CLOSE,5)/REF(CLOSE,6)<1.093 AND NOT(CLOSE=OPEN AND CLOSE/REF(CLOSE,1)>1.033);
HGW61:=ABS(LOW-OPEN)<ABS(OPEN-CLOSE) AND CLOSE/REF(CLOSE,1)>1.093 AND REF(CLOSE,1)/REF(CLOSE,2)<1.093 AND REF(CLOSE,2)/REF(CLOSE,3)<1.093 AND REF(CLOSE,3)/REF(CLOSE,4)<1.093 AND REF(CLOSE,4)/REF(CLOSE,5)<1.093 AND REF(CLOSE,5)/REF(CLOSE,6)<1.093 AND NOT(CLOSE=OPEN AND CLOSE/REF(CLOSE,1)>1.033);
HGW62:=CLOSE/REF(CLOSE,1)>1.033 AND VOL<REF(VOL,1) AND REF(CLOSE,1)/REF(CLOSE,2)<1.093 AND COUNT(CLOSE/REF(CLOSE,1)>1.093,20)<3;
HGW63:=HGW60 OR HGW62 AND COUNT(CLOSE/REF(CLOSE,1)>1.05,10)<=4;
HGW64:=HGW61 OR HGW62 AND COUNT(CLOSE/REF(CLOSE,1)>1.05,10)<=4;
HGW65:=CLOSE-REF(CLOSE,1);
HGW66:=100*EMA(EMA(HGW65,9),9)/EMA(EMA(ABS(HGW65),9),9);
HGW67:=MA(HGW66,5);
HGW68:=HGW66<0 AND HGW67<0;
HGW69:=MA(CLOSE,10);
HGW70:=MA(CLOSE,54);
HGW71:=(REF(CLOSE,3)-CLOSE)/REF(CLOSE,3)*100>5;
HGW72:=FILTER(HGW71,10);
HGW73:=BARSLAST(HGW72);
HGW74:=REF(HIGH,HGW73+2);
HGW75:=REF(HIGH,HGW73+1);
HGW76:=REF(HIGH,HGW73);
HGW77:=MAX(HGW74,HGW75);
HGW78:=MAX(HGW77,HGW76);
HGW79:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>5;
HGW80:=HGW73<150;
HGW81:=(OPEN-HGW78)/HGW78*100<30;
HGW82:=(CLOSE-LLV(LOW,HGW73))/LLV(LOW,HGW73)*100<50;
HGW83:=(CLOSE-REF(OPEN,5))/REF(OPEN,5)*100<30;
HGW84:=VOL/MA(VOL,5)<3.5;
HGW85:=(CLOSE-REF(CLOSE,89))/REF(CLOSE,89)*100<80;
HGW86:=HGW79 AND HGW80 AND HGW81 AND HGW82 AND HGW83 AND HGW84 AND HGW85;
HGW87:=FILTER(HGW86,15);
HGW88:=(CLOSE-HGW70)/HGW70<0.1;
HGW89:=(CLOSE-HGW69)/HGW69<0.3;
HGW90:=(HGW88=1 AND HGW89=1)*0.2;
HGW91:=(HGW90=0 AND REF(HGW90,1)=0.2 AND REF(COUNT(HGW90=0.2,10)=10,1)=1)*(-0.1);
HGW92:=HGW91=(-0.1);
HGW93:=HGW87 OR HGW92;
HGW94:=CLOSE/REF(CLOSE,1)>1.033 AND CLOSE/OPEN>1.033;
HGW95:=VOL/REF(VOL,1)>1.2 AND COUNT(CLOSE>OPEN,1) OR (LOW>REF(HIGH,1) AND COUNT(OPEN>CLOSE,1) AND VOL/REF(VOL,1)>1.2);
HGW96:=HGW93 AND CLOSE/REF(CLOSE,1)>1.033 AND HGW95 AND HGW94;
HGW97:=HGW68 AND HGW96 AND HGW63,COLORBLUE;
HGW98:=HGW68 AND HGW96 AND HGW64,COLORRED;
VAR16:=REF(HGW59,1);
VAR18:=变线>HGW53 AND COUNT(CLOSE>变线,5);
STICKLINE(HGW48,OPEN,CLOSE,2,0),COLORBLUE;
箱顶:IF(HGW53=CONST(HGW53),CONST(HGW53),DRAWNULL),COLORBROWN,LINETHICK3;
箱底:IF(HGW54=CONST(HGW54),HGW54,DRAWNULL),COLORBLUE,LINETHICK3;
DRAWTEXT(ISLASTBAR,HGW53,5),COLORBROWN;
DRAWTEXT(ISLASTBAR,HGW54,6),COLORBLUE;
STICKLINE(HGW56,HGW7,HGW7,5,0),COLORMAGENTA;
止赢:IF(CURRBARSCOUNT<=5,CONST(VAR16),DRAWNULL),DOTLINE,COLORMAGENTA;
DRAWTEXT(ISLASTBAR,VAR16,7),COLORMAGENTA;
预埋:IF(ISLASTBAR,HGW59,DRAWNULL),NODRAW,COLORMAGENTA;
止损:IF(HGW57=CONST(HGW57),HGW57,IF(ISLASTBAR,HGW57,DRAWNULL)),DOTLINE,COLORGREEN;
DRAWTEXT(ISLASTBAR,止损,8),COLORGREEN;
IF(VAR18,变线,DRAWNULL),COLOR0045FF;
IF(变线<HGW54,变线,DRAWNULL),COLORCYAN;
DRAWICON(HGW97,L,24);
DRAWICON(HGW98,L,25);


未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
该公式包含未来函数:FINANCE
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

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