通达信指标公式源码 混沌操作法

合集下载

鳄鱼全套指标 通达信指标公式源码

鳄鱼全套指标 通达信指标公式源码

证券交易新空间》关于鳄鱼指标的源码在此。

包括鳄鱼线AO AC 指标。

源码不加密。

关于使用方法,最好看书《证券混沌操作法》里面说的非常详细,权威。

Y:=(HIGH+CLOSE+LOW)/3;吻线:REF(SMA(Y,5,1),3),COLORGREEN;齿线:REF(SMA(Y,8,1),5),COLORRED;颚线:REF(SMA(Y,13,1),8),COLORBLUE;VAR2:=H>=REF(H,1)&&H>=REF(H,2)&&H>REFX(H,1)&&H>REFX(H,2);VAR3:=L<=REF(L,1)&&L<=REF(L,2)&&L<REFX(L,1)&&L<REFX(L,2);DRAWICON(VAR2,1.02*HIGH,1);DRAWICON(VAR3,0.98*LOW,2);MA55:=MA(CLOSE,55);☆上升:IF(MA55>REF(MA55,1),MA55,DRAWNULL),COLORMAGENTA;★下降:IF(MA55<REF(MA55,1),MA55,DRAWNULL),COLORWHITE;AO:=SMA(Y,5,1)-SMA(Y,34,1);AC:=SMA((AO-SMA(AO,5,1)),5,1);VAR4:=AO>REF(AO,1) AND AC>REF(AC,1);VAR5:=AO<REF(AO,1) AND AC<REF(AC,1);VAR6:=AO>=REF(AO,1) AND AC<=REF(AC,1);VAR7:=AO<=REF(AO,1) AND AC>=REF(AC,1);STICKLINE(VAR4, H,L,0,1),COLORRED;STICKLINE(VAR4 AND C>=O,O,C,2.5,1),COLORRED;STICKLINE(VAR4 AND C<O,O,C,2.5,1),COLORRED;STICKLINE(VAR4 AND C<O,O,C,2.5,0),COLORRED;STICKLINE(VAR5, H,L,0,1),COLORGREEN;STICKLINE(VAR5 AND C>=O,O,C,2.5,1),COLORGREEN;STICKLINE(VAR5 AND C<O,O,C,2.5,1),COLORGREEN;STICKLINE(VAR5 AND C<O,O,C,2.5,0),COLORGREEN;STICKLINE(VAR6 OR VAR7, H,L,0,1),COLORLIGRAY; STICKLINE(VAR6 OR VAR7 AND C>=O,C,O,2.5,1),COLORLIGRAY; STICKLINE(VAR6 OR VAR7 AND C<O,C,O,2.5,1),COLORLIGRAY; STICKLINE(VAR6 OR VAR7 AND C<O,C,O,2.5,0),COLORLIGRAY;。

最新版通达信指标公式教程

最新版通达信指标公式教程

第一章公式教程简介公式编写规则公式编写实例系统函数说明常用技术指标选股第1节简介TDX的公式系统是一套功能强大、使用简单的计算机描述系统。

用户可以通过对每日深沪两地交易所和历史上发送的行情数据按照简单的运算法则进行分析、选股、测试,在TDX当中一共提供了四大类公式编辑器:1.1技术指标公式编辑器技术指标公式即通常所说画线指标,此类公式的主要目的是通过对数据采取一定的运算,将输出结果直观的显现在分析图上,为投资者提供研判行情的基本依据。

此类指标至少要有一条输出线,本系统允许最多6条的输出线。

技术指标公式编辑器实现对技术图表分析中各类技术指标和自我定义的技术分析指标的编写,并且通过TDX的分析界面形成图表、曲线,以方便和寻找有意义的技术图形和技术特征。

1.2条件选股公式编辑器也就是通常意义上解释的智能选股。

但我们的目的在于建立一个完全开放、自由的选股平台,可以通过对该平台的熟练使用,借助计算机的高速和准确的检索功能寻找满足您的理解的股票形态和技术特征,作到先知先觉,快人一步!并且提供相应的同样开放式的结果检测报告。

1.3五彩K线公式编辑器准确讲,该编辑器的功能是附属于条件选股功能之上的,我们可以通过该功能将满足条件的连续K线形态赋予颜色,区别了其它的K线。

条件选股公式与五彩K线公式的区别:条件选股公式和五彩K线公式都有且仅有一个输出,其目的都是为投资者提供买入或卖出点的指示,不同之处在于:条件选股公式仅对最近数据提示买入或卖出,而五彩K线公式则对输入的所有历史数据进行提示。

另外,五彩K线公式的输出是在K线图上,通过各种颜色对提示数据进行标识,条件选股公式的输出是找出符合最近条件的所有股票。

1.4交易系统公式编辑器交易系统公式是通过设定买入和卖出点(有且仅有这两个输出),由计算机进行模拟操作。

以此为依据,系统一方面可以进行五彩K线公式的功能,同时提示买入和卖出;另一方面可以通过模拟操作,对指标买卖的收益、指标的最佳参数及最佳指标等各情形进行测试。

操盘专用系统通达信指标公式源码

操盘专用系统通达信指标公式源码

参数:显示仪表盘1 0 1 1短线5日:EMA(C,5),COLOR00FF00,LINETHICK1;红升5:IF(短线5日>REF(短线5日,1),短线5日,DRAWNULL),COLORFFFFFF,LINETHICK2; 绿降5:IF(短线5日<REF(短线5日,1),短线5日,DRAWNULL)DOTLINE,COLORFFFFFF,LINETHICK1;短线13日:EMA(C,13),COLOR00FF00,LINETHICK1;升:IF(短线13日>REF(短线13日,1),短线13日,DRAWNULL),COLOR00E8E8,LINETHICK2; 降:IF(短线13日<REF(短线13日,1),短线13日,DRAWNULL)DOTLINE,COLOR00FFFF,LINETHICK1;操作线21日:EMA(C,21),COLOR00FF00,LINETHICK1;红升:IF(操作线21日>REF(操作线21日,1),操作线21日,DRAWNULL),COLOR0000FF,LINETHICK3;绿降:IF(操作线21日<REF(操作线21日,1),操作线21日,DRAWNULL)DOTLINE,COLOR00FF00,LINETHICK3;生命线62日:EMA(C,62),COLORYELLOW,LINETHICK1,NODRAW;红升4:IF(生命线62日>REF(生命线62日,1),生命线62日,DRAWNULL),COLORFF00FF,LINETHICK2;绿降4:IF(生命线62日<REF(生命线62日,1),生命线62日,DRAWNULL),COLORFF00FF,DOTLINE;趋势线半年:EMA(C,120),COLORYELLOW,LINETHICK1,NODRAW;半年红升:IF(趋势线半年>REF(趋势线半年,1),趋势线半年,DRAWNULL)POINTDOT,COLOR0000BF,LINETHICK4;半年绿降:IF(趋势线半年<REF(趋势线半年,1),趋势线半年,DRAWNULL),COLOR0000BF,POINTDOT;年线:EMA(C,250),COLORYELLOW,LINETHICK1,NODRAW;年红升:IF(年线>REF(年线,1),年线,DRAWNULL),COLORFF0000,LINETHICK1;年绿降:IF(年线<REF(年线,1),年线,DRAWNULL),COLORFF0000,DOTLINE,LINETHICK1;R1:=(C+L+H)/3;R2:=EMA(R1,6);R3:=EMA(R2,5);N:=5;M1:=6;M2:=6;M3:=8;R:=IF(DATE<1910612,1,0);EE:=(H+MAX(C,O))/2;EE1:=MA(EE,3);EE2:=(L+MIN(C,O))/2;EE3:=MA(EE2,3);超短线3日:MA(EE,3),COLOR00FF00;红升1:IF(超短线3日>REF(超短线3日,1),超短线3日,DRAWNULL),COLOR8EB3FF,LINETHICK2;绿降1:IF(超短线3日<REF(超短线3日,1),超短线3日,DRAWNULL),COLOR8EB3FF,LINETHICK1,DOTLINE;FF:=(H+L+C+O)/4,COLORWHITE;FF1:=MA(FF,3),COLORGREEN;FF3:=REF((C+O)/2,1)>REF((C+O)/2,2) AND REF(MIN(C,O),1)>REF(MAX(C,O),2);实际乖离:=(MAX(FF,FF1)-MIN(FF,FF1))/MIN(FF,FF1)*100,LINETHICK;FF4:=(((FF1-(REF(FF1,1)-FF1))-L)/L)*100;FF5:=(((EE1+(EE1-REF(EE1,1)))-L)/L)*100;FF6:=FF1-(REF(FF1,1)-FF1);FF7:=EE1+(EE1-REF(EE1,1));期望获利率:=IF(FF3,FF5,FF4),LINETHICK;YY1:=REF(EVERY(C>=O,4),1) AND REF(EVERY((C+O)/2>FF1,4),1) AND (C+O)/2<FF1; YY2:=NOT(YY1) AND (FF1-O)/O*1000>5 AND O<REF(MIN(C,O),1);A:=SMA(L,4,3);B:=SMA(H,4,3);BB:=SMA(MIN(C,O),4,3);BB1:=REF(L,1)-HHV((MAX(REF(L,2),REF(L,1))-MIN(REF(L,2),REF(L,1))),2);BB2:=REF((C+O)/2,1)>REF((C+O)/2,2);BB3:=L<=BB1+BB1*0.01 AND O>REF(O,2) AND O>=REF(L,3) AND COUNT(C>O,7)>3; BB6:=(BB1-L)/L*100;BB7:=(REF(L,1)-BB1)/BB1*100;A1:=(A-L)/L>N/1000 ;A8:=A1;A9:=(REF(H,1)-O)/O*100-(REF(MAX(C,O),2)-REF(MAX(C,O),1))/REF(MAX(C,O),1)*100; A10:=IF(BB2,BB6,A9);BB4:=BB6+A10>2;BB5:=IF(BB2,BB3,BB4) AND 期望获利率>2;D5:=R AND A8 AND BB5;STICKLINE(D5,A*0.995,A*0.992,3,0)COLOR00FFFF;DRAWICON(R AND (REF((D5),1)) AND (L<REF((L/0.995),1)),L*0.97,23); STICKLINE(C>=O,C,O,3.4,0),COLOR0000AA;STICKLINE(C>=O,C,O,3.0,0),COLOR0000BB ;STICKLINE(C>=O,C,O,2.4,0),COLOR0000CC;STICKLINE(C>=O,C,O,2.0,0),COLOR0000DD ;STICKLINE(C>=O,C,O,1.6,0),COLOR0000EE;STICKLINE(C>=O,C,O,1.2,0),COLOR0000FF;STICKLINE(C>=O,C,O,0.6,0),COLOR0000FF;STICKLINE(C>=O,H,L,0,0),COLORRED;STICKLINE(C<=O,C,O,3.4,0),COLORAAAA00;STICKLINE(C<=O,C,O,3.0,0),COLORBBBB00;STICKLINE(C<=O,C,O,2.4,0),COLORCCCC00;STICKLINE(C<=O,C,O,2.0,0),COLORDDDD00;STICKLINE(C<=O,C,O,1.6,0),COLOREEEE00;STICKLINE(C<=O,C,O,1.2,0),COLORFFFF00;STICKLINE(C<=O,C,O,0.6,0),COLORFFFF00;STICKLINE(C<=O,H,L,0,0),COLORFFFF00;{===================================================== =}范围高A:=REFDATE(HHV(H,120),DATE)*1.05;范围低A:=REFDATE(LLV(L,120),DATE)*0.95;MA5:=MA(C,5),COLORCYAN,LINETHICK2;MA24:=MA(C,24),COLORGREEN,LINETHICK2;MA72:=MA(C,72),COLORRED,LINETHICK2;MA200:=IF((MA(C,200)<=范围高A AND MA(C,200)>=范围低A) ORC>=MA(C,200),MA(C,200),DRAWNULL),COLORBLUE,LINETHICK2;{=======================仪表盘=========================} 主升浪:=ISLASTBAR AND MA5>MA24 AND MA24>MA72 ANDMA72>IF(MA200=DRAWNULL,0,MA200);主浪回调:=ISLASTBAR AND MA24>MA5 AND MA5>MA72 ANDMA72>IF(MA200=DRAWNULL,0,MA200);主浪深调:=ISLASTBAR AND MA24>MA72 AND MA72>MA5 ANDMA5>IF(MA200=DRAWNULL,0,MA200);初升浪:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MAX(MA24,MA72) AND MA5>MA24 AND MA24>MA72;底部反弹:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 ANDMA72>MA24 AND MA5>MA24;探底阶段:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 ANDMA72>MA24 AND MA24>MA5;观望:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24>MA72 AND C<MA72,MA72>MA200 AND C<MA200);有牛:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 ANDC>=MA72,MA72<MA200 AND C>=MA200);放弃:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 AND C<MA72,MA72<MA200 AND C<MA200);DRAWGBK(显示仪表盘1=1 AND 主升浪=0 AND 主浪回调=0 AND 主浪深调=0 AND 初升浪=0 AND 底部反弹=0 AND 探底阶段=0 AND 观望=0 AND 有牛=0 AND 放弃=0,0,0,0,'观望',0)COLOR00BF00;DRAWGBK(显示仪表盘1=1 AND 主升浪,0,0,0,'主升浪',0)COLORFF00FF;DRAWGBK(显示仪表盘1=1 AND 主浪回调,0,0,0,'主浪回调',0)COLORFF8080; DRAWGBK(显示仪表盘1=1 AND 主浪深调,0,0,0,'主浪深调',0)COLOR009500; DRAWGBK(显示仪表盘1=1 AND 初升浪,0,0,0,'初升浪',0)COLOR00FFFF;DRAWGBK(显示仪表盘1=1 AND 底部反弹,0,0,0,'底部反弹',0)COLORFFFF00; DRAWGBK(显示仪表盘1=1 AND 探底阶段,0,0,0,'探底阶段',0);DRAWGBK(显示仪表盘1=1 AND 观望,0,0,0,'观望',0)COLORFFFF00;DRAWGBK(显示仪表盘1=1 AND 有牛,0,0,0,'有牛',0)COLOR00FFFF;DRAWGBK(显示仪表盘1=1 AND 放弃,0,0,0,'放弃',0)COLOR00BF00;引差:=REF(C,1)-LOW,LINETHICK1,NODRAW;引跌幅:IF((REF(C,1)-LOW)/REF(C,1)*100>0,(REF(C,1)-LOW)/REF(C,1)*100,0),LINETHICK1,N ODRAW;三日均跌:MA(引跌幅,3),COLORWHITE,NODRAW;今最高:HIGH,LINETHICK1,COLORRED,NODRAW;今最低:LOW,LINETHICK1,COLORGREEN,NODRAW;Z0T:=C/REF(C,1)>1.097;XH:=FILTER(Z0T,13);BH:=BARSLAST(Z0T);CZ:=REF(H,BH)-REF(L,BH);STICKLINE(Z0T,REF(O,BH),REF(C,BH),5,0),COLORYELLOW;DRAWTEXT(Z0T,L*0.98,'★涨停'),COLORFFFFFF;AAA:=CONST(HHV(H,50));PL5:=HHV(H,45);F:=100*(C-REF(C,1))/REF(C,1);博尔:=IF(C<REF(O,1) AND F<0,1,0);P1:=博尔;量化:=IF(C<REF(O,2) AND F<0,1,0);P2:=量化;STICKLINE(P1=0 AND REF(P1,1)=1 AND P2=0 ANDREF(P2,1)=1,OPEN,CLOSE,3,0),COLORFF09FF;ME2:=EMA(CLOSE,6);五天:=EXPMA(CLOSE,5),COLORRED;超短线:=EMA(ME2,11),COLORGREEN; LJL07:=(3*C+L+O+H)/6;牛线:=(20*LJL07+19*REF(LJL07,1)+18*REF(LJL07,2)+17*REF(LJL07,3)+16*REF(LJL07,4) +15*REF(LJL07,5)+14*REF(LJL07,6)+13*REF(LJL07,7)+12*REF(LJL07,8)+11*REF(LJL0 7,9)+10*REF(LJL07,10)+9*REF(LJL07,11)+8*REF(LJL07,12)+7*REF(LJL07,13)+6*REF(L JL07,14)+5*REF(LJL07,15)+4*REF(LJL07,16)+3*REF(LJL07,17)+2*REF(LJL07,18)+REF( LJL07,20))/210,COLORRED;熊线:=MA(牛线,5),COLORYELLOW,LINETHICK4,POINTDOT;持股:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4,COLORWHITE; {趋势}赚了:=IF(EMA(CLOSE,3)>超短线,超短线,DRAWNULL),COLORRED;持股角度:=ATAN((持股/REF(持股,1)-1)*100)*180/3.1416,COLORRED,NODRAW;月线:=EMA(持股,30),COLORYELLOW,DOTLINE;双月线:=EMA(持股,60),COLORCYAN,DOTLINE;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("DMI.PDI">"DMI.MDI") ANDUPNDAY("DMI.ADXR",1) AND ("DMI.ADX">"DMI.ADXR"),0.460,0.26,0,'DMI 火箭升空'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("DMI.PDI"<"DMI.MDI") ANDUPNDAY("DMI.ADXR",1) AND ("DMI.ADX">"DMI.ADXR"),0.460,0.26,0,'DMI 空中炸弹'),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("DMI.PDI">"DMI.MDI"),0.460,0.21,0,'DMI 多头趋势'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("DMI.PDI"<"DMI.MDI"),0.460,0.21,0,'DMI 空头趋势'),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CROSS("KDJ.J","KDJ.K"),0.460,0.31,0,'K D J 金叉'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CROSS("KDJ.K","KDJ.J"),0.460,0.31,0,'K D J死叉'),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("KDJ.J">"KDJ.K"),0.460,0.36,0,'K D J 多头趋势'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("KDJ.J"<"KDJ.K"),0.460,0.36,0,'K D J 空头趋势'),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("MACD.DIF">"MACD.DEA") AND "MACD.MACD">0,0.460,0.41,0,'MACD 中线看多'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("MACD.DIF"<"MACD.DEA") AND "MACD.MACD"<0,0.460,0.41,0,'MACD 中线看空'),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND("MACD.DIF">"MACD.DEA"),0.460,0.46,0,'MACD 多头趋势'),COLOR8080FF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND("MACD.DIF"<"MACD.DEA"),0.460,0.46,0,'MACD 空头趋势'),COLORGREEN; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDCROSS("MACD.DIF","MACD.DEA"),0.460,0.51,0,'MACD 金叉'),COLOR8080FF; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDCROSS("MACD.DEA","MACD.DIF"),0.460,0.51,0,'MACD 死叉'),COLORGREEN;上涨:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 上涨,0.460,0.15,0,'上涨趋势'),COLORFF00FF;短线上涨:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);短线上涨0:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);短线上涨1:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线上涨OR 短线上涨0 OR 短线上涨1),0.460,0.15,0,'短线上涨'),COLOR8080FF;短线回调:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);短线回调0:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线回调OR 短线回调0),0.460,0.15,0,'短线回调'),COLORYELLOW;短线看空:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1);短线看空0:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1)AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1);短线空仓:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND DOWNNDAY(月线,1) AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1);短线空仓0:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1);DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线空仓OR 短线空仓0 OR 短线看空OR 短线看空0),0.460,0.15,0,'短线空仓'),COLORYELLOW;短线震荡:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);短线震荡0:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);短线震荡1:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);注意该股:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND DOWNNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线震荡OR 短线震荡0 OR 短线震荡1 OR 注意该股),0.460,0.15,0,'短线震荡'),COLORYELLOW;短线反弹:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);短线反弹0:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线反弹OR 短线反弹0),0.460,0.15,0,'短线反弹'),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1 ,0.360,0.09,0,'★---今日操作提示---★')COLOR95B8FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("MACD.MACD">0) AND(CROSS("MACD.DIF","MACD.DEA") OR CROSS(持股,超短线)) AND UPNDAY(超短线,1),0.55,0.09,0,' 决策:中线全仓买入'),COLOR95B8FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("MACD.MACD"<0) AND(CROSS("MACD.DEA","MACD.DIF") OR CROSS(超短线,持股)) AND DOWNNDAY(超短线,1),0.55,0.09,0,' 决策:中线空仓'),COLOR95B8FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1),0.55,0.09,0,' 决策:短线空(减) 仓【关注:阴线买、V 转、止跌买信号】'),COLOR95B8FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1),0.55,0.09,0,' 决策:短线买入30 %'),COLOR95B8FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND UPNDAY(超短线,1) AND UPNDAY(持股,1),0.55,0.09,0,' 决策:短线买入60 %'),COLOR95B8FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1),0.55,0.09,0,' 决策:短线震荡看看再说【关注:阴线买信号】'),COLOR95B8FF;DRAWICON(CROSS(MA(C,3),C),H,15);DRAWTEXT_FIX(ISLASTBAR,0.1,0.05,0,HYBLOCK)COLOR80FFFF;DRAWTEXT_FIX(ISLASTBAR,0.1,0,0,DYBLOCK)COLOR80FFFF;DRAWTEXT_FIX(ISLASTBAR,0.55,0.85,0,GNBLOCK)COLOR80FFFF;DRAWTEXT_FIX(ISLASTBAR,0.55,0.90,0,FGBLOCK)COLOR80FFFF;DRAWTEXT_FIX(ISLASTBAR,0.55,0.95,0,ZSBLOCK)COLOR80FFFF;止损:=REF(HHV(H,13),1)*0.95,COLORGRAY,DOTLINE;STICKLINE(CURRBARSCOUNT=1,止损,止损,40,-1),COLORGREEN;DRAWTEXT(CURRBARSCOUNT=1,止损*0.995,'破止损'),COLORFFFF00;MAA10:=MA(CLOSE,10),COLORYELLOW,LINETHICK0;MAA54:=MA(CLOSE,54),COLORFFCCCC,LINETHICK0;PL1:=(((CLOSE - MAA54) / MAA54) < 0.1);PL2:=(((CLOSE - MAA10) / MAA10) < 0.3); 偏离率:=(((PL1 = 1) AND (PL2 = 1)) * 0.2);突破加仓:=((((偏离率= 0) AND (REF(偏离率,1) = 0.2)) AND (REF((COUNT((偏离率= 0.2),10) = 10),1) = 1)) * 1);DRAWTEXT(突破加仓,L,'----------突破加仓'),COLORFFFFFF;。

通达信极品公式三合一主图源码

通达信极品公式三合一主图源码

通达信极品公式三合一主图源码通达信极品公式三合一主图源码享一高人的极品公式。

用法:柱状线:出现灰色柱子代表即将调整。

底部柱状线出现浅紫色代表可以进场。

MACD:这个macd比传统的超前,MACD分为红蓝两色。

庄家抬轿柱子:简单的说出现高度控盘是我们可以放心持股。

这三个指标融合在一起最主要的还是看柱状线,柱状线原理是量价关系,柱状线出现灰色最好减仓。

觉得好用的给我点果果吧{公式在线提供:}C/C++ Code复制内容到剪贴板1.JH:=VOL*CLOSE;2.JHO:=SUM(JH,2)/SUM(VOL,2);3.JH0:=EMA(JHO,10);4.AAA:=(JHO-JH0)*20/JHO;5.超:=STICKLINE(AAA>0 AND AAA>=REF(AAA,1),0,AAA,3,0 ),COLORLIRED;6.级:=STICKLINE(AAA>0 AND AAA<REF(AAA,1),0,AAA,3,1), COLORLIRED;7.好:=STICKLINE(AAA<0 AND AAA>=REF(AAA,1),0,AAA,3,1 ),COLORGREEN;8.的:=STICKLINE(AAA<0 AND AAA<REF(AAA,1),0,AAA,3,0), COLORGREEN;9.公:=EMA(IF(AAA>0 AND AAA<REF(AAA,1),0,AAA),3);10.式:=CROSS(REF(公,1),公) AND 公>0;11.谢:=EMA(IF(AAA<0 AND AAA<REF(AAA,1),0,AAA),3);12.了:=CROSS(REF(谢,1),谢) AND 谢<0;13.必买:=CROSS(C,DRAWLINE(HIGH>=HHV(HIGH,30),HIGH,LOW<=L LV(LOW,10),HHV(HIGH,6),1));14.WY1001:=(2*CLOSE+HIGH+LOW)/4;15.WY1002:=EMA(WY1001,4);16.WY1003:=EMA(WY1002,4);17.WY1004:=EMA(WY1003,4);18.X:=(WY1004-REF(WY1004,1))/REF(WY1004,1)*2000;19.X1:=IF(X<REF(X,1),X,DRAWNULL),COLORWHITE,LINET HICK2;20.XO:=MA(X,2),COLOR9932CD;21.SI:=REF(X,1);22.STICKLINE(X>SI,X,SI,2.3,0),COLOR0000FF;23.STICKLINE(X>SI,X,SI,0.3,0),COLORCC66FF;24.STICKLINE(X<SI,X,SI,2.3,0),COLOR00BB00;25.STICKLINE(X<SI,X,SI,0.3,0),COLOR00FF00;26.STICKLINE(式,X,SI,2.15,0),COLOR545454;27.STICKLINE(了,X,SI,2.15,0),COLORDB7093;28.29.VAR1:=EMA(EMA(CLOSE,9),9);30.控盘:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;31.STICKLINE(控盘<0,控盘,0,3,0),COLORWHITE;32.AA1:=CROSS(控盘,0);33.无庄控盘:IF(控盘<0,控盘,0),COLORWHITE,NODRAW;34.轻度控盘:STICKLINE(控盘<0 AND 0.9*控盘>REF(控盘,1),控盘,0,3,0),COLORYELLOW;35.轻度出货:STICKLINE(控盘<0 AND 1.1*控盘<REF(控盘,1),控盘,0,3,0),COLORFFFF79;36.开始控盘:=IF(AA1,5,0),LINETHICK1,COLORYELLOW;37.38.有庄控盘:IF(控盘>REF(控盘,1) AND 控盘>0,控盘,0),COLORRED,NODRAW;39.STICKLINE(控盘>REF(控盘,1) AND 控盘>0,控盘,0,3,0),COLORRED;40.41.VAR2:=100*WINNER(CLOSE*0.95);42.高度控盘:IF(VAR2>50 AND COST(85)<CLOSE AND 控盘>0,控盘,0),COLORFF00FF,NODRAW;43.STICKLINE(VAR2>50 AND COST(85)<CLOSE AND 控盘>0,控盘,0,3,0),COLORFF00FF;44.主力出货:IF(控盘<REF(控盘,1) AND 控盘>0,控盘,0),COLOR00FF00,NODRAW;45.STICKLINE(控盘<1.2*REF(控盘,1) AND 控盘>0,控盘,0,3,0),COLOR00FF00;46.DIF1:=EMA(DCLOSE,12)-EMA(DCLOSE,26);47.DEA1:=EMA(DIF1,9);48.{柱状线}49.MACD1:=(DIF1-DEA1)*2*60;50.MACD上:IF(MACD1>REF(MACD1,1),MACD1,DRAWNULL),51.STICK,COLORRED,LINETHICK1;52.MACD下:IF(MACD1<REF(MACD1,1),MACD1,DRAWNULL),53.STICK,COLORFF9900,LINETHICK1;54.{买点提示}55.A1:=BARSLAST(REF(CROSS(DIF1,DEA1),1));56.BL:=REF(CLOSE,A1+1)>CLOSE AND DIF1>REF(DIF1,A1 +1) AND CROSS(DIF1,DEA1);57.{STICKLINE(BL,0,1,2,0),COLOR00FF00;}58.买点:DRAWICON(BL,DEA1,23);59.A2:=BARSLAST(REF(CROSS(DEA1,DIF1),1));60.DBL:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF1,A2+1) >DIF1 AND CROSS(DEA1,DIF1);61.买点1:DRAWICON(DBL,DEA1,12);62.低位金叉:=CROSS(DIF1,DEA1) AND DIF1<-0.1;63.DRAWTEXT(低位金叉,-0.36,' 低位金叉');64.JCCOUNT:=COUNT(CROSS(DIF1,DEA1),BARSLAST(DEA 1>=0));65.二次金叉:=CROSS(DIF1,DEA1) AND DEA1<0 AND COUNT(JCCOUNT=2 ,21)=1;66.DRAWICON(二次金叉,DEA1*1.04,13) ;67.DRAWTEXT(二次金叉,-0.22,' 二次金叉'),COLORFF00FF;68.A10:=BARSLAST(REF(CROSS(DIF1,DEA1),1));69.底背离:=REF(CLOSE,A10+1)>CLOSE AND DIF1>REF(DIF1,A10+1) AND CROSS(DIF1,DEA1);70.DRAWLINE(A10=0,DEA1,底背离,DEA1,0),COLORRED,LINETHICK2;71.DRAWTEXT(底背离,-0.50,' 底背离'),COLOR00FF00;72.A20:=BARSLAST(REF(CROSS(DEA1,DIF1),1));73.顶背离:=REF(CLOSE,A20+1)<CLOSE AND REF(DIF1,A20+1)>DIF1 AND CROSS(DEA1,DIF1);74.DRAWLINE(A20=0,DEA1,顶背离,DEA1,0),COLORWHITE,LINETHICK2;75.{STICKLINE(底背离,X,SI,1,0),COLORYELLOW;}76.STICKLINE(低位金叉,X,SI,1,0),COLORWHITE;77.STICKLINE(必买,X,(X+SI)/2,2.3,0),COLORFF9900;78.STICKLINE(必买,X,(X+SI)/2,0.1,0),COLORWHITE;79.STICKLINE(低位金叉 AND 底背离,X,(X+SI)/2,2.3,0),COLORYELLOW;80.STICKLINE(低位金叉 AND 底背离,X,(X+SI)/2,0.1,0),COLORCC66FF;81.STICKLINE(二次金叉,X,SI,2.0,0),COLORYELLOW;82.{主力进场}83.VAR12:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);84.VAR13:=SMA(ABS(LOW-VAR12),13,1)/SMA(MAX(LOW-VAR12,0),10,1);85.VAR14:=EMA(VAR13,10);86.VAR15:=LLV(LOW,33);87.VAR16:=EMA(IF(LOW<=VAR15,VAR14,0),3);88.主力进场:=IF(VAR16>REF(VAR16,1),VAR16,0),COLORRED,NODRAW;89.STICKLINE(主力进场,X,SI,0.1,0),COLORRED;90.RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;91.K:=SMA(RSV,3,1),COLORWHITE;92.D:=SMA(K,3,1),COLORYELLOW;93.J:=3*K-2*D,COLORFF00FF;94.X3:=LLV(J,2)=LLV(J,8);95.A:=250;96.JH1:=HHV(MAX(K,MAX(D,J)),A);97.DH:=HHV(MAX(DIF1,DEA1),A);98.SH:=INTPART(JH1/DH)/2;99.DIFF50:=SH*DIF1+50,COLORFFFF00;100.DEA50:=SH*DEA1+50,COLORBLUE;101.诱空:=IF(1.5*(DIFF50-DEA50)>0 AND REF(1.5*(DIFF50-DEA50),1)< REF(1.5*(DIFF50-DEA50),2) AND 1.5*(DIFF50-DEA50)>REF(1.5*(DIFF50-DEA50),1),1,0);102.低位:=CROSS(J,REF(J+0.01,1)) AND X3 AND J<19;103.MTM:=C-REF(C,1);104.DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);105.值:=LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND C ROSS(DX,MA(DX,2));106.DRAWTEXT(FILTER(诱空,3) AND 诱空,X,'洗盘'),COLOR00FF00;。

MACD交易系统通达信指标公式源码

MACD交易系统通达信指标公式源码

1.股价高于平均线,视为强势;股价低于平均线,视为弱势2.平均线向上涨升,具有助涨力道;平均线向下跌降,具有助跌力道;3.二条以上平均线向上交叉时,买进;4.二条以上平均线向下交叉时,卖出;5.移动平均线的信号经常落后股价,若以EXPMA 、VMA 辅助,可以改善。

总涨跌比:=DYNAINFO(60)/(DYNAINFO(60)+DYNAINFO(61))*100,COLORCYAN,NODRAW; DRAWTEXT_FIX(1,0.2,0.0,0,STRCAT('总涨跌比: ',CON2STR(总涨跌比,2))),COLORCYAN; DRAWTEXT_FIX(ISLASTBAR,0.005,0,0,STRCAT('主营同比:',CON2STR(FINANCE(44),2))),COLORGREEN;DRAWTEXT_FIX(ISLASTBAR,0.005,0.06,0,STRCAT('利润同比:',CON2STR(FINANCE(43),2))),COLORGREEN;SBL:= STRCAT(STRCAT(STRCAT(HYBLOCK,DYBLOCK),GNBLOCK),ZDBLOCK); DRAWTEXT_FIX(1,0.4,0,0,SBL),COLOR0090FF;DIF:=EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);DEA:=EMA(DIF,M);MACD:=2*(DIF-DEA);KK:=IF(DIF>DEA,5,-5);JCSC:=(M-1)/(M+1)*DEA/(1-2/(M+1));{计算出金叉死叉时的DIFF值}DD:=(MACD/2+(DEA*(M-1)/(M+1)))/(1-2/(M+1));{计算出明日MACD=MACD时的DIFF 值}DIF拐头价:(DIF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(L ONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1)))COLORGREEN,LINETHICK1,POINTD OT;金死叉价:(JCSC*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*( LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),NODRAW;柱变向价:=(DD*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*( LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),COLORYELLOW,POINTDOT;黄铢消失见顶:=IF(柱变向价>=DIF拐头价,柱变向价,DRAWNULL),COLORYELLOW,CIRCLEDOT,LINETHICK1;拐头价:IF(DIF拐头价<柱变向价,DIF拐头价,DRAWNULL), COLORRED,LINETHICK4; DRAWNUMBER(DIF<DEA,DIF拐头价,BARSLAST(CROSS(DEA,DIF))+1),COLORCYAN,NODRAW;DRAWNUMBER(DIF>DEA,DIF拐头价,BARSLAST(CROSS(DIF,DEA))+1),COLORWHITE,NODRAW;ZJ:拐头价,COLOR0000FF;HY:=金死叉价,COLORFF00FF;IF(ZJ > REF(ZJ,1),ZJ,DRAWNULL),COLORRED,LINETHICK2;IF(ZJ < REF(ZJ,1),ZJ,DRAWNULL),COLORGREEN,LINETHICK2;IF(HY > REF(HY,1),HY,DRAWNULL),COLORMAGENTA,LINETHICK2,NODRAW;IF(HY < REF(HY,1),HY,DRAWNULL),COLORBLUE,LINETHICK2,NODRAW; STICKLINE(C>ZJ AND C>O,H,C,0,0 ),COLORRED;STICKLINE(C>ZJ AND C>O,L,O,0,0 ),COLORRED;STICKLINE(C>ZJ AND C>O,O,C,2.8,1),COLORRED;STICKLINE(C>ZJ AND C<=O,H,L,0,0 ),COLORRED;STICKLINE(C>ZJ AND C<=O,O,C,2.8,0),COLORRED;STICKLINE(CLOSE = ZJ,H,L,3,0),COLORWHITE;STICKLINE(CLOSE < ZJ,H,L,0,0),COLORYELLOW;STICKLINE(CLOSE < ZJ,O,C,2.5,0),COLORYELLOW;STICKLINE(C<HY AND C>O,H,C,0,0),COLORCYAN;STICKLINE(C<HY AND C>O,O,L,0,0),COLORCYAN;STICKLINE(C<HY AND C>O,O,C,2.8,1),COLORCYAN;STICKLINE(C<HY AND C<=O,H,L,0,0),COLORCYAN;STICKLINE(C<HY AND C<=O,O,C,2.8,0),COLORCYAN;HD0:=CROSS(DIF,DEA);金收:REF(L,BARSLAST(HD0)),COLORYELLOW,DOTLINE;DRAWNUMBER(ISLASTBAR,金收,金收),COLORCYAN;LD0:=CROSS(DEA,DIF);死收:REF(H,BARSLAST(LD0)),COLOR00FF00,DOTLINE;{分时中的收盘标记}IF(HOUR=15,H*1.008,DRAWNULL),POINTDOT,COLORFFFAAA,LINETHICK9; IF(HOUR=15,H*1.008,DRAWNULL),POINTDOT,COLOR000FFF,LINETHICK5; HSL:=V/CAPITAL*100;DRAWNUMBER(CURRBARSCOUNT=1 AND HSL,C,HSL),COLOR00FFFF;分时均价:AMOUNT/VOL/100,COLORWHITE,NODRAW;。

最新版通达信指标公式教程

最新版通达信指标公式教程

第一章公式教程简介公式编写规则公式编写实例系统函数说明常用技术指标选股第1节简介TDX的公式系统是一套功能强大、使用简单的计算机描述系统。

用户可以通过对每日深沪两地交易所和历史上发送的行情数据按照简单的运算法则进行分析、选股、测试,在TDX当中一共提供了四大类公式编辑器:1.1技术指标公式编辑器技术指标公式即通常所说画线指标,此类公式的主要目的是通过对数据采取一定的运算,将输出结果直观的显现在分析图上,为投资者提供研判行情的基本依据。

此类指标至少要有一条输出线,本系统允许最多6条的输出线。

技术指标公式编辑器实现对技术图表分析中各类技术指标和自我定义的技术分析指标的编写,并且通过TDX的分析界面形成图表、曲线,以方便和寻找有意义的技术图形和技术特征。

1.2条件选股公式编辑器也就是通常意义上解释的智能选股。

但我们的目的在于建立一个完全开放、自由的选股平台,可以通过对该平台的熟练使用,借助计算机的高速和准确的检索功能寻找满足您的理解的股票形态和技术特征,作到先知先觉,快人一步!并且提供相应的同样开放式的结果检测报告。

1.3五彩K线公式编辑器准确讲,该编辑器的功能是附属于条件选股功能之上的,我们可以通过该功能将满足条件的连续K线形态赋予颜色,区别了其它的K线。

条件选股公式与五彩K线公式的区别:条件选股公式和五彩K线公式都有且仅有一个输出,其目的都是为投资者提供买入或卖出点的指示,不同之处在于:条件选股公式仅对最近数据提示买入或卖出,而五彩K线公式则对输入的所有历史数据进行提示。

另外,五彩K线公式的输出是在K线图上,通过各种颜色对提示数据进行标识,条件选股公式的输出是找出符合最近条件的所有股票。

1.4交易系统公式编辑器交易系统公式是通过设定买入和卖出点(有且仅有这两个输出),由计算机进行模拟操作。

以此为依据,系统一方面可以进行五彩K线公式的功能,同时提示买入和卖出;另一方面可以通过模拟操作,对指标买卖的收益、指标的最佳参数及最佳指标等各情形进行测试。

通达信指标公式源码主力动向副图(主买主卖副图) 傻买傻卖公式

通达信指标公式源码主力动向副图(主买主卖副图) 傻买傻卖公式

DRAWRECTREL(0,0,400,988,IF(120,RGB(10,0,0),0));超B:=L2_AMO(0,2)/10000.0;大B:=L2_AMO(1,2)/10000.0;中B:=L2_AMO(2,2)/10000.0;小B:=L2_AMO(3,2)/10000.0;超S:=L2_AMO(0,3)/10000.0;大S:=L2_AMO(1,3)/10000.0;中S:=L2_AMO(2,3)/10000.0;小S:=L2_AMO(3,3)/10000.0;主买A:=ACTINVOL,COLORRED,NODRAW;主卖A:=ACTOUTVOL,COLORGREEN,NODRAW;主买:=主买A*100/(主买A+主卖A),NODRAW,COLORRED;主卖:=主卖A*100/(主买A+主卖A),NODRAW,COLORGREEN;SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));【量能饱和】:IF(SAT>1,1,SAT)*100,COLORYELLOW,NODRAW;主力净买量:=(LARGEINTRDVOL-LARGEOUTTRDVOL),COLORYELLOW,NODRAW;大宗净流入:=(超B+大B)-(超S+大S),COLORRED,NODRAW;主动买卖差:=(ACTINVOL-ACTOUTVOL),COLORMAGENTA,NODRAW;主力资金差:=((L2_AMO(0,0)+L2_AMO(1,0)-L2_AMO(0,1)-L2_AMO(1,1)))/10000,COLORCYAN,NO DRAW;DRAWRECTREL(100,0,90+CONST(主买*300/100),40,RGB(230,65,0)); DRAWRECTREL(100,60,90+CONST(主卖*300/100),100,RGB(0,104,0));DRAWRECTREL(100,120,390,160,RGB(0,0,100));DRAWRECTREL(100,120,90+CONST(【量能饱和】*300/100),160,RGB(250,104,0));大单动向:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*10000/FINANCE(7),NODRAW;T1:=IF (大单动向>0 AND REF(大单动向,1)<0,1,0);T2:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)<0,2,T1);T3:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)<0,3,T2);T4:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)<0,4,T3);T5:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)<0,5,T4);T6:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)<0,6,T5); T7:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)>0 AND REF(大单动向,7)<0,7,T6);T8:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)>0 AND REF(大单动向,7)>0 AND REF(大单动向,8)<0,8,T7);T9:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)>0 AND REF(大单动向,7)>0 AND REF(大单动向,8)>0 AND REF(大单动向,9)<0,9,T8);T:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)>0 AND REF(大单动向,7)>0 AND REF(大单动向,8)>0 AND REF(大单动向,9)>0,10,T9);D:=COUNT(大单动向>0,10),NODRAW;DRAWTEXT_FIX(1,0.005,0.01,0,STRCAT(STRCAT('【主买比】: ',CON2STR(主买,1)),' %')),COLORYELLOW;DRAWTEXT_FIX(1,0.005,0.07,0,STRCAT(STRCAT('【主卖比】: ',CON2STR(主卖,1)),' %')),COLORGREEN;DRAWTEXT_FIX(1,0.005,0.13,0,STRCAT(STRCAT('【量能饱和】: ',CON2STR(【量能饱和】,1)),' %')),COLORYELLOW;DRAWTEXT_FIX(1,0.005,0.19,0,STRCAT(STRCAT('【主力资金差】: ',CON2STR(主力资金差,1)),' 万元')),COLORYELLOW;DRAWTEXT_FIX(1,0.2,0.19,0,STRCAT(STRCAT('【大宗净流入】: ',CON2STR(大宗净流入,1)),' 万元')),COLORYELLOW;DRAWTEXT_FIX(1,0.005,0.25,0,STRCAT(STRCAT('【主力净买量】: ',CON2STR(主力净买量,1)),' 手')),COLORYELLOW;DRAWTEXT_FIX(1,0.2,0.25,0,STRCAT(STRCAT('【主动买卖差】: ',CON2STR(主动买卖差,1)),' 手')),COLORYELLOW;DRAWTEXT_FIX(1,0.005,0.31,0,STRCAT(STRCAT('【DDX 连红天数】: ',CON2STR(T,0)),' 天')),COLORYELLOW;DRAWTEXT_FIX(1,0.2,0.31,0,STRCAT(STRCAT('【DDX两周红天数】: ',CON2STR(D,0)),' 天')),COLORYELLOW;PJJ:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4),0.9);JJ:=REF(EMA(PJJ,3),1);QJJ:=(VOL / (((HIGH - LOW) * 2) - ABS((CLOSE - OPEN))));XVL:=(IF((CLOSE > OPEN),(QJJ * (HIGH - LOW)),IF((CLOSE < OPEN),(QJJ * ((HIGH - OPEN) + (CLOSE - LOW))),(VOL / 2))) + IF((CLOSE > OPEN),(0 - (QJJ * ((HIGH - CLOSE) + (OPEN - LOW)))),IF((CLOSE < OPEN),(0 - (QJJ * (HIGH - LOW))),(0 - (VOL / 2))))); ZLL:=(VOL / CAPITAL);HSL1:=IF((ZLL > 10),10,ZLL);HSL:=((XVL / 20) / 1.15);攻击流量:=(((HSL * 0.55) + (REF(HSL,1) * 0.33)) + (REF(HSL,2) * 0.22));GJJ:=EMA(攻击流量,8);LLJX:=EMA(攻击流量,3);STICKLINE(((HSL * 0.4) >= 0),((HSL * 0.4) +LLJX),0,3,0),COLOR00FFFF; STICKLINE(((HSL * 0.4) < 0),((HSL * 0.4) +LLJX),0,3,0),COLOR00FF00;资金流入:=IF((HSL*0.4+LLJX)>0,(HSL*0.4+LLJX),DRAWNULL),COLORRED;资金流出:=IF((HSL*0.4+LLJX)<0,(HSL*0.4+LLJX),DRAWNULL),COLOR00FF00;资金进出:=(HSL*0.4+LLJX),LINETHICK0;万元:=AMOUNT/10000{0000},VOLSTICK,COLORFF00FF;资金净进出:IF((HSL*0.4+LLJX)>0,资金流入,资金流出),COLORWHITE,POINTDOT;进出比例%:IF((HSL*0.4+LLJX)>0,资金流入/万元*100,资金流出/万元*100),COLORYELLOW;连红天1:=BARSLASTCOUNT(资金净进出>0),,COLORA20FFD,NODRAW;连红天2:=IF(连红天1=0,REF(连红天1,1),连红天1),,COLORA20FFD,NODRAW;连红天3:=IF(连红天2=0,REF(连红天1,2),连红天2),,COLORA20FFD,NODRAW;连红天4:=IF(连红天3=0,REF(连红天1,3),连红天3),,COLORA20FFD,NODRAW;近期连红天:IF(连红天4=0,REF(连红天1,4),连红天4),,COLORYELLOW,NODRAW;最多连红天1:=MAX(REF(近期连红天,1),近期连红天),COLORYELLOW,NODRAW;最多连红天2:=MAX(最多连红天1,REF(近期连红天,2)),COLORYELLOW,NODRAW;最多连红天3:=MAX(最多连红天2,REF(近期连红天,3)),COLORYELLOW,NODRAW;最多连红天4:=MAX(最多连红天3,REF(近期连红天,4)),COLORYELLOW,NODRAW;最多连红天5:=MAX(最多连红天4,REF(近期连红天,5)),COLORYELLOW,NODRAW;最多连红天:MAX(最多连红天5,REF(近期连红天,6)),COLORYELLOW,NODRAW;三日资金:SUM(资金进出,3),COLORWHITE,NODRAW;五日资金:SUM(资金进出,5),COLORFF00FF,NODRAW;十日资金:SUM(资金进出,10),COLOR0000FF,NODRAW;资金流量:=LLJX,LINETHICK0,COLOR0000FF;STICKLINE((资金流量> 0),资金流量,0,3,0),COLOR0000FF;STICKLINE((资金流量< 0),资金流量,0,3,0),COLORFF3300;黄柱初出蓝:=REF(资金流出,1)<0 AND 资金流入>30 AND C>O AND C>REF(C,1) AND C>MA(C,3);X:=(3*C+2*L+O+H)/7;多空线:=(20*X+19*REF(X,1)+18*REF(X,2)+17*REF(X,3)+16*REF(X,4)+15*REF(X,5)+14*REF(X,6)+13*REF(X,7)+12*REF(X,8)+11*REF(X,9)+10*REF(X,10)+9*REF(X,11)+8*REF(X,12)+7*REF(X,13)+6*REF(X,14)+5*REF(X,15)+4*REF(X,16)+3*REF(X,17)+2*REF(X,18)+ REF(X,20))/210;长黄柱:= 资金流入>300 AND CROSS(C,多空线);DRAWTEXT(黄柱初出蓝,-30,'★'),COLORFF00FF;DRAWTEXT(长黄柱,((HSL * 0.4) * 1.5)*1.4 ,'★'),COLORRED;ARE4:=MA(C,20); ARE5:=(C>MA(C,5)); ARE6:=(MA(C,5)>MA(C,10)); ARE7:=(C>MA(C,10));ARE8:=(MA(C,5)>MA(C,20)); ARE9:=(C>MA(C,20)); ARE10:=REF(ARE4,1); ARE11:=(ARE4>ARE10);AVX:=(((((IF(ARE5,10,(0-10))+IF(ARE6,10,(0-10)))+IF(ARE7,10,(0-10)))+IF(ARE8,10,(0 -10)))+IF(ARE9,10,(0-10)))+IF(ARE11,10,(0-10)));DSLX:=(C/INDEXC); DSLX1:=MA(DSLX,5); DSLX2:=MA(DSLX,10); VRE1:=MA(V,5); VRE2:=MA(V,10);阻力位:=IF((C>200),(C*1.01),(C*1.07)); 阻力位1:=IF((C<10),(C*1.05),阻力位);止损位:=IF((C>200),(C*0.99),(C*0.93)); 止损位1:=IF((C<10),(C*0.95),止损位); TJTS1:=ISLASTBAR AND C<500; TJTS2:=ISLASTBAR AND C>500;KDAT:=REFDATE(HHV(H,45)/0.097,DATE);{解盘位置}解盘1:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘2:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘3:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 > VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘4:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 <= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘5:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘6:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘7:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 >= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘8:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 < VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘9:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘10:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘11:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 >= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘12:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 < VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘13:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 >=VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘14:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘15:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 >= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘16:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 < VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘17:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 >= VRE2)) ,1,0));解盘18:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 >= VRE2)) ,1,0));解盘19:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 < VRE2)) ,1,0));解盘20:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 < VRE2)) ,1,0));解盘21:=CONST(IF(TJTS2 AND (CROSS(1,AVX) AND (VRE1 >= VRE2)) ,1,0));解盘22:=CONST(IF(TJTS2 AND (CROSS(1,AVX) AND (VRE1 < VRE2)) ,1,0));解盘23:=CONST(IF(TJTS2 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 >= VRE2)) ,1,0));解盘24:=CONST(IF(TJTS2 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 < VRE2)) ,1,0));解盘25:=CONST(IF(TJTS2 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 >= VRE2)) ,1,0));解盘26:=CONST(IF(TJTS2 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 < VRE2)) ,1,0));解盘文字1:=IF(解盘1=1,'该股的量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右',IF(解盘2=1,'该股虽然走势趋强,但量能还显不足,可以考虑短线进场,仓位在1/2左右', IF(解盘3=1,'该股量价配合良好,但相对其它股票并没有明显走强,可以考虑短线进场,仓位1/2左右',IF(解盘4=1,'该股形态尚可,但量能不足,股票也未完全走强,可以短线参与,仓位1/3左右',IF(解盘5=1,'该股形态变坏,但走势相对其它股票尚可,重仓者减持大半,清仓者可以观望',IF(解盘6=1,'该股随大盘一起下跌,程明显缩量走势,考虑到大盘风险,减持或清仓',IF(解盘7=1,'该股放量下跌,走势明显偏弱,离场观望',IF(解盘8=1,'该股缩量下跌,走势偏弱,离场观望',IF(解盘9=1,'该股形态良好,强势明显,量能充足,可以继续持有',IF(解盘10=1,'该股上行趋势不变,强势依然,但量能开始转弱,注意风险',IF(解盘11=1,'该股仍然具备上涨潜力,但股性偏弱,可考虑减仓',IF(解盘12=1,'该股走势趋弱,量能不足,减持大部分筹码',IF(解盘13=1,'该股形态不佳,注意成交量的变化,但目前不适合参与',IF(解盘14=1,'该股趋势不明,股价偏弱,注意量能变化,目前不宜参与',IF(解盘15=1,'该股有走强迹象,但量能不足,趋势不明,不适合操作',IF(解盘17=1,'大盘量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右',IF(解盘19=1,'大盘虽然走势趋强,但量能还显不足,如果前期经过一轮下跌',IF(解盘21=1,'大盘形态走坏,重仓者可以减去大部分仓位',IF(解盘22=1,'大盘缩量调整,注意风险,短线清仓观望',IF(解盘23=1,'大盘走势良好,量能理想,可以继续持有强势股',IF(解盘24=1,'大盘形态良好,但量能稍显不足,随时准备减仓',IF(解盘25=1,'大盘趋势不明,注意成交量变化,目前不适宜进场',IF(解盘26=1,'大盘趋势向下,量能萎缩,不适合进场',DRAWNULL)))))))))))))))))))))));解盘文字2:=IF(解盘16=1,'该股走势太弱,没有参与价值',IF(解盘18=1,' 如前期经过一轮下跌,此时为最佳买点,但如果前期有过一段涨幅则介入需谨慎',IF(解盘20=1,' 可以考虑短线进场,仓位在1/2左右,一旦量能放大可以加仓买入',DRAWNULL)));DRAWTEXT(CURRBARSCOUNT=70{位置} AND (解盘1=1 OR 解盘2=1 OR 解盘3=1 OR 解盘4=1 OR 解盘5=1 OR 解盘6=1 OR 解盘7=1 OR解盘8=1 OR 解盘9=1 OR 解盘10=1 OR 解盘11=1 OR 解盘12=1 OR 解盘13=1 OR 解盘14=1 OR 解盘15=1 OR 解盘17=1 OR解盘19=1 OR 解盘21=1 OR 解盘22=1 OR 解盘23=1 OR 解盘24=1 OR 解盘25=1 OR 解盘26=1),(KDAT*0.99),解盘文字1),COLOR00FFFF;DRAWTEXT(CURRBARSCOUNT=70{位置} AND (解盘16=1 OR 解盘18=1 OR 解盘20=1),IF(解盘18=1 OR 解盘20=1,KDAT*0.98,KDAT*0.96),解盘文字2),COLOR00FFFF; TT:=240/FROMOPEN;比:=TT;促进指数MFL:=(HIGH-LOW)*1000000/(VOL*比),COLORRED;AY2:=EMA(CLOSE,12)-EMA(CLOSE,26);AZ2:=EMA(AY2,9);LT2:=(AY2-AZ2);L211:=IF(LT2,LLV(L,21),DRAWNULL),COLOR217158,CIRCLEDOT;ZGD:=HHV(H,80)*0.99;ZGD2:=CONST(ZGD);ZDD:=LLV(L211,80);ZDD2:=CONST(ZDD);YYA4:=MA(CLOSE,20);YYA5:=(CLOSE > MA(CLOSE,5));YYA6:=(MA(CLOSE,5) > MA(CLOSE,10));YYA7:=(CLOSE > MA(CLOSE,10));YYA8:=(MA(CLOSE,5) > MA(CLOSE,20));YYA9:=(CLOSE > MA(CLOSE,20));YYA10:=REF(YYA4,1);YYA11:=(YYA4 > YYA10);YYAVX:=(((((IF(YYA5,10,(0 - 10)) + IF(YYA6,10,(0 - 10))) + IF(YYA7,10,(0 - 10))) + IF(YYA8,10,(0 - 10))) + IF(YYA9,10,(0 - 10))) + IF(YYA11,10,(0 - 10)));YYV1:=MA(VOL,5);YYV2:=MA(VOL,10);J1:=CONST(IF( YYAVX > 0,200,100));J2:=CONST(IF( YYAVX > 0,00,100));J3:=CONST(IF( YYAVX > 0,100,100));WJ:=(H+L+C)/3;VV1:=IF(H=L,1,H-MAX(O,C));VV2:=IF(H=L,1,MAX(C,O)-WJ);VV3:=IF(H=L,1,MIN(O,C)-L);V4:=IF(H=L,1,WJ-MIN(C,O));VV5:=VOL/IF(H=L,4,H-L);V6:=(VV1*VV5);V7:=(VV2*VV5);V8:=(VV3*VV5);V9:=(V4*VV5);买盘1:=DYNAINFO(23)*比;卖盘1:=DYNAINFO(22)*比;买盘2:=IF(ISLASTBAR AND C>300,(V9+V8)*TT,(V9+V8));卖盘2:=IF(ISLASTBAR AND C>300,(V6+V7)*TT,(V6+V7));买盘:=IF(ISLASTBAR AND PERIOD=5 AND C<300,买盘1,买盘2);卖盘:=IF(ISLASTBAR AND PERIOD=5 AND C<300,卖盘1,卖盘2);{买卖差:=买盘-卖盘;}MFI:=(HIGH-LOW)*1000000/(VOL*比);绿灯:=MFI>=REF(MFI,1)AND VOL*比>=REF(VOL,1);M1:=CONST(绿灯);衰退:=MFI<REF(MFI,1)AND VOL*比<REF(VOL,1);M2:=CONST(衰退);伪装:=MFI>=REF(MFI,1)AND VOL*比<REF(VOL,1);M3:=CONST(伪装);蛰伏:=MFI<REF(MFI,1)AND VOL*比>=REF(VOL,1);M4:=CONST(蛰伏);量大:=(卖盘+买盘)/REF(VOL,1)>2;M5:=CONST(量大);量缩:=REF(VOL,1)/(卖盘+买盘)>1.5;M6:=CONST(量缩);卖量大:=(卖盘-买盘)/买盘>0.4;M7:=CONST(卖量大);买量大:=(买盘-卖盘)/卖盘>0.4;M8:=CONST(买量大);TS1:=IF(M1=1,1.99+4.99,0.91);TS2:=IF(M2=1,TS1+4.99,TS1);TS3:=IF(M3=1,TS2+4.99,TS2);TS4:=IF(M4=1,TS3+4.99,TS3);TS5:=IF(M5=1,TS4+4.99,TS4);TS6:=IF(M6=1,TS5+4.99,TS5);TS7:=IF(M7=1,TS6+4.99,TS6);TS8:=IF(M8=1,TS7+4.99,TS7);DRAWTEXT(M1 AND CURRBARSCOUNT=50,ZGD2-(ZGD2*TS1),'[绿灯]实计交易量增加。

精选经典通达信指标公式源码.doc

精选经典通达信指标公式源码.doc

自用kdj, MACD看透主力,散户看盘,均线变色自动画线指标,该指标自己使用1年以上, 没有未来函数非常稳定,东西是不错的,就看怎样使用了。

指标只是辅助,具体交易要结合大盘和个股情况来看。

{四哥趋势-变色均线和趋势画线主图}{ N:l,100,8 P:0,l,0}ZGD:=HHV(H z60);ZGD2:=CONST(ZGD);ZDD:=LLV(L,60);ZDD2:=CONST(ZDD);GJ:=(C+H+L+O)/4;明日阻力:=L+(GJ・L)+(C・L);明日支撑:=L+(C-GJ);KOH:=L>REF(H,1);KOL:=H<REF(L,1);HIF:=L>REF(H,BARSLAST(KOH)+1);NHIF:=L<=REF(H,BARSLAST(KOH)+1);LIF:=H<REF(L,BARSLAST(KOL)+1);NLIF:=H>=REF(L,BARSLAST(KOL)+1);下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100); RRRSV:=SMA(下档线,3,1);KKK:=SMA(RRRSV,3,1);DDDDD:=((3 * RRRSV) - (2 * KKK));JJ12:=(((CL0SE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);RSV24:=SMA(JJ12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));压力2:=IF(CROSS(D24,DDDDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDDDD)))),COLORF FFFFF;底部:=LLV(HIGH,30),COLOROOFFOO;AA:=REF(H,N)=HHV(H,2*N+1); AA1:=REF(L Z N)=LLV(L,2*N+1);QY:=BACKSET(AA,N+1); QY1:=BACKSET(AA1,N+1);CC:=FILTER(QY Z N) AND H=HHV(H,N+1); CC1:=FILTER(QY1,N) AND L=LLV(L,N+1); DDD: = BARSLAST(CC); DD1:=BARSLAST(CC1);GDTS:=IF(CC z CURRBARSCOUNT z O); DDTS:=IF(CC1Z CURRBARSCOUNT,0); DINGBUTS:=IF(DDD,REF(GDTS Z DDD),GDTS); DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS); GDCS1:=CONST(DINGBUTS); DDCS1:=CONST(DDTS1);GDCS13:=CONST(REF(HIGH,GDCS1-1)); DDCS13:=CONST(REF(L,DDCS1-1)); DINGBUTS1: = REF(DINGBUTS,DDD+1); DDTS2:=REF(DDTS1,DD1+1);GDCS2:=CONST(DINGBUTS1); DDCS2:=CONST(DDTS2);GDCS23:=CONST(REF(HIGH Z DINGBUTS1-1)); DDCS23:=CONST(REF(L,DDTS2-1));XG1: = BACKSET(ISLASTBAR,GDCS 1); XD1:=BACKSET(ISLASTBAR Z DDCS1);XG2: = BACKSET(ISU\STBAR,DINGBUTS1); XD2: = BACKSET(ISLASTBAR,DDTS2); XDD:=IF(DDCS13<=DDCS23,XD1,XD2);BCG:=SUM(XG1,O); BCD:=SUM(XDD,0);今口阻力:REF(明日阻力,1),NODRAW;今日支撑:REF(明日支撑,1),NODRAW;压力位:IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;底部位:IF(ISLASTBAR,底部,DRAWNULL),NODRAW;高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) ,COLORGRE EN,LINETHICK2;低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1),COLORBLUE, LINETHICK2;高:=CONST(MAX(MAX(MAX(ZGD2,高点压力),GDCS13),GDCS23));低:=CONST(MIN(MIN(MIN(ZDD2,DDCS23),DDCSC3),低点支撑));ZGSTAR:=(高点压力+低点支撑)/2;ZGEND:=CONST((高点压力+低点支撑)/2);STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLOR555555,LINETHICK2;M:=INTPART(3*N/5);AAA:=REF(H,M)=HHV(H,2*M+1);QYY :=BACKSET(AAA, M+l);CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);DDDD:=BARSLAST(CCC),NODRAW;GDTSS: =IF(CCC,CURRBARSCOUNT,0);DINGBUTSS:=IF(DDDD,REF(GDTSS,DDDD)Z GDTSS);GDCS11:=CONST(DINGBUTSS);DINGBUTS11:=REF(DINGBUTSS,DDDD+1);GDCS22:=CONST(DINGBUTS11);上缺匚l:=p=0 AND HIF AND BARSU\ST(KOH)<BARSLAST(NHIF)AND BARSLAST(HIF)<BARSLAST(NHIF);HG:=IF(上缺口,REF(H,BARSLAST(KOH)+1),DRAWNULL);STICKLINE(上缺口,HG,HG*1.001,10,0),COLOR888888;下缺口:=p=0 AND LIF AND BARSU\ST(KOL)<BARSLAST(NLIF) AND BARS成ST(LIF) vBARSLAST(NLIF);LG:=IF( F缺口Z REF(L,BARSLAST(KOL)+1),DRAWNULL);STICKLINE(下缺口,LG,LG*0.999,10,0),COLOR888888;高点压力M:DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUNT=GDCS11,H,1),COLORRE D Z LINETHICK1;AA11:=REF(L,M)=LLV(L Z2*M+1);QY11:=BACKSET(AA11,M+1);CC11:=FILTER(QY11Z M) AND L=LLV(L,M+1);DDU:=BARSLAST(CC11);DDTSS:=IF(CCll,CURRBARSCOUNT z O);DDTS11:=IF(DD11,REF(DDTSS,DD11),DDTSS);DDCS11:=CONST(DDTS11);DDTS22:=REF(DDTS11,DD11+1);DDCS22:=CONST(DDTS22);低点支撑M:DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=DDCS11,L,1) COLORRED,LINETHICK1;STICKLINE(XG2,GDCS23,GDCS23,0.5,l),COLORWHITE;STICKLINE(XG1,GDCS13,GDCS13,0.5,1),COLORYELLOW;STICKLINE(XD2,DDCS23,DDCS23,0.5,l),COLORMAGENTA;STICKLINE(XD1,DDCS13,DDCS13,0.5,1),COLORCYAN;STICKLINE(ISLASTBAR AND C>=今日阻力,今口阻力,今口阻力,10,1),COLOROOOOFF; STICKLINE(ISU\STBAR AND Cv今日阻力,今日阻力,今日阻力,10,1),COLOROOFFOO; STICKLINE(ISLASTBAR AND C>=今日支撑,今Fl 支撑,今日支撑,10,1),COLORFFOOFF; STICKLINE(ISU\STBAR AND Cv今日支撑,今日支撑,今日支撑Z10,1),COLORFF8800; STICKLINE(ISLASTBAR,压力位,压力位,120,0),COLORFFFFFF;STICKLINE(ISLASTBAR,底部位,底部位,iOO z O),COLOROOFFOO;MA5:MA(C,5),COLORWHITE;MA30:MA(C,30);DD5:=MA5<REF(MA5,1);IF(DD5,MA5,DRAWNULL),COLOROOFFOO;X:=(3*C+L+O+H)/6;多空线:(20*X+19*REF(X,l)+18*REF(X,2)+17*REF(X,3)+16*REF(X,4)+15*REF(X,5)+14*REF (X,6)+ 13*REF(X,7)+12*REF(X,8)+ll*REF(X,9)+10*REF(X,10)+9*REF(X,ll)+8*REF(X,12)+7*REF(X,13)+6*REF(X,14)+5*REF(X,15)+4*REF(X,16)+3*REF(X,17)+2*REF(X,18)+ REF(X,20))/210,COLORFFOOFF,LINETHICK1;DD: = ^空线<REF(多空线,1);IF(DD,多空线,DRAWNULL),COLORBLUE,LINETHICK3;A:=(MA5 > 多空线);IF(A,多空线,DRAWNULL),COLORYELLOW,POINTDOT;Al:=(MA5v 多空线);IF(A1,多空线Z DRAWNULL),COLORWHITE;V1:=CLOSE*VOL;V2:=EMA(V1,13)/EMA(VOL Z13);CYS:=(EMA((CLOSE-V2)/V2,1)*100);AAAA:=CYS;MIDD:=MA(CYS,20);CCCC:=MIDD+0.85*STD(CYS,10);TM6:=AAAA>CCCC;IF(TM6,MA5,DRAWNULL),COLORRED,LINETHICK2;{天翼KDJ指标}N:=9;Ml:=3;M2:=3;低吸区:20,LINETHICK0;STICKLINE(C,19,20,1,0),COLORGREEN;风险区:80,LINETHICK0;STICKLINE(C,79,80,1,0),COLORYELLOW;RSV:=(C-LLV(L,N))/(HHV(H,N)-LLV(L z N))*100;K:SMA(RSV,M1,1),COLORRED,LINETHICK3;D:SMA(K Z M2,1),COLORWHITE Z LINETHICK3;J:3*K-2*D,COLORMAGENTA;DRAWBAND(K/RGB(255z0,0),D,DRAWNULL);吸筹:D<20,COLORYELLOW;STICKLINE(Dv20,D,20,2,0),COLORYELLOW;高抛:D>80,COLORDA8E3D;STICKLINE(D>80,D,80,2,0),COLORDA8E3D;DRAWTEXT(FILTER(吸筹=1,15),35/吸筹'),COLORDA8E3D;DRAWTEXT(FILTER(高抛=1,15),95;高抛'),COLORYELLOW;DRAWICON(CROSS(K,D),D*0.98Z1);DRAWICON(CROSS(D,K),K*1.02,2);{MACD看透主力}VA:=IF(CLOSE>REF(CLOSE,1),VOL 广VOL);OBV1:=SUM(IF(CLOSE=REF(CLOSE/1),0,VA),0);OBV2:=EMA(OBV1,3)・MA(OBV1,9);OBV3:=EMA(IF(OBV2>0,OBV2,0),3);MAC3:=MA(C,3);SHORT: = 12;LONG:=26;MID:=9;DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG)COLORYELLOW ;DEA:EMA(DIF,MID)COLORFF9900 ;主力买:IF(DIF>REF(DIF,1),DIF/0),NODRAW;主力卖:IF(DIFvREF(DIF,l),DIF,0),NODRAW;MACD:=(DIF-DEA)*2;STICKLINE(OBV3>REF(OBV3Z1) AND MAC3>REF(MAC3,1),0,MACD,1.2,0),COLORYELLOW; 吸:=MACDvO AND MACD>REF(MACD,1);拉:=MACD>0 AND MACD>REF(MACD Z1);派:=MACD>0 AND MACD<REF(MACD Z1);落:=MACDvO AND MACD<REF(MACD,1);STICKLINE(吸,0,MACD,0.5,0),COLORRED;STICKLINE(拉,0,MACD,0.5,0),COLORRED;STICKLINE(派,0,MACD,0.5,0),COLORGREEN;STICKLINE(落QMACD,0.5,0),COLORWHITE;主力吸筹:吸,COLORYELLOW,NODRAW;主力拉升:拉,COLORRED,NODRAW;主力派送:派,COLORGREEN,NODRAW;主力砸盘:落Z COLORFFAAOO,NODRAW;JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));低位金叉:CROSS(DIF,DEA) AND DIF<-0.1,COLORWHITE,NODRAW;二次金叉:CROSS(DIF,DEA) AND DEA<0 ANDCOUNT(JCCOUNT=2,21)=1,COLORRED,NODRAW;STICKLINE(低位金叉,0,0.08,2,0),COLORFFOOFF;DRAWTEXT(低位金叉,0. 16;低位金叉'),COLORWHITE;A1:=BARSLAST(REF(CROSS(DIF,DEA)Z1));A2:=BARSLAST(REF(CROSS(DEA,DIF),1));底背离:REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) ANDCROSS(DIF Z DEA),COLORGREEN,NODRAW;STICKLINE(底背离,0,0.03,2,0),COLOROOFFOO;DRAWTEXT(底背离,0.12;底背离)COLORFFOOFF;双金叉:低位金叉AND二次金叉,COLORFFOOFF,NODRAW;三全项:低位金又AND二次金又AND底背离,COLORWHITE ,NODRAW;顶背离:=REF(CLOSE,A2+l)vCLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF); STICKLINE(二次金叉,0,0.06,2,0),COLORFFCCOO;DRAWICON(二次金叉,DEA*0.9,l);DRAWTEXT(二次金叉,0.2,'二次金叉*),COLORYELLOW;DRAWTEXT(低位金又AND二次金又AND底背离,0.25;三全项'),COLOROOOOFF,LINETHICK2;IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORRED,LINETHICK2;IF(DIFvREF(DIF,l),DIF,DRAWNULL),COLORGREEN,UNETHICK2;{散户看盘}散户线:100*(HHV(HIGH,M)・CLOSE)/(HHV(HIGH,M)・LLV(LOW,M));RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:=SMA(RSV,5Z1);D:=SMA(K,3,1);J:=3*K.2*D;主力线:EMA(J,6),COLORYELLOW;VAR2:=REF(LOW,1);VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),34)*100;VAR4: = EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3);VAR5:=LLV(LOW,30);VAR6:=HHV(VAR4,30);VAR7:=IF(MA(CLOSE,58),1,0);VAR8:=EMA(IF(LOWv=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;VAR9:=IF(VAR8>100z100,VAR8);吸筹:STICKLINE(VAR9>・120,0,VAR9,6,1),COLORMAGENTA;AA3:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW Z21))*100-10;AA4:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;AA5:=SMA(AA4,13,8);走势:CEILING(SMA(AA5Z13,8)),COLORRED,LINETHICK2;AA6:=SMA(AA3,21,8);买观注:STICKLINE(走势-AA6v・65,0,7,15,1);DRAWICON(FILTER(J>REF(J,1)AND 走势>=REF(走势,1)AND 走势<25 ,5),走势,1); 卖观注:STICKLINE(走势・AA6>85,98,90,15,1),COLORFFFFOO;DRAWICON(FILTER(JvREF(J,l)AND 走势v=REF(走势,1)AND J>85 ,5),J,2);。

混沌操作法 指标

混沌操作法 指标
Var7:=BACKSET(ref(HIGH,2)=HHV(HIGH,5) AND LOW>ref(LOW,1) AND HIGH>ref(HIGH,1),3);
Var8:=BACKSET(ref(HIGH,2)=HHV(HIGH,5) AND HIGH<ref(HIGH,1) AND LOW>ref(LOW,1)
AO>ref(AO,1) AND AC>ref(AC,1),COLORRED;
AO<ref(AO,1) AND AC<ref(AC,1),COLORGREEN;
AO>ref(AO,1) AND AC<ref(AC,1),COLORGRAY;
AO<ref(AO,1) AND AC>ref(AC,1),COLORGRAY;
Var1:=(H+L)/2;
上唇:ref(SMA(Var1,5,1),3),COLORGREEN;
牙齿:ref(SMA(Var1,8,1),5),COLORRED;
下颚:ref(SMA(Var1,13,1),8),COLORBLUE;
颚鱼分形指标公式源码:
Var1:=(H+L)/2;
Var2:=CROSS(Var1,0.9);
Var3:=BACKSET(ref(LOW,2)=LLV(LOW,5),3);
Var4:=CROSS(Var3,0.9);
drawicon(Var2,HIGH*1.01,4),Color00E40E;
drawicon(Var4,LOW*0.99,5),Color00E40E;
OSC指标公式源码:
参数名:SHORT 5 1 999

布林买卖点及变盘通达信指标源码公式

布林买卖点及变盘通达信指标源码公式

布林买卖点及变盘通达信指标源码公式1.计算中轨线(MA):中轨线是布林带的基准线,一般选择20日或者30日的移动平均线作为中轨线。

计算公式如下:MA=MA(CLOSE,N)其中,CLOSE表示收盘价,N表示选择的周期。

2.计算上轨线(UPPER)和下轨线(LOWER):上轨线和下轨线是以中轨线为基础根据标准差计算得到的。

计算公式如下:STDDEV=STD(CLOSE,N)UPPER=MA+k*STDDEVLOWER=MA-k*STDDEV其中,STDDEV表示标准差,N表示选择的周期,k表示标准差的倍数。

3.计算买入点和卖出点:根据股价穿越布林带的方式,可以进一步判断买入点和卖出点。

买入点条件:收盘价上穿下轨线(CLOSE>LOWER)卖出点条件:收盘价下穿上轨线(CLOSE<UPPER)以上就是布林买卖点指标的计算公式和判断条件。

在实际应用中,一般会根据具体的交易品种和交易周期进行参数优化,以提高策略的稳定性和盈利能力。

变盘通达信指标是在布林买卖点的基础上进行进一步改进的指标,主要用于判断股价的变盘点,即趋势的转变点。

变盘通达信指标源码公式如下:1.计算N日内连续上升天数(UP_COUNT)和N日内连续下降天数(DOWN_COUNT):UP_COUNT=IF(CLOSE>REF(CLOSE,1),REF(UP_COUNT,1)+1,0)DOWN_COUNT=IF(CLOSE<REF(CLOSE,1),REF(DOWN_COUNT,1)+1,0)其中,CLOSE表示收盘价,N表示选择的天数。

2.计算N日内涨幅(UP_RATE)和N日内跌幅(DOWN_RATE):UP_RATE=(CLOSE-REF(CLOSE,N))/REF(CLOSEDOWN_RATE=(CLOSE-REF(CLOSE,N))/REF(CLOSE,N)*100其中,CLOSE表示收盘价,N表示选择的天数。

混沌操作法总结及源码

混沌操作法总结及源码

混沌操作法总结及源码1、一致性获利的计划交易(推动浪)混沌操作法I一致性获利的计划交易(推动浪:一浪,三浪与五浪)〔以最多交易10手合约为例,方向:多。

〕〔假设日为1浪,1小时为1-1浪,15分钟为1-1-1浪,立足于15分钟〕{第一浪交易}1:在1小时周期判断可交易趋势的零点。

〔五颗神奇的子弹〕2:时间结构下调一级,在15分钟周期观察子浪的五波推动。

假设这是1-1-5浪结束。

3:在15分钟周期子浪1-2-C。

〔回撤50%-62%〕入市3手合约。

4:入市后在1浪起点下1个价位设置止损,并设置反向做空2手合约。

〔空头止损设在此前2个上分形较高的那一个,上1个价位,或1浪的顶点。

〕。

〔说明:如果止损,那么先前假设的推动浪其实就是某个下跌趋势的调整浪,在多头判断错误时这2手空单可以弥补先前多头的损失〕。

5:如果获利,要拿的住单,直到1-5-5,平仓2手,留1手防止1-5-5浪延伸。

〔依据五颗神奇的子弹和黄金比例判断〕。

6:此时已经交易完日线的1浪。

{第三浪交易}a:观察15分钟周期2-C-5的结束,入市5手多单。

止损设置在1-1-1的起点下1个价位,并设置反向做空4手合约。

〔说明:如果此时止损,那么先前假设的1浪其实就是某个下跌趋势的2浪,或4浪,那么下跌空间很大。

)b:关键位置:3浪上升到1浪的100%,此时止损上移至1浪顶,下1个价位。

〔如果止损就出局观望,因为预期的波浪计数没有实现。

〕c:3浪上升到1浪的110%时,3浪真正确立,就在此买入4手合约,止损全部设置在1浪顶下1个价位。

〔此时合约数到达最大1+5+4=10〕〔说明:止损依据4不破1顶)d:在3-5-5时,卖出7手,留1手防止2-5-5浪延伸。

e:此时已经交易完日线的3浪。

{第五浪交易}A:观察4-A呈现5波走势,预测可能发生锯齿型调整,那么折返幅度较大,如果4-A仅有3波,则可能出现平台型或三角型调整。

B:当AO 向下穿越0轴时,4浪结束的最低条件满足,在日线图上4浪至少会出现2个下分形,4浪通常会结束于3-4的终点附近。

缠论主图通达信指标公式源码.doc

缠论主图通达信指标公式源码.doc

选股指标一缠论主图(指标选股/通达信贴图)我把主图里的黄金分割位换成半对数,这在投资领域里最擅长用的,比黄金分割在投资领域里更合理。

是上班族和平时没空看盘投资者最佳的指标{智能版:=“核心指标.VAR100#DAY”;}智能版:=“指标.核心#DAY“;MA1:MA(CLOSE,M1),COLORWHITE;MA2:MA(CLOSE,M2),COLORYELLOW;MA3:MA(CLOSE,M3),COLORCYAN;MA4:MA(CLOSE,M4),COLORCYAN;日线:=IF(PERIOD=5,1,0);CA3: = REF(C,1)* 日线;A1:=REF(HIGH,3)=HHV(HIGH,笔周期*3+1)* 智能版;B1:=FILTER(A1,3); C1:=BACKSET(B1,3+1);D1: = FILTER(C1,3);{高点}A2:=REF( LOW, 3)=LLV( LOW,笔周期*3+1)* 智能版;B2:=FILTER(A2,3); C2:=BACKSET(B2,3+1);D2:=FILTER(C2,3);{低点}E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;E2:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;H2: = D1 AND NOT(D2 AND E1>=E2);L1:=D2 AND NOT(D1 AND E1=E2);X1: = REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 AND COUNT(L1Z X1)>0/LLVBARS(IF(L1,LOW,10000),X1));G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I14);{过滤后低点}L2:=LD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2Z2);HD:=I2>REF(I2,1);{过滤后高点}DRAWLINE(LD Z L,HD Z H,O),COLORYELLOW,LINETHICK1;DRAWLINE(HD,H,LD,L,O),COLORYELLOW,LINETHICK1;A3:=H;B3:=REF(H,REF(BARSLAST(HD),l)+l)>REF(H z REF(BARSLAST(HD),l)+2+REF(BARSLAST (HD),REF(BARSLAST(HD),l)+2));D3:=A3 AND B3 AND HD;E3: = BACKSET(D3z REF(BARSLAST(HD),l)+2);HH:=E3>REF(E3,1);{找出全部长期高点}A4:=L>REF(L,REF(BARSLAST(LD),1)+1);B4:=REF(L,REF(BARSLAST(LD),1)+1);D4:=A4 AND B4 AND LD;E4: = BACKSET(D4,REF(BARSLAST(LD),l)+2);LL:=E4>REF(E4,1);{找出全部长期低点}H3:=HH OR BARSTATUS=2 OR BARSCOUNT(C)=1; (后面进行过滤,方法同前。

全套混沌操作法指标公式源码

全套混沌操作法指标公式源码
MA2:=MA((HIGH+LOW)/2,LONG);
MA1-MA2,STICK,COLORgreen;
OSCMACD指标公式源码:
参数名:LONG 35 1 999
SHORT 5 1 999
OSC: (MA(CLOSE,SHORT)-MA(CLOSE,LONG))/MA(CLOSE,SHORT)*100, COLORSTICK;
DRAWTEXT(A1,1,'绿灯'),linethick3;
DRAWTEXT(A3,3,'伪装'),linethick3;
DRAWTEXT(A4,2,'蛰伏'),linethick3;
0.1
鳄鱼线指标公式源码:
Var1:=(H+L)/2;
上唇:ref(SMA(Var1,5,1),3),COLORGREEN;
STICKLINE(Var4,LOW,LOW*0.99,5,0),Color00E40E;
Var5:=IF(Var2,HIGH,IF(Var4,LOW,0));
POLYLINE(Var5,Var5),Colorff00ff;
Var6:=BACKSET(ref(HIGH,2)=HHV(HIGH,5) AND LOW<ref(LOW,1) AND HIGH<ref(HIGH,1),3);
现价:CLOSE,POINTDOT,Color000F89;
MFI公式源码:
参数名:N 14 2 300
TYP := (HIGH + LOW + CLOSE)/3;
SUM(IF(TYP>ref(TYP,1),TYP*VOL,0),N)/SUM(IF(TYP<ref(TYP,1)ห้องสมุดไป่ตู้TYP*VOL,0),N)

通达信公式指标源码金光大道主图指标公式.docx

通达信公式指标源码金光大道主图指标公式.docx

通达信金光大道主图指标公式{NN:1, 250, 200;该参数需手动填入}SAR空:=IF(CLOSE<SAR(4,2,20),SAR(4,2,20),DRAWNULL),CIRCLEDOT,COLORAAO 000;SAR多:=IF(CLOSE>=SAR(4220),SAR(4220),DRAWNULL),CIRCLEDOT, COLOROO OOBB;沪深换手:=n399300$AMOUNT71000000/42000,COLORAABBCC,LINETHICKl; 个股换手率:=VOL/CAPITAL*100;WBl:=WINNER(HHV(HIGH,250))*100;WB2:=WINNER(LLV(LOW,250))*100;WBB:=(WB1+WB2)*O・5;平均成本70:=EMA(COST(WBB),6),CROSSDOT,COLORFFAAOO,LINETHICK1;W1:=WINNER(HHV(HIGH,30))*100;W2:=WINNER(LLV(LOW,30))*100;W27: = Wl-(Wl-W2)*0.382;W50:=(Wl+W2)*0・5; W4:=IF(C>W5O,W1,VV27);成本: = EMA(COST(VV4),3),CROSSDOT,COLOROOOOBB,LINETHICK1; 获利平均值: = EMA(100*WINNER(C),45),COLOREEAA00 丄INETHICK2;成本转向:=ZIG(获利平均值,13\COLOREEOOEE Z LINETHICK1;转向空:二DRAWLINE(成木转向>=REF(成木转向,1),成木转向,成木转向< = REF(成本转向⑴,成本转向,0)Z COLORDD7700,LINETHICK2;转向多:=DRAWLINE(成本转向<=REF(成本转向,1),成本转向,成本转向〉= REF(成本转向,1),成本转向,0),COLOROOOOFF 丄INETHICK2;ARSI:=“RSI・RSI1#WEEK;COLOR5588AA;BRSI:=“RSI・RSI2#WEEK;COLOROOAACC;CRSI:=,,RSI.RSI3#WEEK,,Z COLOR77BB77;月RSIl:=,,RSI.RSIl#MONTH n;月RSI2:=,,RSI.RSI2#MONTH H;月RSI3:=,,RSI.RSI3#MONTH,';月MD:=,,KDJ.D#MONTH n;月MK:=n KDJ.K#MONTH H;周CK:=”KDJ・K#WEEK11;周CD:=n KDJ.D#WEEK H;AAA:=IF(C>=REF(C,3),l,0);BBB:=IF(C>=REF(C z4),l,0);CCC:=IF(C>=REF(C,5),l z0);DDD:=IF(C>=REF(C z6),l,0); EEE:=IF(C>=REF( C,7) ,1,0);FFF:=IF(C>=REF(C,8),l z0);GGG:=IF(C>=REF(C,9)z l,0);HHH:=IF(C>=REF(C,10),l z0);III:=IF(C>=REF(C,H),1,O);JJ J:=IF(C>=REF(C,12),1,0);GZ2:=AAA+BBB+CCC+DDD+EEE+FFF+GGG+HHH+III+JJJ;KK:=REF(GZ2,l)+REF(GZ2/2)+REF(GZ2,3)+REF(GZ2,4);KKK:=KK/4;GJ:=IF(CLOSE=CLOSE,(HIGH+LOW+OPEN+CLOSE)/4Z AMOUNT/(V+0.001)/100);明日阻力: = L+(GJ・L)+(C・L);明日支撑: = L+(C-GJ);今口阻力: = REF(明口阻力,1);今日支撑: = REF(明日支撑,1);阻支:=(今日阻力+今曰支撑)*0.5;支撑:二LLV(今日支撑,21);阻力: = HHV(今日阻力,21);支扌掌50:=LLV(今口支撑,55);阻力50:=HHV(今Fl阻力,55);阻支HL:=(H+L)*0・5;波浪阻支:=ZIG(阻支HL,15);波浪线:=ZIG(3,15);MA1: = MA(HIGH,1);MAA:=MA(LOW,1);支撑34:=LLV(今日支撑,34);阻力34:=HHV(今日阻力,34);ZQC:=IF((支撑+阻力)*0・5=(支撑34+阻力34)*0.5,(支撑+阻力)*0・5,(支撑34+阻力34)*0.5)Z CROSSDOT,COLOR55EEOO;ZQB:DRAWLINE(H<ZQC,ZQC,H>ZQC z ZQC,O),CROSSDOT,COLORCC18AA; ZQA:DRAWLINE(H>ZQC,ZQC,H<ZQC,ZQC z O)z CROSSDOT z COLORCC18AA; 高A:=HHV(HIGH,100);低A:=LLV(LOW,66);最低: = REFDATE(低A, DATE);最高: = REFDATE(高A,DATE);HL38:=高A•(高A-低A)*0.38;中轴:=高A■(高A■低A)*0.5;HL62:=高A•(高A-低A)*0.62;HL72: =高A•(高A•低A)*0.725;新低:=STICKLINE(低A=LOW,LOW,HL62z O,l),COLORFFBBFF;新高:=STICKLINE(高人=出6出出6出肌3801)人01_0只00卩卩00;趋势线72:=DRAWTEXT(新低AND CROSS(新低,HL72),HL72,1);趋势线62:=DRAWTEXT(新低AND CROSS(新低,HL62),HL62,1);中轴趋势线:二DRAWTEXT(新低AND CROSS(新低中轴),中轴,1);趋势线38:=DRAWTEXT(新低AND CROSS(新低Z HL38),HL38Z1);趋势线1:=DRAWLINE(新高趋势线38,HL38Z1),POINTDOT,COLOROODDFF; 趋势线2:=DRAWLINE(新高,H,中轴趋势线,中轴,1),POINTDOT,COLOROODDFF; 趋势线3:=DRAWLINE(新高,H,趋势线62,HL62,0),POINTDOT,COLOROODDFF; 趋势线4:=DRAWLINE(新高,H,趋势线72,HL72Q),POINTDOT,COLOROODDFF; 趋势线A:=IF(C>趋势线1,趋势线2,趋势线1),COLORCCCC13,LINETHICK1; 趋势线B:=IF(C>趋势线2,趋势线3,趋势线2),COLORCCCC13丄INETHICK1; 趋势线C:=IF(C>趋势线3,趋势线4,趋势线3)Z COLORCCCC13,LINETHICK1;趋势线H62:=DRAWTEXT(新高AND CROSS(新高,HL62),HL62Z1);趋势线H38:=DRAWTEXT(新高AND CROSS(新高,HL38)Z HL38Z1);中轴趋势线H:=DRAWTEXT(新高AND CROSS(新高冲轴)冲轴」);趋势线D:=DRAWLINE(新低乙趋势线H38,HL38,1),POINTDOT,COLORFFFFOO; 趋势线E:=DRAWLINE(新低丄'趋势线H62,HL62,1)/POINTDO「COLORFFFFOO; 趋势线F:=DRAWLINE(新低丄,中轴趋势线H,屮轴,1),POINTDOT,COLORFFFFOO; STICKLINE(趋势线A,趋势线A,趋势线B z O,l),COLORBB3456;高AA:=HHV(H Z NN);低AA:=LLV(L,NN);最低AA:=REFDATE(低AA,DATE); 最高AA: = REFDATE(高AA,DATE);牛熊Ll:=低AA+(高AA-低AA)*0・5;牛熊中轴:二REFDATE(牛熊L1QATE),POINTDOT,COLORFFOOFF丄INETHICK2; 牛熊L2:=低AA+(牛熊中轴■低AA)*0.5; MZ:二牛熊中轴+(高AA■牛熊中轴)*0.5;熊箱: = REFDATE(牛熊L2,DATE),POINTDOT,COLOREE5500丄INETHICK3; 牛箱: = REFDATE(M 乙DATE),POINTDOT,COLOREE5500丄INETHICK3; HP1:=(最高AA+牛箱)*0.5,POINTDOT,COLOR909090;HP2:=(最高AA+HP1)*0.5,POINTDOT Z COLOR909090; HP3:=(最高AA+HP2)*0.5,POINTDOT,COLOR909090; LP1:=(最低AA+熊箱)*0.5,POINTDOT,COLOR909090; LP2:=(最低AA+LP1)*0・5,POINTDOT,COLOR909090; LP3:=(最低AA+LP2)*0・5,POINTDO「COLOR909090; HIGH1:=IF(HIGH<REF(H,1)Z(H+L)*O.5,HIGH);HIGH2:=IF(HIGH<(REF(H,2)+REF(H,1))/2,(H+L)*0.5,HIGH);LOW1:=IF(LOW>REF(L,1),CLOSE,(H+L)*0.5);LOW2:=IF(LOW>(REF(L,2)+REF(L,1))/2,(H+L)*0.5,LOW);OPENl:=IF(OPENvCLOSE,(H+L)*0・5QPEN);CLOSE1:=IF(CLOSE>=OPEN,CLOSE Z(H+L)*0.5);AGJ:=(3*HIGHl+HIGH2+LOWl+OPENl+CLOSE+LOW)/8;VARC:=MONTH/VOL/100;VARE:=SUM(MONTH,6) OR AMOUNT/VARC/100;CYC6:=DMA(AGJ Z VOL/VARE)Z COLORBB88FF,LINETHICK1;DC65:EMA(EMA(CYC6,65)/5),CROSSDOT Z COLOR339966,LINETHICK1;IF(成本转[^]>=REF(成本嶷向,1),DC65,DRAWNULL),CROSSDOT,COLOROOOOEE 丄INETHICK1;DC44:=EMA(EMA(CYC6Z44),5)Z COLOR336699,LINETHICK1;DCAA:=EMA(EMA(CYC6Z7 7),10)Z COLORCC6677丄INETHICK1;低l:=LLV(L,70);分割低起: = REFDATE(低1QATE),POINTDOT,COLOROOFFEE;分割0:=分割低起;分割A:=分割低起*1.129;分割B:二分割低起*1.275;分割C:二分割低起*1.5;分割D:二分割低起*1.625;分割E:二分割低起*2;HLP:=(高1+低1)*0.5;新低A:=STICKLINE(低l=LOW,LOW,HLP z O,l);新高A:=STICKLINE(高1=HIGH,HIGH,HLPO1);分割0O:=DRAWTEXT(新低A AND CROSS(波浪线,分割0),分割0,1);近低匸DRAWLINE(分割00,分割0,分割0,分割0,1),POINTDOT,COLOROOFFEE Z LINETHICK1;分割AA:=DRAWTEXT(新低A AND CROSS(波浪线,分割A),分割A,l);一卡: = DRAWLINE(分割AA,分割代分割A,分割A,l),POINTDOT,COLOROOFFEE 丄INETHICK1;分割BB: = DRAWTEXT(新低A AND CROSS(波浪线,分割B),分割B,l);二卡: = DRAWLINE(分割BB,分割B,分割B,分割B,l),POINTDOT,COLOROOFFEE 丄INETHICK1;分割CCuDRAWTEXT(新低A AND CROSS(波浪线,分割C),分割C,l);三卡A:=DRAWLINE(分割CC,分割C,分割C,分割C,l),POINTDOT,COLOROOFFEE 丄INETHICK1;三卡:=IF(MA1>(二卡+三卡A)/2,三卡A,二卡),POINTDOT,COLOROOFFEE,LINETHICK1;STICKLINE(近低,近低,近低UCOLOR666655;STICKLINE(一卡,一卡,一卡Z1,1),COLOR776655;STICKLINE(二卡,二卡,二卡Z1,1),COLOR886655;STICKLINE(三卡,三卡,三卡Z1,1),COLORAA6655;新低BB:=STICKLINE(低AA=LOW Z LOW Z牛熊Ll z O,l),COLORFFBBFF;新高BB:=STICKLINE(高AA=HIGH,HIGH,牛熊Ll,O z l),COLOROOFFOO;上下27:=低AA+(高AA•低AA)*0・275;上下38:=低AA+(高AA■低AA)*0・382;上下50:=低AA+(高AA•低AA)*0・5;上下62:=低AA+(高AA■低AA)*0・625;上下72:=低AA+(高AA■低AA)*0.725;上下87:=低AA+(高AA■低AA)*0・87;HH87:=DRAWTEXT(新高BB AND CROSS(上下87,新高BB),上下87,2); 支87 线:=DRAWLINE(新低,L,HH87,上下8 乙1),POINTDOT,COLOROOFFOO 丄INETHICK1;HH72:=DRAWTEXT(新高BB AND CROSS(上下72,新高BB),上下72,2); 支72 线:=DRAWLINE(新低BB丄,HH72,上下72,1),COLOROOBBAA丄INETHICK1;HH62:=DRAWTEXT(新高BB AND CROSS(上下62,新高BB),上下62,2);支62 线:=DRAWLINE(新低BB,L Z HH62,上下62Z1),COLOR0088EE Z LINETHICK1;HH50:=DRAWTEXT(新高BB AND CROSS(上下50,新高BB),上下50,2);支50 线:=DRAWLINE(新低BB丄,HH50,上下50,1),COLOR0078EE,LINETHICK1;HH38:=DRAWTEXT(新高BB AND CROSS(上下38,新高),上下38,2); 强支撑: = DRAWLINE(新低BB Z L Z HH38,上下38Z1),COLOR0062DD,LINETHICK2;HH27:=DRAWTEXT(新高BB AND CROSS(上下27,新高BB),上下2乙2);支27 线:=DRAWLINE(新低BB,L,HH27Z上下27,1),COLOR0078EE,LINETHICK1; 支27:=DRAWLINE(新低BB丄,CROSS(支27 线丄),支27线z O),COLORAAAAAA 丄INETHICK1;支38:DRAWLINE(新低BB,L,CROSS(强支撑Q』虽支撑z O),COLOROOOOFF,LINETHICK2;支50:DRAWLINE(新低BB,L,CROSS(支50 线Q,支50线,0),COLORFF37AA Z LINETHICK1;支62:DRAWLINE(新低BB,L,CROSS(支62 线Q,支62线,0),COLORFF37AA 丄INETHICK1;支72:DRAWLINE(新低BB,L,CROSS(支72 线Q,支72线z O),COLORFF37AA,LINETHICKl;支87:DRAWLINE(新低BB Z L,CROSS(支87 线Q,支87线z O),COLORFF37AA 丄INETHICK1;DRAWLINE(C v强支撑,强支撑,MA1*1・O5 > =强支撑,强支撑z O),COLOROOOOFF,LINETHICK2;DRAWLINE(Cv支50 线,支50 线,MAl*1.05>=支50 线,支50线,0),COLORFF37AA Z LINETHICK1;DRAWLINE(Cv支62 线,支62 线,MA1*1.O5>=支62 线,支62线,0),COLORFF47AA 丄INETHICK1;DRAWLINE(Cv支72 线,支72 线,MA1*1.O5>=支72 线,支72线z O),COLORFF57AA,LINETHICKl;B27 线: = DRAWLINE(Cv支27 线/支27 线,MA1*1.O5>=支27 线,支27 线O),COLORAAAAAA 丄INETHICK1;zDF:=7*SMA((CLOSE-LLV(LOW,2 7))/ (HHV(HIGH,27)-LLV(LOW,27))*30z4,l) -3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,2 7)-LLV(LOW z27))*30z4,l),3 ,1) -SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,2 7)-LLV(LOW,27))*30,4,l)3,1)Z2Z1),COLOROOEEFF,LINETHICK1;ZKF:=EMA(MA(DF Z5), 7),COLOR777777,LINETHICK1;个股EMA:=EMA(EMA(100*(C-LLV(LOW,NN))/(HHV(H,NN)-LLV(LOW,NN))Z3),2),CO LORAAAAFF,LINETHICK1;个股转向线:=ZIG(个股EMA,15),COLOROODDOO,LINETHICK1; 持仓:=IF(个股转向线〉REF(个股转向线,2),个股转向线,DRAWNULL);空仓:=IF(个股转向线<=REF(个股转向线,2),个股转向线QRAWNULL);KD 转|R]:=IF(ZIG((H+L)*0.5Z5)=ZIG(3,5),ZIG(3,5),ZIG((H+L)*0.5,5));RSV:=(KD 转向-LLV(KD 转向,8))/(HHV(KD 转向,8)-LLV(KD 转向,8))*100;K:=SMA(RSV,3Z1),COLOR336688,LINETHICK2;D:=SMA(K Z3,1),COLOR809000,LINETHICK2;DC6:EMA(CYC6,20),COLOR1000AA 丄INETHICK1;DC5:EMA(CYC6,16),COLOR!OOOAA,LINETHICK1;DC4:EMA(CYC6,12),COLOR1000AA,LINETHICK1;DC3:EMA(CYC6,9),COLOR1000AA,LINETHICK1; DC2:EMA(CYC6,7),COLOR1000AA,LINETHICK1; DC1:EMA(CYC6,5),COLOR1000AA 丄INETHICK1;KI:=BACKSET(DC1 <=REF(DC1, l)z2);IF(K1,DC1,DRAWNULL),COLORBB9900,LINETHICK1;K2:=BACKSET(DC2v=REF(DC2,l),2);IF(K2,DC2,DRAWNULL),COLORBB9900Z LINETHICK1;K3:=BACKSET(DC3<=REF(DC3,1),2);IF(K3,DC3,DRAWNULL),COLORBB9900,LINETHICK1;K4:=BACKSET(DC4<=REF(DC4,1),2);IF(K4,DC4,DRAWNULL),COLORBB9900,LINETHICK1;K5:=BACKSET(DC5<=REF(DC5,1),2);IF(K5,DC5,DRAWNULL),COLORBB9900,LINETHICK1;K6:=BACKSET(DC6<=REF(DC6Z1),2);IF(K6,DC6,DRAWNULL),COLORBB9900,LINETHICK1;DH:=MAX(MAX(DC1Z DC3)Z DC6);XL:=MIN(MIN(DC1,DC3),DC6);STICKLINE((成本转向>=REF(成本转向,1) OR波浪线>=REF(波浪线,1) OR周CK>=周CD) AND CROSS(CQCl) AND CROSS(C,DC3) AND DH/XL< 1.025 AND DC2>=DC6 AND DC44> = REF(DC44,1) AND VOL/REF(VOL,1)>1.1 AND C>0 AND (C-REF(C,l))/REF(C z l)>0.027,C,0,2.6,0),COLOR1800DD;箱顶:=PEAK(CLOSE,10Z1)*0.98,COLOR808080;箱底:=TROUGH(CLOSE/10,1)*1.02,COLOR0066AA;箱高: = 100*(箱顶■箱底)/箱底,NODRAW;箱底1:=DRAWLINE(CROSS(C,箱底),箱底,CROSS(箱顶 Q,箱底,0),COLOR000090;箱顶1:DRAWLINE(CROSS(箱顶’C),箱顶,CROSSQ 箱顶),箱顶O),COLORFFOOOO; 箱底A:DRAWTEXT(CROSS(C,箱底)ANDzC>REF(H,l),(H+L)/2;■箱底•),COLORFFOOFF;波低:=DRAWICON(CROSS(ZIG(3,15),REF(ZIG(3Z15),1)) AND (月RSI1>月RSI3 OR 波浪线〉=REF(波浪线Z1)),LOW Z25);波高:二DRAWICON((月RSI1<月RSI3 OR 波浪线v=REF(波浪线,1)) AND CROSS(REF(ZIG(3z15),l)z ZIG(3z15)) AND DF<REF(DF,1)/HIGH,14);劲下:STICKLINE(波高OR (CROSS(,,RSI.RSI3#WEEK,,z,,RSLRSI2#WEEK n) AND 月RSI3>月RSI1 AND 波浪线vREF(波浪线,1)),CQ20),COLORFF7700;劲上:STICKLINE(CROSS(波浪线Z REF(波浪线,1)) AND (CROSS(ARSI,CRSI) OR CROSS(周CK,周CD) OR CROSS(月MK,月MD))z C,O,1.5,0),COLOR008899; STICKLINE((个股换手率>=沪深换手OR VOL/(REF(VOL,1)+REF(VOL,2))/2>1・1) AND 持仓AND 波浪线>REF(波浪线,1) AND C>阻支HL AND (C・REF(C,1))/REF(C,1)>0.02 AND (CROSS(C,成木)OR CROSS(C,SAR 空)OR CROSS©趋势线4) OR CROSS((H+L)*0・5,箱顶)OR CROSS((H+L)*0・5,牛箱)ORCROSS((H+L)*0・5,牛熊屮轴)AND C>(H・L)*0・725+L AND(C-REF(C,l))/REF(C,l)>0.027),C,0,0.8,0),COLORAA33FF;BOL:=DRAWICON(CROSS(L,BOLL) AND CROSS(CQCl) AND CR0SS(C,DC3) AND DC3> = REF(DC3,1)AND BOLL>=REF(BOLL,1) AND VOL/REF(VOL,1)>1.15 AND 波浪线〉二REF (波浪线,1) AND Cx今口阻力,今口支撑,13);周金RK: = DRAWTEXT(CROSS(H RSLRSIl#WEEK,7,RSI.RSI3#WEEK n) AND CROSS(周CK,周CD)丄,RK**)Z COLORFFAAFF;周死RK:二DRAWTEXT(CROSSCRSI・RSI3#WEEKTRSI・RSI1#WEEK”)AND CROSS(周CD,周CK),H; RK^jCOLORCCCCCC;月金RR:=CROSS(”RSI・RSI2#WEEKTRSI・RSI3#WEEie)AND CRSI・RSI2#MONTH”>iRSI・RSI3#MONTH“)AND (,,RSLRSIl#MONTH n>,,RSI.RSI2#MONTH H) AND 成本转向〉=REF(成本转向,1);空A38:DRAWTEXT((CROSS(趋势线E,C) OR CROSS(强支撑,C)) AND 波浪线v = REF(波浪线38「),COLOROOEEOO;空A50:DRAWTEXT(CROSS(趋势线FQ AND 波浪线v二REF(波浪线50 I jCOLOROOEEOO;空A62:DRAWTEXT(CROSS(趋势线D Z C) AND 波浪线 v二REF(波浪线62 I 'COLOROOEEOO;波多柱:STICKLINE((波浪线> = REF(波浪线,1) OR波浪阻支〉二REF(波浪阻支,1))AND K>=REF(K,l),C,O z O,0)z COLORFF58FF;下波柱:STICKLINE((空仓OR 波浪线v二REF(波浪线z l)) AND K<=REF (K,1)AND C<O z C,O z0,0)z COLORFFEEEE;KD 下:STICKLINE(KvREF(K,l) AND 波浪线vREF(波浪线,1) AND 空仓AND C <(H+L)*0.5,C z O,0.5z l),COLOREEAA00;阻支ZGA:=IF(C<=阻支,阻支,今日阻力);阻支ZGB:=IF(C>阻支「阻支'今日支撑);STICKLINE(C<=0,阻支ZGA,阻支ZGA z2,0),COLOR87EEOO;STICKLINE(C>0 OR C>阻支HL,今日阻力,今□阻力z2z O)z COLOREE66FF;STICKLINE(C>今日支撑,阻支ZGB,阻支ZGB z2,l),COLOR777888;上穿压:二DRAWICON(波浪线> =只丘卩(波浪线,1) AND C>阻支HL AND DC3>=DC3 AND (个股换手率>=沪深换手AND VOL/REF(VOL,1)>1.15)AND成木转向〉=REF(成木转向,1) AND (CROSS(C,成木)ORCROSS((H+L)*0・5,SAR 空)OR BOL OR CROSS((H+L)*0・5,牛熊中轴)OR CROSS((H+L)*0・5,牛箱)OR CROSS(C,箱顶1)),阻支ZGB,1);穿上:DRAWICON(持仓AND ARSIxCRSI AND C>(H+L)*0・5 AND (CROSS©支87 线)OR CROSS(C,支72 线)OR CROSS(C,支62 线)OR CROSS(C,支50 线)OR CROSS(C,强支撑)ORCROSS(C,支27 线)OR CROSS(C,趋势线A) OR CROSS(C,趋势线B) OR CROSS(C, 趋势线C) OR CROSS©箱底)OR上穿压),阻支ZGB z l);穿下:DRAWICON((CROSS(支27 线,(H・L)*0・625+L) OR CROSS(强支撑,波浪线)OR CROSS(支50线,波浪线)OR CROSS(支62线/波浪线)OR CROSS(支72线/ 波浪线)OR CROSS(支87线Q)AND C<0 AND (波浪线<=[^卩(波浪线,1) OR 波髙),(H・L)*0・971+L,15);刀金RK: = DRAWTEXT(CROSS(n RSI.RSI2#WEEK,7,RSI.RSI3#WEEK H) AND CROSS(月MK,月MD) AND成木转向>=(^=(成木转向,1)丄,★月金RKJ/COLOROOEEFF;DRAWTEXT((月金RR OR 月金RK) AND C>阻支丄,E 金叉'),COLOROOFFEE;X 高:=DRAWTEXT(CROSS(REF(ZIG(3,15)z l),ZIG(3z15)) AND Cv=(H+L)/2,H, 新高ICOLOROOEEOO;X 低:DRAWTEXT(CROSS(ZIG(3,15),REF(ZIG(3Z15),1)) AND C>=(H+L)/乙今日支撑,新低jCOLOROOBBAA;DRAWICON((月RSI1<月RSI3 OR 波浪线v=REF(波浪线,1)) ANDCROSS(REF(ZIG(3Z15),1)Z ZIG(3Z15)) AND DFvREF(DF,l),HIGH,2);。

鳄鱼全套指标 通达信指标公式源码

鳄鱼全套指标 通达信指标公式源码

鳄鱼全套指标通达信指标公式源码证券交易新空间》提供了鳄鱼指标的源码,其中包括鳄鱼线、AO指标和AC指标。

源码未加密。

如果想了解如何使用这些指标,建议阅读《证券混沌操作法》一书,该书对此进行了详细的介绍。

计算鳄鱼线的公式如下:Y:=(HIGH+CLOSE+LOW)/3;吻线:REF(SMA(Y,5,1),3),COLORGREEN;齿线:REF(SMA(Y,8,1),5),COLORRED;颚线:REF(SMA(Y,13,1),8),COLORBLUE;接下来,我们来介绍如何使用鳄鱼指标进行交易。

首先,我们需要定义一些变量:VAR2:=H>=REF(H,1)&&H>=REF(H,2)&&H>REFX(H,1)& &H>REFX(H,2);VAR3:=L<=REF(L,1)&&L<=REF(L,2)&&L<REFX(L,1)& &L<REFX(L,2);DRAWICON(VAR2,1.02*HIGH,1);DRAWICON(VAR3,0.98*LOW,2);然后,我们可以计算MA55指标:MA55:=MA(CLOSE,55);根据MA55指标的变化,我们可以判断市场趋势的方向:上升:IF(MA55>REF(MA55,1),MA55,DRAWNULL),COLORMAG ENTA;下降:IF(MA55<REF(MA55,1),MA55,DRAWNULL),COLORWHIT E;最后,我们来计算AO和AC指标:AO:=SMA(Y,5,1)-SMA(Y,34,1);AC:=SMA((AO-SMA(AO,5,1)),5,1);根据AO和AC指标的变化,我们可以判断市场的买卖信号:VAR4:=AO>REF(AO,1) AND AC>REF(AC,1);VAR5:=AO<REF(AO,1) AND AC<REF(AC,1);VAR6:=AO>=REF(AO,1) AND AC<=REF(AC,1);VAR7:=AO=REF(AC,1);XXX(VAR4.H,L,0,1),COLORRED;STICKLINE(VAR4 AND C>=O,O,C,2.5,1),COLORRED;XXX(VAR4 AND C<O,O,C,2.5,1),COLORRED;XXX(VAR4 AND C<O,O,C,2.5,0),COLORRED;XXX(VAR5.H,L,0,1),COLORGREEN;以上就是使用鳄鱼指标进行交易的基本方法。

通达信系统交易系统公式

通达信系统交易系统公式

通达信系统交易系统公式通达信是国内比较流行的股票交易系统,它采用公式编程的方式,可以完成多种技术指标和交易系统的编写。

下面是一些通达信系统交易公式的例子:1.移动平均线:通达信中有多种移动平均线的计算方法,如简单移动平均线(MA)、指数移动平均线(EXPMA)和加权移动平均线(MAV)等。

可以通过以下公式计算简单移动平均线:MA(N)=(C1+C2+…+CN)/N其中,MA(N)表示N日简单移动平均线的数值,Ci表示第i日的收盘价,N表示移动平均线的周期。

2.相对强弱指标(RSI):RSI是一种衡量价格上涨与下跌力量的指标,可以通过以下公式计算:RSI=100-(100/(1+RS))其中,RS表示相对强度(RS)的数值,RS=(P1/P2),P1为一段时间内上涨总幅度,P2为一段时间内下跌总幅度。

3.布林带指标:布林带指标是利用标准差计算的一种波动性指标,可以通过以下公式计算:上轨=MA(N)+K*STD(N)中轨=MA(N)下轨=MA(N)-K*STD(N)其中,上轨、中轨和下轨分别表示布林带指标的上、中、下轨线,MA(N)表示N日移动平均线,STD(N)表示N日收盘价的标准差,K为参数。

4.动态止损指标:通达信系统中有多种动态止损指标的计算方法,如追踪止损、固定止损和ATR止损等。

以追踪止损为例,可以通过以下公式计算:止损价格=MAX(止损价格,最高价*(1-追踪比例))其中,追踪比例是一个参数,用于控制追踪止损的幅度。

5.策略信号:通达信系统中可以通过编写公式来生成策略信号,例如通过以下公式确定买入信号:买入信号=条件1AND条件2其中,条件1和条件2是一些指标的计算结果,可以根据具体的交易策略进行设定。

这只是通达信系统交易公式的一些例子,实际的公式可以根据需要进行调整和编写。

通达信系统交易公式的编写要求熟悉编程语言和技术指标的计算方法,同时还需要对交易策略有一定的了解和经验。

通达信三元主图指标公式程序源码编程思路破译及风险提示

通达信三元主图指标公式程序源码编程思路破译及风险提示

通达信三元主图指标公式程序源码编程思路破译及风险提示编程思路破译填充背景K线MV10赋值:成交量(手)的10日简单移动平均AVG_V赋值:(成交量(手)-MV10)/MV10*100量差赋值:AVG_V-1日前的AVG_V假阴赋值:收盘价>1日前的收盘价 AND 收阴线高开赋值:(开盘价-1日前的收盘价)/1日前的收盘价*100倍量赋值:成交量(手)>1日前的成交量(手)*1.69 AND 成交量(手)>1日前的20日内成交量(手)的最高值振幅赋值:(最高价-最低价)/1日前的收盘价*100ZF赋值:(收盘价-1日前的收盘价)/1日前的收盘价*100涨停赋值:收盘价/1日前的收盘价>1.095三元赋值:最近3日一直存在涨停 OR 最近2日一直存在涨停XG1赋值:1日前的三元 AND 倍量XG2赋值:三元 AND 倍量XG0610赋值:三元 AND 量差>1日前的20日内量差的最高值XG2265赋值:1日前的最近2日一直存在涨停AND 振幅>15 AND ZF>0.5 AND 倍量XG600352赋值:高开>=6 AND 假阴AND 1日前的最近2日一直存在涨停 AND 倍量XG3赋值:XG2 OR XG1 OR XG0610 OR XG2265 OR XG600352 XGOK赋值:XG3的2日过滤当满足条件XGOK>0时,在最低价*0.98位置画4号图标输出T:上次XGOK距今天数,NODRAW输出支撑1:T+1日前的收盘价,NODRAW输出支撑2:T+2日前的收盘价,NODRAW输出支撑:T日前的收盘价,NODRAW当满足条件开盘价时,在支撑1和支撑1位置之间画柱状线,宽度为5,-1不为0则画空心柱.,COLOR22B4EE当满足条件开盘价时,在支撑2和支撑2位置之间画柱状线,宽度为5,-1不为0则画空心柱.,COLOR0000FF当满足条件开盘价时,在支撑和支撑位置之间画柱状线,宽度为5,-1不为0则画空心柱.,画绿色V1赋值:上次XGOK>0距今天数V2赋值:V1日前的收盘价V12赋值:收盘价上穿V2V13赋值:收盘价>V2 AND 1日前的最低价<V2V15赋值:V1+1日前的收盘价V16赋值:V1+2日前的收盘价V11赋值:收盘价>1日前的收盘价AND 最低价<1日前的收盘价AND XGOK=0 AND 1日前的XGOK>0V14赋值:V12>0 OR V13>0 OR V11>0X11赋值:V1>0 AND 收盘价/1日前的收盘价>1.085 AND V14>0X12赋值:V11>0 OR X11>0买3赋值:X12>0的2日过滤当满足条件买3>0时,在最低价*0.97位置书写文字,画绿色买2赋值:V1>0 AND 收盘价/1日前的收盘价>1.01 AND 收盘价上穿V15 AND V1<9当满足条件买2>0时,在最低价*0.95位置书写文字,画绿色买1赋值:V1>0 AND 收盘价/1日前的收盘价>1.01 AND 收盘价上穿V16 AND V1<9当满足条件买1>0时,在最低价*0.90位置书写文字,画绿色Z1赋值:上次收盘价上穿T日前的收盘价距今天数PZ赋值:Z1>0 AND 统计Z1日中满足收盘价和开盘价的较大值>T 日前的收盘价的天数=Z1 AND Z1<20 AND 收盘价/1日前的收盘价>1.085PZ1赋值:PZ>0的10日过滤PZ2赋值:T>1ANDCOUNT(收盘价和开盘价的较大值>T日前的收盘价,T)=TANDT<20ANDC/1日前的收盘价>1.085的10日过滤P3赋值:PZ1 OR PZ2当满足条件P3>0时,在最低价*0.98位置画23号图标输出流通市值:流通市值/100000000,NODRAW,画黄色XA8赋值:1日前的收盘价/3日前的收盘价>=1.2 AND 开盘价/1日前的收盘价<=1.01 AND 最低价<1日前的收盘价 AND 收盘价/1日前的收盘价>1.05启动8赋值:XA8 AND 统计4日中满足XA8的天数=1当满足条件启动8时,在最低价*1.06位置书写文字,画绿色A11111赋值:收阴线AND 收盘价>1日前的收盘价 AND 开盘价/1日前的收盘价>1.03A21111赋值:1日前的15日内成交量(手)的最高值A31111赋值:A11111 AND 成交量(手)>A21111当满足条件A31111时,在开盘价和收盘价位置之间画柱状线,宽度为2.5,0不为0则画空心柱.,画绿色N2赋值:14A17赋值:(成交量(手)=N2日内成交量(手)的最高值)K0赋值:到最后交易的周期=A17累加至1的天数的最后一日取值设为常数K17赋值:上次A17距今天数K27赋值:K17日前的收盘价和开盘价的较大值K21赋值:K17日前的最低价K3赋值:到最后交易的周期=A17累加至2的天数的最后一日取值设为常数K4赋值:上次K3距今天数K5赋值:K4日前的收盘价和开盘价的较大值NOTEXT1赋值:如果到最后交易的周期<A17累加至1的天数的最后一日取值设为常数,返回K27的最后一日取值设为常数,否则返回无效数, 画红色NOTEXT2赋值:如果到最后交易的周期<A17累加至2的天数的最后一日取值设为常数,返回K5的最后一日取值设为常数,否则返回无效数,画红色输出NOTEXT3:如果到最后交易的周期<A17累加至1的天数的最后一日取值设为常数,返回K21的最后一日取值设为常数,否则返回无效数,画绿色,线宽为1涨幅赋值:(收盘价-1日前的收盘价)/1日前的收盘价*100梯量9赋值:最近3日一直存在收阳线AND 最近2日一直存在收盘价>1日前的收盘价 AND 最近2日一直存在成交量(手)>1日前的成交量(手) AND 涨幅的3日累和<15梯量4赋值:1日前的梯量9 AND 收盘价>=1日前的收盘价当满足条件梯量9的2日过滤时,在最高价位置书写文字,COLOR888888BK5赋值:上次到最后交易的周期=上次梯量9的2日过滤距今天数的最后一日取值设为常数+1距今天数,COLORD355BA 输出T35:BK5日前的最高价,线宽为1,COLORD355BA当满足条件到最后交易的周期=1时,在横轴0.9纵轴0.1位置书写文字当满足条件1时,在横轴0.01纵轴0.05位置书写文字COLOR0066BB当满足条件1时,在横轴0.03纵轴0.05位置书写文字COLOR0066BB当满足条件1时,在横轴0.01纵轴0.10位置书写文字画淡绿色当满足条件1时,在横轴0.03纵轴0.10位置书写文字画黄色当满足条件1时,在横轴0.03纵轴0.25位置书写文字COLOR70DB93当满足条件1时,在横轴0.01纵轴0.15位置书写文字COLOR0000FF当满足条件1时,在横轴0.03纵轴0.15位置书写文字COLOR0000FFU11赋值:5U21赋值:11U31赋值:9UPPER赋值:(1+U21/100)*收盘价的U11日简单移动平均LOWER赋值:(1-U31/100)*收盘价的U11日简单移动平均ENE1赋值:(UPPER+LOWER)/2出轨赋值:收盘价上穿UPPER AND 最高价=收盘价画青色A14赋值:流通股本(股)<120000000B14赋值:流通股本(股)<300000000 AND 流通股本(股)>120000000C14赋值:流通股本(股)<500000000 AND 流通股本(股)>300000000D14赋值:流通股本(股)<800000000 AND 流通股本(股)>500000000E19赋值:流通股本(股)<1300000000 AND 流通股本(股)>800000000A88赋值:涨幅<0.03 AND 涨幅>0.006 AND 量比>10 AND 成交量(手)*200/当前离开盘分钟数/1日前的成交量(手)的5日简单移动平均>3B赋值:现量S19赋值:最低价>(2日前的最高价+0.001) AND 收盘价>1日前的收盘价 AND 收盘价>收盘价的20日简单移动平均*1.20 AND 成交量(手)*200/当前离开盘分钟数/1日前的成交量(手)的5日简单移动平均>3竞价龙头赋值:S19 OR (A14 AND A88=1 AND B>1200) OR (B14 AND A88=1 AND B>3000)OR (C14 AND A88=1 AND B>5000)OR (D14 AND A88=1 AND B>8000)OR (E19 AND A88=1 AND B>13000) 画红色GK1赋值:开盘价>1日前的收盘价FD赋值:开盘价/1日前的收盘价ZT33赋值:收盘价/1日前的收盘价>1.09 OR 收盘价/1日前的收盘价>1.19GK2赋值:如果GK1>0ANDFD>1日前的FDANDREF(ZT33,1)>0ANDREF(GK1,1)>0,返回1,否则返回0 GK3赋值:GK2>0 AND GK1>0 AND ZT33>0 AND 统计4日中满足ZT33>0的天数<4墨轩寻牛赋值:出轨 AND (竞价龙头 OR GK3)墨轩寻牛1赋值:出轨 AND 竞价龙头当满足条件墨轩寻牛时,在最低价*0.96位置画25号图标当满足条件墨轩寻牛1时,在最低价*0.94位置画24号图标程序源码DRAWGBK(O>C,RGB(0,30,0),RGB(0,0,60),0,'01',0);DRAWKLINE(H,O,L,C);MV10:=MA(V,10);AVG_V:=(V-MV10)/MV10*100;量差:=AVG_V-REF(AVG_V,1);假阴:=C>REF(C,1) AND C<O;高开:=(O-REF(C,1))/REF(C,1)*100;倍量:=V>REF(V,1)*1.69 AND V>REF(HHV(V,20),1);振幅:=(H-L)/REF(C,1)*100;ZF:=(C-REF(C,1))/REF(C,1)*100;涨停:=C/REF(C,1)>1.095 ;三元:=EVERY(涨停,3) OR EVERY(涨停,2);XG1:=REF(三元,1) AND 倍量;XG2:=三元 AND 倍量;XG0610:=三元 AND 量差>REF(HHV(量差,20),1);XG2265:=REF(EVERY(涨停,2),1) AND 振幅>15 AND ZF>0.5 AND 倍量;XG600352:=高开>=6 AND 假阴AND REF(EVERY(涨停,2),1)AND 倍量;XG3:=XG2 OR XG1 OR XG0610 OR XG2265 OR XG600352;XGOK:=FILTER(XG3,2);DRAWICON(XGOK>0,L*0.98,4);T:BARSLAST(XGOK),NODRAW;支撑1:REF(C,T+1),NODRAW;支撑2:REF(C,T+2),NODRAW;支撑:REF(C,T),NODRAW;STICKLINE(O,支撑1,支撑1,5,-1),COLOR22B4EE;STICKLINE(O,支撑2,支撑2,5,-1),COLOR0000FF;STICKLINE(O,支撑,支撑,5,-1),COLORGREEN;V1:=BARSLAST(XGOK>0);V2:=REF(C,V1);V12:=CROSS(C,V2);V13:=C>V2 AND REF(L,1)<V2 ;V15:=REF(C,V1+1); V16:=REF(C,V1+2);V11:=C>REF(C,1) AND L<REF(C,1) AND XGOK=0 AND REF(XGOK,1)>0;V14:=V12>0 OR V13>0 OR V11>0;X11:=V1>0 AND C/REF(C,1)>1.085 AND V14>0;X12:=V11>0 OR X11>0;买3:=FILTER(X12>0,2);DRAWTEXT(买3>0,L*0.97,'3'),COLORGREEN;买2:=V1>0 AND C/REF(C,1)>1.01 AND CROSS(C,V15) AND V1<9;DRAWTEXT(买2>0,L*0.95,'2'),COLORGREEN;买1:=V1>0 AND C/REF(C,1)>1.01 AND CROSS(C,V16) AND V1<9;DRAWTEXT(买1>0,L*0.90,'1'),COLORGREEN;Z1:=BARSLAST(CROSS(C,REF(C,T)));PZ:=Z1>0 AND COUNT(MAX(C,O)>REF(C,T),Z1)=Z1 ANDZ1<20 AND C/REF(C,1)>1.085;PZ1:=FILTER(PZ>0,10);PZ2:=FILTER(T>1 AND COUNT(MAX(C,O)>REF(C,T),T)=T AND T<20 AND C/REF(C,1)>1.085,10);P3:=PZ1 OR PZ2;DRAWICON(P3>0,L*0.98,23);流通市值:FINANCE(40)/100000000,NODRAW,COLORYELLOW;XA8:=REF(C,1)/REF(C,3)>=1.2 AND O/REF(C,1)<=1.01 AND L<REF(C,1) AND C/REF(C,1)>1.05;启动8:=XA8 AND COUNT(XA8,4)=1;DRAWTEXT(启动8,L*1.06,'风'),COLORGREEN;A11111:=O>C AND C>REF(C,1) AND O/REF(C,1)>1.03;A21111:=REF(HHV(V,15),1);A31111:=A11111 AND V>A21111;STICKLINE(A31111,O,C,2.5,0),COLORGREEN;N2:=14;A17:=(VOL=HHV(VOL,N2));K0:=CURRBARSCOUNT=CONST(SUMBARS(A17,1));K17:=BARSLAST(A17);K27:=REF(MAX(C,O),K17);K21:=REF(L,K17);K3:=CURRBARSCOUNT=CONST(SUMBARS(A17,2));K4:=BARSLAST(K3);K5:=REF(MAX(C,O),K4);NOTEXT1:=IF(CURRBARSCOUNT<CONST(SUMBARS(A17,1)) ,CONST(K27),DRAWNULL), COLORRED;NOTEXT2:=IF(CURRBARSCOUNT<CONST(SUMBARS(A17,2)) ,CONST(K5),DRAWNULL),COLORRED;NOTEXT3:IF(CURRBARSCOUNT<CONST(SUMBARS(A17,1)), CONST(K21),DRAWNULL),COLORGREEN,LINETHICK1;{梯量3}涨幅:=(C-REF(C,1))/REF(C,1)*100;梯量9:=EVERY(C>O,3) AND EVERY(C>REF(C,1),2) AND EVERY(V>REF(V,1),2) AND SUM(涨幅,3)<15;梯量4:=REF(梯量9,1) AND C>=REF(C,1);DRAWTEXT(FILTER(梯量9,2),H,'T3'),COLOR888888;BK5:=BARSLAST(CURRBARSCOUNT=CONST(BARSLAST(FILT ER(梯量9,2)))+1),COLORD355BA;T35:REF(H,BK5),LINETHICK1,COLORD355BA;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.9,0.1,1,EXTERNSTR( 0,9997)); { 涨停原因}DRAWTEXT_FIX(1,0.01,0.05,0,'板块:')COLOR0066BB;DRAWTEXT_FIX(1,0.03,0.05,0,STRCAT(STRCAT(STRCAT(STRC AT(HYBLOCK,'_____'),GNBLOCK),'__'),DYBLOCK))COLOR0066BB; {板块信息}DRAWTEXT_FIX(1,0.01,0.10,0,'同花:')COLORLIGREEN; {同花顺}DRAWTEXT_FIX(1,0.03,0.10,0,EXTERNSTR(0,9886))COLORYEL LOW;DRAWTEXT_FIX(1,0.03,0.25,0,EXTERNSTR(0,9601))COLOR70 DB93 ;DRAWTEXT_FIX(1,0.01,0.15,0,'游资:')COLOR0000FF;DRAWTEXT_FIX(1,0.03,0.15,0,EXTERNSTR(0,9701))COLOR00 00FF; {游资协战席位};U11:=5;U21:=11;U31:=9;UPPER:=(1+U21/100)*MA(CLOSE,U11);LOWER:=(1-U31/100)*MA(CLOSE,U11);ENE1:=(UPPER+LOWER)/2;出轨:=CROSS(C,UPPER) AND H=C COLORCYAN;{竞价龙头副图}A14:=FINANCE(7)<120000000;B14:=FINANCE(7)<300000000 AND FINANCE(7)>120000000;C14:=FINANCE(7)<500000000 AND FINANCE(7)>300000000;D14:=FINANCE(7)<800000000 AND FINANCE(7)>500000000;E19:=FINANCE(7)<1300000000 AND FINANCE(7)>800000000;A88:=DYNAINFO(14)<0.03 AND DYNAINFO(14)>0.006 AND DYNAINFO(17)>10 AND V*200/FROMOPEN/REF(MA(V,5),1)>3;B:=DYNAINFO(9);S19:=LOW>(REF(HIGH,2)+0.001) AND C>REF(C,1) AND C>MA(C,20)*1.20 AND V*200/FROMOPEN/REF(MA(V,5),1)>3;竞价龙头:=S19 OR (A14 AND A88=1 AND B>1200) OR (B14 AND A88=1 AND B>3000)OR (C14 AND A88=1 AND B>5000)OR (D14 AND A88=1 AND B>8000)OR (E19 AND A88=1 AND B>13000) COLORRED;GK1:=O>REF(C,1);FD:=O/REF(C,1);ZT33:=C/REF(C,1)>1.09 OR C/REF(C,1)>1.19;GK2:=IF(GK1>0 AND FD>REF(FD,1) AND REF(ZT33,1)>0 AND REF(GK1,1)>0,1,0);GK3:=GK2>0 AND GK1>0 AND ZT33>0 AND COUNT(ZT33 >0,4)<4;墨轩寻牛:=出轨 AND (竞价龙头 OR GK3);墨轩寻牛1:=出轨 AND 竞价龙头;DRAWICON(墨轩寻牛,L*0.96,25);DRAWICON(墨轩寻牛1,L*0.94,24);风险提示该公式包含未来函数:DYNAINFO该公式包含未来函数:FINANCE注:馆内各种公式为学习编程而保存,实战使用前一定要看其成功率回测数据和风险提示或者自己亲自测试近期成功率,决不能依据公式名称的描述和形容去投资,据此入市造成投资损失由投资者自己承担。

AOAC混沌指标详解及源码

AOAC混沌指标详解及源码

AOAC混沌指标详解及源码⽣命是永恒不断的创造,因为在它内部蕴含着过剩的精⼒,它不断流溢,越出时间和空间的界限,它不停地追求,以形形⾊⾊的⾃我表现的形式表现出来。

--泰⼽尔感觉以下内容太⿇烦的请参考我的1684 指标(988元),作为 AO AC 指标的简化版,⼀看就懂,不⽤想什么各种信号了。

△▲道⽒理论的基本法则⼀、平均指数包含⼀切;⼆、市场有三种趋势;1、主要趋势(⼀年甚⾄⼏年);2、次要趋势(三个星期到三个⽉,调整位通常为先前趋势运动的三分之⼀⾄三分之⼆,最常见的为百分之五⼗);3、⼩趋势(不到三个星期,细微波动)。

三、主要趋势分为三个阶段;1、收集阶段(经过⼀轮⼤的下跌,市场“利空”消息不断,价格开始企稳,机敏的投资者开始买⼊);2、公众参与阶段(价格加速上扬,消息开始转好,⼤多数技术型趋势追随者开始参与);3、派发阶段(所有报刊开始刊登看涨故事时,所有⼈投⾝市场时,机敏的投资者开始卖出)。

四、各种平均指数必须相互验证;五、成交量必须印证趋势;1、上升趋势中,成交量伴随上涨⽽增加,下跌⽽减少;2、下降趋势中,成交量伴随下跌⽽增加,上涨⽽减少。

六、趋势在给出明确的反转信号之前被假定⼀直有效;1、失效摆动;⾼点C挑战⾼点A失败,随后市场跌破低点B,构成了在点S处的“卖出信号”。

2、⾮失效摆动。

⾼点C突破⾼点A,随后市场跌破低点B构成S1处的第⼀个“卖出信号”,接着市场反弹到⾼点E,最后跌破低点D构成S2处的第⼆个“卖出信号”。

注:失效摆动和⾮失效摆动在底部时同样有⽤.证券混沌操作法:鳄鱼线证券混沌操作法是由⽐尔·威廉姆(Bill Williams)发展和推⼴的,他声称这是⼀套能在全球任何市场长期获取利润的交易⽅法。

⽬前已有不少交易员使⽤这套⽅法在市场中进⾏交易。

鳄鱼线是运⽤分形⼏何学和⾮线性动⼒学的⼀组平均线(实际上就是⼀种⽐较特别的均线)。

它分为蓝、红、绿三条。

蓝线被称为鳄鱼的颚部,红线被称为鳄鱼的⽛齿,绿⾊被称为鳄鱼的唇吻。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

VAR1:=(H+L)/2;
AO:=SMA(VAR1,5,1)-SMA(VAR1,34,1),COLOR6699CC;
AC:=SMA((AO-SMA(AO,5,1)),5,1),COLOR6699CC;
X1:=AO>REF(AO,1) AND AC>REF(AC,1);
X2:=AO<REF(AO,1) AND AC<REF(AC,1);
Y:=(H+L)/2;
RED:=SMA(Y,8,1);
R2:=REF(RED,5);
KU1:=IF(H=HHV(H,3),1,0);
KD1:=IF(L=LLV(L,3),1,0);
UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0 AND
KU1=0,REF(H,2),REF(H,2+BARSLAST(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0)));
DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND
KD1=0,REF(L,2),REF(L,2+BARSLAST(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0)));
蓝:SMA(Y,13,1),COLORBLUE;
红:SMA(Y,5,1),COLORRED;
绿:SMA(Y,3,1),COLORGREEN;
上张:=蓝>=REF(蓝,1) AND 红>=REF(红,1) AND 绿>=REF(绿,1);
下张:=蓝<REF(蓝,1) AND 红<REF(红,1) AND 绿<REF(绿,1);
上碎:=IF(H>=R2,UL,REF(UL,BARSLAST(H>R2)));
下碎:=IF(L<=R2,DL,REF(DL,BARSLAST(L<=R2)));
STICKLINE(BARSLAST(ABS(上碎-REF(上碎,1)))<BARSLAST(C>上碎AND REF(C,1)<REF(上碎,1)),上碎,上碎,3,1),COLORMAGENTA;
STICKLINE(BARSLAST(ABS(下碎-REF(下碎,1)))<BARSLAST(C<下碎AND REF(C,1)>REF(下碎,1)),下碎,下碎,3,1),COLORCYAN;
LC := REF(C,4);
RMI:=SMA(MAX(C-LC,0),7,1)/SMA(ABS(C-LC),7,1)*100;
QS:= HHV(MA(RMI,3),13),COLOR00ADFF;
RMIMA:= SMA(RMI,3,1),COLOR009C00;
DRAWTEXT(C>上碎&&ISLASTBAR=1,H+0,'向上突破有效上碎型
'),COLOR0000FF;
DRAWTEXT(C<下碎&&ISLASTBAR=1,L-0,'向下有效碎型被突破
'),COLORFFFF00;
DRAWTEXT(X1>0&&ISLASTBAR=1,H+0.3,'AO与AC为多方趋势
'),COLORFF00FF;
DRAWTEXT(X2>0&&ISLASTBAR=1,L-0.3,'AO与AC为空方趋势
'),COLOR00FF00;
DRAWTEXT(上张&&ISLASTBAR=1,H+0.6,'鳄鱼向上张嘴'),COLOR999999; DRAWTEXT(下张&&ISLASTBAR=1,L-0.6,'鳄鱼向下张嘴'),COLOR999999; DRAWTEXT(上张&&X1>0&&ISLASTBAR=1,H+0.8,'怀疑中期多头
'),COLORFF00FF;
DRAWTEXT(下张&&X2>0&&ISLASTBAR=1,L-0.8,'怀疑中期空头
'),COLOR00FF00;
DRAWTEXT((RMI>RMIMA&&RMI<QS)&&ISLASTBAR=1,H+1,'小心做多'),COLOR00FFFF;
DRAWTEXT((RMI>RMIMA&&RMI>QS)&&ISLASTBAR=1,H+1,'坚决做多'),COLOR0000FF;
DRAWTEXT((RMI<RMIMA&&RMI>20)&&ISLASTBAR=1,L-1,'坚决做空'),COLORFF0000;
DRAWTEXT((RMI<RMIMA&&RMI<20)&&ISLASTBAR=1,L-1,'小心做空'),COLORFF00FF;。

相关文档
最新文档