您现在的位置:程序化交易>> 股票公式>> 通达信>> 通达信公式>>正文内容

顶底先知波段顶底主图指标公式源码[通达信公式]

相关标签: 通达信顶底指标公式 、 多空资金指标公式源码 、 通达信波段顶底指标公式 、 精准波段顶底指标源码 、 波段王指标公式源码 、 波段王主图指标公式 、 神奇趋势线副图指标公式 、 神奇波段顶底指标公式 、 通达信手机版分时主图指标 、 多空趋势波段顶底指标 、 k线变色的波段指标源码 、 波段顶底主图买卖指标 、

 

用法:看了我发的主图就知道了。{先建立:Y395}

 

 

原理解析:


 

 来源:程序化99( WWW.CXH99.COM )

源码:

 


VV:=(O+C+L+H)/4;
Y311:=IFF(CURRBARSCOUNT=1,(XMA(VV,3)*3-MA(VV,2)+VV)/3,XMA(VV,3));
Y312:=IFF(CURRBARSCOUNT=1,(XMA(Y311,3)*3-MA(Y311,2)+Y311)/3,XMA(Y311,3));
Y313:=IFF(CURRBARSCOUNT=1,(XMA(Y312,3)*3-MA(Y312,2)+Y312)/3,XMA(Y312,3));
Y314:=IFF(CURRBARSCOUNT=1,(XMA(Y313,3)*3-MA(Y313,2)+Y313)/3,XMA(Y313,3));
Y315:=IFF(CURRBARSCOUNT=1,(XMA(Y314,3)*3-MA(Y314,2)+Y314)/3,XMA(Y314,3));
Y316:=IFF(CURRBARSCOUNT=1,(XMA(Y315,3)*3-MA(Y315,2)+Y315)/3,XMA(Y315,3));
Y317:=IFF(CURRBARSCOUNT=1,(XMA(Y316,3)*3-MA(Y316,2)+Y316)/3,XMA(Y316,3));
Y318:=IFF(CURRBARSCOUNT=1,(XMA(Y317,3)*3-MA(Y317,2)+Y317)/3,XMA(Y317,3));
Y319:=IFF(CURRBARSCOUNT=1,(XMA(Y318,3)*3-MA(Y318,2)+Y318)/3,XMA(Y318,3));
Y320:=IFF(CURRBARSCOUNT=1,(XMA(Y319,3)*3-MA(Y319,2)+Y319)/3,XMA(Y319,3));
Y321:=IFF(CURRBARSCOUNT=1,(XMA(Y320,3)*3-MA(Y320,2)+Y320)/3,XMA(Y320,3));
Y322:=IFF(CURRBARSCOUNT=1,(XMA(Y321,3)*3-MA(Y321,2)+Y321)/3,XMA(Y321,3));
Y323:=IFF(CURRBARSCOUNT=1,(XMA(Y322,3)*3-MA(Y322,2)+Y322)/3,XMA(Y322,3));
Y324:=IFF(CURRBARSCOUNT=1,(XMA(Y323,3)*3-MA(Y323,2)+Y323)/3,XMA(Y323,3));
Y325:=IFF(CURRBARSCOUNT=1,(XMA(Y324,3)*3-MA(Y324,2)+Y324)/3,XMA(Y324,3));
Y326:=IFF(CURRBARSCOUNT=1,(XMA(Y325,3)*3-MA(Y325,2)+Y325)/3,XMA(Y325,3));
Y327:=IFF(CURRBARSCOUNT=1,(XMA(Y326,3)*3-MA(Y326,2)+Y326)/3,XMA(Y326,3));
Y328:=IFF(CURRBARSCOUNT=1,(XMA(Y327,3)*3-MA(Y327,2)+Y327)/3,XMA(Y327,3));
Y329:=IFF(CURRBARSCOUNT=1,(XMA(Y328,3)*3-MA(Y328,2)+Y328)/3,XMA(Y328,3));
Y330:=IFF(CURRBARSCOUNT=1,(XMA(Y329,3)*3-MA(Y329,2)+Y329)/3,XMA(Y329,3));
Y331:=IFF(CURRBARSCOUNT=1,(XMA(Y330,3)*3-MA(Y330,2)+Y330)/3,XMA(Y330,3));
Y332:=IFF(CURRBARSCOUNT=1,(XMA(Y331,3)*3-MA(Y331,2)+Y331)/3,XMA(Y331,3));
Y333:=IFF(CURRBARSCOUNT=1,(XMA(Y332,3)*3-MA(Y332,2)+Y332)/3,XMA(Y332,3));
Y334:=IFF(CURRBARSCOUNT=1,(XMA(Y333,3)*3-MA(Y333,2)+Y333)/3,XMA(Y333,3));
Y335:=IFF(CURRBARSCOUNT=1,(XMA(Y334,3)*3-MA(Y334,2)+Y334)/3,XMA(Y334,3));
Y336:=IFF(CURRBARSCOUNT=1,(XMA(Y335,3)*3-MA(Y335,2)+Y335)/3,XMA(Y335,3));
Y337:=IFF(CURRBARSCOUNT=1,(XMA(Y336,3)*3-MA(Y336,2)+Y336)/3,XMA(Y336,3));
Y338:=IFF(CURRBARSCOUNT=1,(XMA(Y337,3)*3-MA(Y337,2)+Y337)/3,XMA(Y337,3));
Y339:=IFF(CURRBARSCOUNT=1,(XMA(Y338,3)*3-MA(Y338,2)+Y338)/3,XMA(Y338,3));
Y340:=IFF(CURRBARSCOUNT=1,(XMA(Y339,3)*3-MA(Y339,2)+Y339)/3,XMA(Y339,3));
Y341:=IFF(CURRBARSCOUNT=1,(XMA(Y340,3)*3-MA(Y340,2)+Y340)/3,XMA(Y340,3));
Y342:=IFF(CURRBARSCOUNT=1,(XMA(Y341,3)*3-MA(Y341,2)+Y341)/3,XMA(Y341,3));
Y343:=IFF(CURRBARSCOUNT=1,(XMA(Y342,3)*3-MA(Y342,2)+Y342)/3,XMA(Y342,3));
Y344:=IFF(CURRBARSCOUNT=1,(XMA(Y343,3)*3-MA(Y343,2)+Y343)/3,XMA(Y343,3));
Y345:=IFF(CURRBARSCOUNT=1,(XMA(Y344,3)*3-MA(Y344,2)+Y344)/3,XMA(Y344,3));
Y346:=IFF(CURRBARSCOUNT=1,(XMA(Y345,3)*3-MA(Y345,2)+Y345)/3,XMA(Y345,3));
Y347:=IFF(CURRBARSCOUNT=1,(XMA(Y346,3)*3-MA(Y346,2)+Y346)/3,XMA(Y346,3));
Y348:=IFF(CURRBARSCOUNT=1,(XMA(Y347,3)*3-MA(Y347,2)+Y347)/3,XMA(Y347,3));
Y349:=IFF(CURRBARSCOUNT=1,(XMA(Y348,3)*3-MA(Y348,2)+Y348)/3,XMA(Y348,3));
Y350:=IFF(CURRBARSCOUNT=1,(XMA(Y349,3)*3-MA(Y349,2)+Y349)/3,XMA(Y349,3));
Y351:=IFF(CURRBARSCOUNT=1,(XMA(Y350,3)*3-MA(Y350,2)+Y350)/3,XMA(Y350,3));
Y352:=IFF(CURRBARSCOUNT=1,(XMA(Y351,3)*3-MA(Y351,2)+Y351)/3,XMA(Y351,3));
Y353:=IFF(CURRBARSCOUNT=1,(XMA(Y352,3)*3-MA(Y352,2)+Y352)/3,XMA(Y352,3));
Y354:=IFF(CURRBARSCOUNT=1,(XMA(Y353,3)*3-MA(Y353,2)+Y353)/3,XMA(Y353,3));
Y355:=IFF(CURRBARSCOUNT=1,(XMA(Y354,3)*3-MA(Y354,2)+Y354)/3,XMA(Y354,3));
Y356:=IFF(CURRBARSCOUNT=1,(XMA(Y355,3)*3-MA(Y355,2)+Y355)/3,XMA(Y355,3));
Y357:=IFF(CURRBARSCOUNT=1,(XMA(Y356,3)*3-MA(Y356,2)+Y356)/3,XMA(Y356,3));
Y358:=IFF(CURRBARSCOUNT=1,(XMA(Y357,3)*3-MA(Y357,2)+Y357)/3,XMA(Y357,3));
Y359:=IFF(CURRBARSCOUNT=1,(XMA(Y358,3)*3-MA(Y358,2)+Y358)/3,XMA(Y358,3));
Y360:=IFF(CURRBARSCOUNT=1,(XMA(Y359,3)*3-MA(Y359,2)+Y359)/3,XMA(Y359,3));
Y361:=IFF(CURRBARSCOUNT=1,(XMA(Y360,3)*3-MA(Y360,2)+Y360)/3,XMA(Y360,3));
Y362:=IFF(CURRBARSCOUNT=1,(XMA(Y361,3)*3-MA(Y361,2)+Y361)/3,XMA(Y361,3));
Y363:=IFF(CURRBARSCOUNT=1,(XMA(Y362,3)*3-MA(Y362,2)+Y362)/3,XMA(Y362,3));
Y364:=IFF(CURRBARSCOUNT=1,(XMA(Y363,3)*3-MA(Y363,2)+Y363)/3,XMA(Y363,3));
Y365:=IFF(CURRBARSCOUNT=1,(XMA(Y364,3)*3-MA(Y364,2)+Y364)/3,XMA(Y364,3));
Y366:=IFF(CURRBARSCOUNT=1,(XMA(Y365,3)*3-MA(Y365,2)+Y365)/3,XMA(Y365,3));
Y367:=IFF(CURRBARSCOUNT=1,(XMA(Y366,3)*3-MA(Y366,2)+Y366)/3,XMA(Y366,3));
Y368:=IFF(CURRBARSCOUNT=1,(XMA(Y367,3)*3-MA(Y367,2)+Y367)/3,XMA(Y367,3));
Y369:=IFF(CURRBARSCOUNT=1,(XMA(Y368,3)*3-MA(Y368,2)+Y368)/3,XMA(Y368,3));
Y370:=IFF(CURRBARSCOUNT=1,(XMA(Y369,3)*3-MA(Y369,2)+Y369)/3,XMA(Y369,3));
Y371:=IFF(CURRBARSCOUNT=1,(XMA(Y370,3)*3-MA(Y370,2)+Y370)/3,XMA(Y370,3));
Y372:=IFF(CURRBARSCOUNT=1,(XMA(Y371,3)*3-MA(Y371,2)+Y371)/3,XMA(Y371,3));
Y373:=IFF(CURRBARSCOUNT=1,(XMA(Y372,3)*3-MA(Y372,2)+Y372)/3,XMA(Y372,3));
Y374:=IFF(CURRBARSCOUNT=1,(XMA(Y373,3)*3-MA(Y373,2)+Y373)/3,XMA(Y373,3));
Y375:=IFF(CURRBARSCOUNT=1,(XMA(Y374,3)*3-MA(Y374,2)+Y374)/3,XMA(Y374,3));
Y376:=IFF(CURRBARSCOUNT=1,(XMA(Y375,3)*3-MA(Y375,2)+Y375)/3,XMA(Y375,3));
Y377:=IFF(CURRBARSCOUNT=1,(XMA(Y376,3)*3-MA(Y376,2)+Y376)/3,XMA(Y376,3));
Y378:=IFF(CURRBARSCOUNT=1,(XMA(Y377,3)*3-MA(Y377,2)+Y377)/3,XMA(Y377,3));
Y379:=IFF(CURRBARSCOUNT=1,(XMA(Y378,3)*3-MA(Y378,2)+Y378)/3,XMA(Y378,3));
Y380:=IFF(CURRBARSCOUNT=1,(XMA(Y379,3)*3-MA(Y379,2)+Y379)/3,XMA(Y379,3));
Y381:=IFF(CURRBARSCOUNT=1,(XMA(Y380,3)*3-MA(Y380,2)+Y380)/3,XMA(Y380,3));
Y382:=IFF(CURRBARSCOUNT=1,(XMA(Y381,3)*3-MA(Y381,2)+Y381)/3,XMA(Y381,3));
Y383:=IFF(CURRBARSCOUNT=1,(XMA(Y382,3)*3-MA(Y382,2)+Y382)/3,XMA(Y382,3));
Y384:=IFF(CURRBARSCOUNT=1,(XMA(Y383,3)*3-MA(Y383,2)+Y383)/3,XMA(Y383,3));
Y385:=IFF(CURRBARSCOUNT=1,(XMA(Y384,3)*3-MA(Y384,2)+Y384)/3,XMA(Y384,3));
Y386:=IFF(CURRBARSCOUNT=1,(XMA(Y385,3)*3-MA(Y385,2)+Y385)/3,XMA(Y385,3));
Y387:=IFF(CURRBARSCOUNT=1,(XMA(Y386,3)*3-MA(Y386,2)+Y386)/3,XMA(Y386,3));
Y388:=IFF(CURRBARSCOUNT=1,(XMA(Y387,3)*3-MA(Y387,2)+Y387)/3,XMA(Y387,3));
Y389:=IFF(CURRBARSCOUNT=1,(XMA(Y388,3)*3-MA(Y388,2)+Y388)/3,XMA(Y388,3));
Y390:=IFF(CURRBARSCOUNT=1,(XMA(Y389,3)*3-MA(Y389,2)+Y389)/3,XMA(Y389,3));
Y391:=IFF(CURRBARSCOUNT=1,(XMA(Y390,3)*3-MA(Y390,2)+Y390)/3,XMA(Y390,3));
Y392:=IFF(CURRBARSCOUNT=1,(XMA(Y391,3)*3-MA(Y391,2)+Y391)/3,XMA(Y391,3));
Y393:=IFF(CURRBARSCOUNT=1,(XMA(Y392,3)*3-MA(Y392,2)+Y392)/3,XMA(Y392,3));
Y394:=IFF(CURRBARSCOUNT=1,(XMA(Y393,3)*3-MA(Y393,2)+Y393)/3,XMA(Y393,3));
Y395:=IFF(CURRBARSCOUNT=1,(XMA(Y394,3)*3-MA(Y394,2)+Y394)/3,XMA(Y394,3));
N:= 200 ; M:= 13;
{DRAWGBK(C>0, RGB(0,0,00),RGB(0,0,0),0,'12',0)};DRAWKLINE(H,O,L,C);
股价96:=Y395;
增幅96:=XMA(XMA(XMA(股价96,3),3),3)-REF(XMA(XMA(XMA(股价96,3),3),3),1);
X396:=XMA(股价96,3);
J396:=(XMA(股价96,3)*3+0.5*股价96-0.5*REF(股价96,1)+增幅96)/3;
Y396:=IFF(CURRBARSCOUNT=1,J396,X396),LINETHICK2,COLORGREEN;高险区1:Y396*1.1,COLORLIRED,COLORFFFF00;
高险区2:Y396*1.125,COLORLIRED,COLORFF0000;
高险区3:Y396*1.15,COLORLIRED,COLOR00FF00;
良机区1:Y396*0.9,COLORLIBLUE,COLOR00FFFF;
良机区2:Y396*0.875,COLORLIBLUE,COLORFF00FF;
良机区3:Y396*0.85,COLOR0000FF;
WSR1:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;
WSR2:=CROSS(WSR1,5);
WSR3:=CROSS(8,WSR1);
WSR4:=CROSS(WSR1,-5);
WSR5:=CROSS(WSR1,-8);
WSR6:=WSR3;
WSR7:=WSR4 OR WSR5;
WSR8:=WSR7 AND FILTER(WSR7,5);
WSR10:DRAWICON(WSR8,L-0.01,1);
WSR9:=WSR6 AND FILTER(WSR6,5);
WSR11:DRAWICON(WSR9,H+0.01,2);
WSR12:=O<良机区3;
DRAWICON(WSR12 AND FILTER(WSR12,12),L-0.03,9);
W1:=C>REF(C,1) AND MACD<REF(MACD,1) AND MACD>0 AND V<REF(V,1);
W2:=C>REF(C,1) AND MACD<0 AND MACD<REF(MACD,1) AND V<REF(V,1);
XG:=W1 OR W2;
VAR1:=AMOUNT/VOL/7;
VAR2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;
VAR3:=SUM(AMOUNT,10)/VAR1/7;
VAR4:=DMA(VAR2,VOL/VAR3);
VAR5:=(CLOSE-VAR4)/VAR4*100,COLORLIMAGENTA;
XG1:=CROSS(VAR5,MA(VAR5,2)) AND VAR5<0 AND C<(HHV(H,5)*0.88) AND REF(O>C,1) AND REF(O>C,2);
XG3:=XG AND XG1 AND L<良机区1;
WSR13:=O>良机区3 AND L<良机区1 OR XG3;
DRAWICON(WSR13 AND FILTER(WSR13,10),L-0.03,23);
WSR14:=H>高风区3;DRAWICON(WSR14 AND FILTER(WSR14,15),H+0.03,19);
WSR15:=H<高风区3 AND H>高风区2;DRAWICON(WSR15 AND FILTER(WSR15,5),H+0.03,15);
WSR16:=(INDEXC-MA(INDEXC,3))/MA(INDEXC,3);
WSR17:=(INDEXC-MA(INDEXC,8))/MA(INDEXC,8);
WSR18:=(INDEXC-MA(INDEXC,18))/MA(INDEXC,18);
WSR19:=(WSR16 + WSR17 + WSR18)/3;
WSR20:=(C-MA(C,3))/MA(C,3);
WSR21:=(C-MA(C,8))/MA(C,8);
WSR22:=(C-MA(C,18))/MA(C,18);
WSR23:=(WSR20 + WSR21 + WSR22)/3;
WSR24:=(WSR19>REF(WSR19,1) AND CROSS(WSR23,WSR19))*50;
WSR25:=(INDEXC-MA(INDEXC,6))/MA(INDEXC,6);
WSR26:=(INDEXC-MA(INDEXC,12))/MA(INDEXC,12);
WSR27:=(INDEXC-MA(INDEXC,24))/MA(INDEXC,24);
WSR28:=(WSR25 + WSR26 + WSR27)/3;
WSR29:=(C-MA(C,6))/MA(C,6);
WSR30:=(C-MA(C,12))/MA(C,12);
WSR31:=(C-MA(C,24))/MA(C,24);
WSR32:=(WSR29 + WSR30 + WSR31)/3;
WSR33:=(WSR28>REF(WSR28,1) AND CROSS(WSR32,WSR28))*20;
WSR34:=(INDEXC-MA(INDEXC,13))/MA(INDEXC,13);
WSR35:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);
WSR36:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);
WSR37:=(WSR34 + WSR35 + WSR36)/3;
WSR38:=(C-MA(C,13))/MA(C,13);
WSR39:=(C-MA(C,34))/MA(C,34);
WSR40:=(C-MA(C,55))/MA(C,55);
WSR41:=(WSR38 + WSR39 + WSR40)/3;
WSR42:=(WSR37>REF(WSR37,1) AND CROSS(WSR41,WSR37));
WSR43:=(INDEXC-MA(INDEXC,13))/MA(INDEXC,13);
WSR44:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);
WSR45:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);
WSR46:=(WSR43 + WSR44 + WSR45)/3;
WSR47:=(C-MA(C,30))/MA(C,30);
WSR48:=(C-MA(C,60))/MA(C,60);
WSR49:=(C-MA(C,90))/MA(C,90);
WSR50:=(WSR47 + WSR48 + WSR49)/3;
WSR51:=(WSR46>REF(WSR46,1) AND CROSS(WSR50,WSR46));
WSR52:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);
WSR53:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);
WSR54:=(INDEXC-MA(INDEXC,89))/MA(INDEXC,89);
WSR55:=(WSR52 + WSR53 + WSR54)/3;
WSR56:=(C-MA(C,60))/MA(C,60);
WSR57:=(C-MA(C,120))/MA(C,120);
WSR58:=(C-MA(C,220))/MA(C,220);
WSR59:=(WSR56 + WSR57 + WSR58)/3;
WSR60:=(WSR59>REF(WSR59,1) AND CROSS(WSR59,WSR55));
WSR61:=WSR24 OR WSR33 OR WSR42 OR WSR51 OR WSR60;
DRAWTEXT(WSR61 AND H<Y396 AND FILTER(WSR61,5),良机区3,''),COLOR00FFFF;
DRAWTEXT(WSR61 AND H<Y396 AND FILTER(WSR61,5),良机区3*0.97,'机'),COLOR00FFFF;
时间之窗:=HHVBARS(ZIG(3,M)>REF(ZIG(3,M),1)
AND REF(ZIG(3,M), 1)<REF(ZIG(3,M), 2),N);
DRAWTEXT(时间之窗=2,L*0.94,'3天'),COLORRED;
DRAWTEXT(时间之窗=4,H*1.06,'5天'),COLORGREEN;
DRAWTEXT(时间之窗=7,L*0.94,'8天'),COLORRED;
DRAWTEXT(时间之窗=12,H*1.06,'13天'),COLORGREEN;
DRAWTEXT(时间之窗=20,L*0.94,'21天'),COLORLIRED;
DRAWTEXT(时间之窗=33,H*1.06,'34天'),COLORLIGREEN;
DRAWTEXT(时间之窗=54,L*0.94,'55天'),COLORLIRED;
{DRAWTEXT(时间之窗=88,H*1.06,'89天'),COLORLIGREEN;
DRAWTEXT(时间之窗=143,L*0.94,'144天'),COLORLIRED;
DRAWTEXT(时间之窗=232,H*1.06,'233天'),COLORLIGREEN;
DRAWTEXT(时间之窗=376,L*0.94,'377天'),COLORLIRED;
DRAWTEXT(时间之窗=609,H*1.06,'610天'),COLORLIGREEN; };
GET:=ZIG(3,3),COLORFFFFFF;
PL5:=ZIG(3,5);
EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3);
EX1:=ZIG(3,5)<REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)>=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3);
PL10:=ZIG(3,10);
EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);
EX2:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3);
PL20:=ZIG(3,20);
EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3);
EX3:=ZIG(3,20)<REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)>=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);
PL40:=ZIG(3,40);
走强1:=BARSLAST(PL5<REF(PL5,1));
走弱1:=BARSLAST(PL5>REF(PL5,1));
走强2:=BARSLAST(PL10<REF(PL10,1));
走弱2:=BARSLAST(PL10>REF(PL10,1));
走强3:=BARSLAST(PL20<REF(PL20,1));
走弱3:=BARSLAST(PL20>REF(PL20,1));
ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);
ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);
DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);
DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);
ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);
ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);
DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);
DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);
DRAWTEXT(EN1 AND DTJZ5=1,L*0.98,'(A)'),COLORFFFF00;
DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'(B)'),COLORFF00FF;
DRAWTEXT(EN2 AND ZTJZ5=1,L*0.98,'(C)'),COLOR0000FF;
涨停:=IF(REF(C,1)*1.1-C<0.01 ,1,0);
STICKLINE(涨停,OPEN,CLOSE,4,0),COLORRED;
STICKLINE(涨停,OPEN,CLOSE,3,0),COLORYELLOW;
STICKLINE(涨停,H,L,0,0),COLORYELLOW;
DRAWTEXT_FIX(1,0.90,0,0,HYBLOCK),COLORFF00FF;线A1:=(MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,25))/3;
线A4:=(MA(CLOSE,13)+MA(CLOSE,34)+MA(CLOSE,55))/3;
DRAWICON(CROSS(线A1,线A4),线A1,1);
DRAWTEXT(CROSS(线A1,线A4),LOW*0.96,'破'),COLORYELLOW;
V1:=EMA(CLOSE,5),COLOR00FFFF;
V2:=EMA((EMA(CLOSE,29))*(1.01),10),COLORFF00FF;
DRAWICON(CROSS(V1,V2),LOW,1),COLORYELLOW;
DRAWTEXT(CROSS(V1,V2),LOW*0.98,'招'),COLORYELLOW;AAF:LLV(LOW,34),LINETHICK1,COLORFFFFCC;
BBF:MA(AAF,4),LINETHICK1,COLORYELLOW;
TYP := (HIGH + LOW + CLOSE)/3;
CCI1:=(TYP-MA(TYP,6))/(0.015*AVEDEV(TYP,5));
差值1:=ABS(REF(CCI1,1)-CCI1),LINETHICK0;
CCI2:=(TYP-MA(TYP,10))/(0.015*AVEDEV(TYP,10));
差值2:=ABS(REF(CCI2,1)-CCI2),LINETHICK0;
CCI3:=(TYP-MA(TYP,20))/(0.015*AVEDEV(TYP,20));
差值3:=ABS(REF(CCI3,1)-CCI3),LINETHICK0;
CCI4:=(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));
差值4:=ABS(REF(CCI4,1)-CCI4),LINETHICK0;
CCI5:=(TYP-MA(TYP,60))/(0.015*AVEDEV(TYP,60));
差值5:=ABS(REF(CCI5,1)-CCI5),LINETHICK0;
CCI:=CCI1+CCI2+CCI3+CCI4+CCI5;
AAA:=(3*C+H+L+O)/6;
VAR1A:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)
+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;
VAR2A:=(HHV(VAR1A,5)+HHV(VAR1A,10)+HHV(VAR1A,20))/3;
VAR3A:=(LLV(VAR1A,5)+LLV(VAR1A,10)+LLV(VAR1A,20))/3;
VAR4A:=(HHV(VAR2A,5)+HHV(VAR2A,10)+HHV(VAR2A,20))/3;
VAR5A:=(LLV(VAR3A,5)+LLV(VAR3A,10)+LLV(VAR3A,20))/3;
VAR6A:=(LLV(VAR1A,2)+LLV(VAR1A,4)+LLV(VAR1A,6))/3;
短线:VAR1A,COLORWHITE;
中线:VAR6A,COLORYELLOW;
下跌:IF(VAR1A=VAR6A,VAR6A, DRAWNULL),COLORGREEN;
TJ1:= CCI1>差值4;
立桩量:=FILTER(TJ1,0),NODRAW;
TJ2:=IF(BARSLAST(立桩量)=1 ,1,0);
STICKLINE(立桩量 !=1,REF(HIGH,BARSLAST(立桩量)),
REF(HIGH,BARSLAST(立桩量)),1,1),COLORCYAN;
{STICKLINE(立桩量 !=1,REF(LOW,BARSLAST(立桩量)),
REF(LOW,BARSLAST(立桩量)),1,1),COLORCYAN;}
成立1:=TJ2=1;
条件成立1:=FILTER(成立1,5);
DRAWTEXT(条件成立1, REF(HIGH,BARSLAST(立桩量)),'看跌'),COLORLIBLUE;
TJ11:= CCI1<-差值4 ;
立桩量2:=FILTER(TJ11,0),NODRAW;
TJ22:=IF(BARSLAST(立桩量2)=1 AND CLOSE>REF(HIGH,1),1,0);
突破2:=TJ22=1;
{STICKLINE(CLOSE AND 下跌!= VAR6A,REF(HIGH,BARSLAST(立桩量2)),
REF(HIGH,BARSLAST(立桩量2)),1,1),COLORYELLOW;}
STICKLINE(CLOSE AND 下跌!= VAR6A,REF(LOW,BARSLAST(立桩量2)),
REF(LOW,BARSLAST(立桩量2)),1,1),COLORYELLOW;
TJ:=IF(BARSLAST(立桩量2)=1 AND CLOSE>REF(LOW,1),1,0);
成立2:=TJ=1;
条件成立2:=FILTER(成立2,5);
DRAWTEXT(条件成立2,REF(LOW,BARSLAST(立桩量2)),'看涨'),COLORLIMAGENTA;
TJ111:=ABS(CCI1)>CCI AND ABS( 差值1)> ABS(差值5);
立桩量3:=FILTER(TJ111,3);
TJ3:=IF(BARSLAST(立桩量3)=1 AND CLOSE>REF(LOW,1),1,IF(BARSLAST(立桩量3)=2 AND CLOSE>REF(LOW,2),1,IF(BARSLAST(立桩量3)=3 AND CLOSE>REF(LOW,3),1,0)));
成立:=TJ3=1;
条件成立:=FILTER(成立,5);
DRAWTEXT(条件成立 AND 下跌!= VAR6A,L*0.97,'☆成立');
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
DRAWTEXT(CROSS(FF,MA15),BBF,'底背离'),COLORA6E500;
DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'顶背离'),COLOR1880FF;
X1:=(C+L+H)/3;
BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;
EMA8:=EMA(C,8);
DRAWTEXT(FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10),
EMA8,'∠45'),COLORWHITE;
STICKLINE(1,C,O,2.8,0),COLOR666600;
STICKLINE(立桩量,C,O,2.8,0),COLOR0000FF;
STICKLINE(1,C,O,0,0),COLORCCCCCC;
成本2:(MA(CLOSE,60)+MA(CLOSE,70)+MA(CLOSE,90)+MA(CLOSE,108))/4,COLORRED,LINETHICK2;{程序化交易 www.cxh99.com }
{程序化交易 www.cxh99.com }

 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

怎么收费,代编流程等详情请点击查阅!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容