精准线主图(通达信公式 主图 源码 测试图)
{精准线主图}{参数顶底开关 0 1 0点位差0 1 0指定点 01000 0}V2V:=V/REF(V,1)>=1.9 AND C>REF(C,1);ZT:=C/REF(C,1)>1.097;{涨停红色}ZDF:=(C-REF(C,1))/REF(C,1)*100;STICKLINE(ZDF>9.5,C,O,3.1,0),COLOR0000CC;STICKLINE(ZDF>9.5,C,O,2.1,0),COLOR0000DD;STICKLINE(ZDF>9.5,C,O,1.2,0),COLOR0000EE;STICKLINE(ZDF>9.5,C,O,0.2,0),COLOR0000FF;STICKLINE(ZDF>9.5,H,L,0,0),COLOR0000FF;L0:=点位差/100;前极点精准线:IF(顶底开关=0,CONST(REF(L,指定点)),CONST(REF(H,指定点))),COLORMAGENTA;DRAWICON(ABS(L-前极点精准线)<=L0,前极点精准线,38);DRAWICON(ABS(H-前极点精准线)<=L0,前极点精准线,39);DRAWICON(ABS(O-前极点精准线)<=L0,前极点精准线,40);DRAWICON(ABS(C-前极点精准线)<=L0,前极点精准线,37);{DRAWTEXT(ABS(L-前极点精准线)<=L0 ,L*0.98,'最低价精准'),COLORRED;DRAWTEXT(ABS(H-前极点精准线)<=L0 ,H*0.98,'最高价精准'),COLORRED;DRAWTEXT(ABS(O-前极点精准线)<=L0 ,O*0.98,'开盘价精准'),COLORRED;DRAWTEXT(ABS(C-前极点精准线)<=L0 ,C*0.98,'收盘价精准'),COLORRED;}WWWzbsirCOM:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));STICKLINE(前极点精准线=L AND 前极点精准线=O ,H,L,0,0),COLORWHITE;{前极点精准线1:IF(顶底开关=0,CONST(REF(C,指定点)),CONST(REF(H,指定点))),COLOR178448;DRAWICON(ABS(L-前极点精准线1)<=L0,前极点精准线1*0.99,38);DRAWICON(ABS(H-前极点精准线1)<=L0,前极点精准线1*1.01,39);};{前极点精准线2:IF(顶底开关=0,CONST(REF(O,指定点)),CONST(REF(H,指定点))),COLOR178448;DRAWICON(ABS(L-前极点精准线2)<=L0,前极点精准线2*0.99,38);DRAWICON(ABS(H-前极点精准线2)<=L0,前极点精准线2*1.01,39);};{前极点精准线3:IF(顶底开关=0,CONST(REF(H,指定点)),CONST(REF(H,指定点))),COLOR178448;DRAWICON(ABS(L-前极点精准线3)<=L0,前极点精准线3*0.99,38);DRAWICON(ABS(H-前极点精准线3)<=L0,前极点精准线3*1.01,39);};{H极点精准线:CONST(REF(H,指定点)),COLOR7777FF;DRAWICON(ABS(H极点精准线-H)<=L0,H极点精准线*1.01,35);DRAWICON(ABS(H极点精准线-L)<=L0,H极点精准线*0.99,34);}{极点精准线:CONST(L),COLOR0077FF;DRAWICON(ABS(L-极点精准线)<=L0,极点精准线*0.99,1);DRAWICON(ABS(H-极点精准线)<=L0,极点精准线*1.01,2);同向极点精准数:COUNT(ABS(L-极点精准线)<=L0,60)-1,COLOR0077FF,NODRAW;异向极点精准数:COUNT(ABS(H-极点精准线)<=L0,60),COLOR0077FF,NODRAW;XG:=同向极点精准数>0 AND 异向极点精准数>0;}{DIFF:=10*(EMA(CLOSE,12)-EMA(CLOSE,26));DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA);量缩价涨:=C<ref(o,1)?and?vREF(MACD,1) AND C>REF(C,1) AND REF(CO;</ref(o,1)?and?v阴KDAY:=BARSLAST(量缩价涨)+1;STICKLINE(V,REF(O,阴KDAY),REF(O,阴KDAY),3.5,0),COLORMAGENTA;DRAWICON(CROSS(C,REF(O,阴KDAY)),L,1);};{DRAWTEXT_FIX(ISLASTBAR,0.5,0.05,0,CODE),COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR,0.55,0.05,0,STKNAME)COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR,0.6,0.05,0,HYBLOCK),COLORCYAN;DRAWTEXT_FIX(ISLASTBAR,0.6,0,0,DYBLOCK),COLORCYAN;DRAWTEXT_FIX(ISLASTBAR,0.55,0.85,0,GNBLOCK),COLORMAGENTA;DRAWTEXT_FIX(ISLASTBAR,0.55,0.90,0,FGBLOCK),COLORMAGENTA;DRAWTEXT_FIX(ISLASTBAR,0.55,0.95,0,ZSBLOCK);};{11、非包含关系的分型端点预选};分型顶0:=H>REF(H,1) AND L>REF(L,1);分型底0:=L<ref(l,1)?and?h<ref(h,1);{12、包含关系的K线处理:凡不符合上述类型的K线,均处于包含关系之中};{包含关系分为二种:一、当前K线包含前一根K线时,需进行合并处理;二、当前K线被前一根K线包含时,因不涉及端点,无需处理。};分型顶1:=(H>=REF(H,1) AND L<=REF(L,1)) AND (BARSLAST(分型顶0)<barslast(分型底0));分型底1:=(H>=REF(H,1) AND L<=REF(L,1)) AND (BARSLAST(分型底0)<barslast(分型顶0));{13、将前述二种分型节点作为备选分型。}分型顶2:=分型顶0 OR 分型顶1;分型底2:=分型底0 OR 分型底1;{14、对连续的同向分型节点,取最高点或最低点为本笔分型的节点,并向前过滤掉中间满足条件的分型。};{注:过滤的目的是仅保留最后一次的最高最低节点分型,确保预选分型节点的唯一性。}分型顶:=FILTERX(分型顶2 AND H=HHV(H,BARSLAST(分型底2)),BARSLAST(分型底2));IF(分型顶,H,DRAWNULL),CIRCLEDOT,COLORGREEN,LINETHICK3;分型底:=FILTERX(分型底2 AND L=LLV(L,BARSLAST(分型顶2)),BARSLAST(分型顶2));IF(分型底,L,DRAWNULL),CIRCLEDOT,COLORRED,LINETHICK3;{二、对符合形成笔条件的分型节点进行粗选。}{注:符合笔条件的分型应符合缠论以下条件:1、力度:本笔的起点与终点之间,必须存在最高的低点与最低的高点分离(缠论无要求,可删除)2、包含:无包含关系的K线数量必须达到二根以上,即:右肩+左肩+本笔。3、数量:本笔所有K线数量,在无包含关系的情况下,除起点K线外,其余数量必须达到三以上,即:右肩+过渡+左肩+本笔。};{21、以分型顶底为起点形成笔的要求,进行第一次筛选,得到笔的第一类过渡期顶、底。};{顶力度1:=HHV(L,UP1+1)>LLV(H,UP1+1);}UP1:=BARSLAST(分型底);顶包含1:=COUNT(L>REF(L,1) AND H>REF(H,1),UP1)>2;{底力度1:=HHV(L,DN1+1)>LLV(H,DN1+1);}DN1:=BARSLAST(分型顶);底包含1:=COUNT(H<ref(h,1)?and?l2;</ref(h,1)?and?l笔顶10:=分型顶 AND{ 顶力度1 AND }顶包含1;笔底10:=分型底 AND{ 底力度1 AND }底包含1;{211:取同一笔中的最高点或最低点为笔的分型顶、底端};笔顶1:=笔顶10 AND H=HHV(H,BARSLAST(笔底10));笔底1:=笔底10 AND L=LLV(L,BARSLAST(笔顶10));DRAWLINE(笔顶1,H,笔底1,L,0),COLORGREEN,LINETHICK2,NODRAW;
DRAWLINE(笔底1,L,笔顶1,H,0),COLORRED,LINETHICK2,NODRAW;
</barslast(分型顶0));</barslast(分型底0));</ref(l,1)?and?h<ref(h,1);
我是来挣鲜花的,嘿嘿 这是什么东东啊 感谢楼主分享好资源 真是 收益 匪浅 多谢分享! 我抢、我抢、我抢沙发~ 楼主好人一个! 希望更多人一起分享,感谢!
页:
[1]