通达信双重MACD副图公式 源码 支持手机
无敌MACD通达信指标公式源码
无敌MACD 低位金叉二次金叉顶底背离上下提示箭头因为要画线所以有未来,但不会漂移DIFF1:=EMA(CLOSE,12)-EMA(CLOSE,27);DEA1:=EMA(DIFF1,9);MACD:=2*(DIFF1-DEA1),STICK;STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,3.2,0),COLORB20000; STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2.7,0),COLOREC0000; STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2.1,0),COLORFF4600; STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1.5,0),COLORFF6300; STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,0.9,0),COLORFF8B00; STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,0.3,0),COLORFFAB00; STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,3.2,0),COLOR000055; STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2.7,0),COLOR000077; STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2.1,0),COLOR000099; STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1.5,0),COLOR0000BB; STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,0.9,0),COLOR0000DD; STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,0.3,0),COLOR0000FF; STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,3.2,0),COLOR555555; STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2.7,0),COLOR777777; STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2.1,0),COLOR999999; STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1.5,0),COLORBBBBBB; STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,0.9,0),COLORDDDDDD;STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,0.3,0),COLORFFFFFF; STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,3.2,0),COLORB20000; STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2.7,0),COLOREC0000; STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2.1,0),COLORFF4600; STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,1.5,0),COLORFF6300; STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,0.9,0),COLORFF8B00; STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,0.3,0),COLORFFAB00; STICKLINE(MACD>=0 OR MACD<=0,0,0,50,2),COLORWHITE;DIFF:DIFF1,COLOR33FF33;DEA:DEA1,COLORYELLOW;强度:IF(DIFF>=DEA,DIFF,DRAWNULL),COLORRED;低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;DRAWTEXT(低位金叉,-0.1,'^ 低位金叉'),COLORYELLOW;JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1; DRAWICON(二次金叉,DEA*1.04,13) ;DRAWTEXT(二次金叉,-0.1,' 二次金叉'),COLORFF00FF;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA); 底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,POINTDOT;DRAWTEXT(底背离,0.1,'底背离'),COLORMAGENTA;A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF); 顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,POINTDOT;DRAWTEXT(顶背离,DIFF,'顶背离'),COLORGREEN;多转空:=((((LLV(MACD,4)>0) AND (MACD<REF(MACD,1))) AND(REF(MACD,1)>REF(MACD,2))) AND (REF(MACD,2)>REF(MACD,3)));空转多:=((((HHV(MACD,4)<0) AND (MACD>REF(MACD,1))) AND(REF(MACD,1)<REF(MACD,2))) AND (REF(MACD,2)<REF(MACD,3)));DRAWICON(多转空,MACD,2);DRAWICON(空转多,MACD,1);STICKLINE(二次金叉,0,0.2,2,0),COLORFF00FF;DRAWTEXT(二次金叉,DEA*1.06,'二次金叉'),COLORRED;。
MACD 通达信副图指标 无未来通达信指标公式源码
SQX:=(C-MA(CLOSE,13))*100;DIF:EMA(MA(SQX,7),1),LINETHICK1;DEA:EMA(DIF,7),LINETHICK1;MACD: (DIF-DEA)*2,COLORSTICK;红柱持股:IF(MACD>REF(MACD,1),MACD,DRAWNULL),STICK,COLORRED,LINETHICK3;绿柱持币:IF(MACD<REF(MACD,1),MACD,DRAWNULL),STICK,COLORGREEN,LINETHICK3; 低位金叉:IF(CROSS(DIF,DEA) AND DIF<-0.1,0.3,0),COLORYELLOW,POINTDOT; STICKLINE(低位金叉,0,10,8,1),COLORYELLOW;DRAWICON(低位金叉,0.3,1);JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));二次金叉:IF(CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1,0.2,0),COLORFF00FF,POINTDOT;STICKLINE(二次金叉,25,15,8,1),COLORFF00FF;A1:=BARSLAST(REF(CROSS(DIF,DEA),1));底背离:IF(REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA),0.1,0),COLORRED,POINTDOT;STICKLINE(底背离,40,30,8,1),COLORMAGENTA;DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORMAGENTA,LINETHICK3;A2:=BARSLAST(REF(CROSS(DEA,DIF),1));顶背离:REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF),COLORGREEN;DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORBLUE,LINETHICK3;A3:=CROSS(DIF,DEA) AND DEA<0;零下二次金叉:IF(FILTER(COUNT(A3,21)=2,10),0.05,0),COLORWHITE,POINTDOT; STICKLINE(零下二次金叉,45,55,8,1),COLORWHITE;金叉:DRAWICON(CROSS(DIF,DEA),DIF,1); 死叉:DRAWICON(CROSS(DEA,DIF),DIF,2);。
MACD通达信副图指标无未来通达信指标公式源码.docx
SQX:=(C-MA(CLOSE,13))*100;DIF:EMA(MA(SQX Z7),1)丄INETHICK1;DEA:EMA(DI£7)丄INETHICK1;MACD: (DIF-DEA)*2,COLORSTICK;红柱持股:IF(MACD>REF(MACD,1),MACD,DRAWNULL),STICK,COLORRED 丄INETHICK3; 绿柱持币:IF(MACDvREF(MACDJ),MACD,DRAWNULL),STICK,COLORGREEN 丄INETHICK3; 低位金义:IF(CROSS(DI£DEA) AND DIF<-0.1,0.3,0),COLORYELLOW,POINTDOT;STICKLINE(低位金叉,0,10,8,1),COLORYELLOW;DRAWICON(低位金叉,0.3,1);JCCOUNT:=COUNT(CROSS(DIF;DEA),BARSU\ST(DEA>=0));二次金叉:IF(CROSS(DIF,DEA) AND DEA<0 AND COUNT(兀COUNT=2,21)=1,0・2,0),COLORFF00FF,POINTDOT;STICKLINE(二次金叉,25,15,8,1),COLORFFOOFF;A1:=BARSU\ST(REF(CROSS(DIF,DEA)Z1));底背离:IF(REF(CLOSE Z A1+1)>CLOSE AND DIF>REF(DI£A1+1) ANDCROSS(DI£DEA)Q1,0),COLORRED,POINTDOT;STICKLINE(底背离z40z30,8z l),COLORMAGENTA;DRAWLINE(A1=O,DEA Z底背离z DEA z O),COLORMAGENTA,LINETHICK3;A2:=BARSLJXST(REF(CROSS(DEA,DIF)Z1));顶背离:REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF),COLORGREEN;DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORBLUE 丄INETHICK3;A3:=CROSS(DI£DEA) AND DEA<0;零下二次金叉:IF(FILTER(COUNT(A3,21)=2,10),0.05,0),COLORWHITE,POINTDOT; STICKLINE(零下二次金叉,45,55,8,1),COLORWHITE;金义:DRAWICON(CROSS(DIFQEA)QI£1); 死叉:DRAWIC0N(CR0SS(DEAQIF),DI£2);。
MACD双背离通达信指标公式源码
macd双背离DIFF: EMA(CLOSE,12) - EMA(CLOSE,26);DEA: EMA(DIFF,9);MACD: 2*(DIFF-DEA),COLORSTICK;JC:=DEA-DIFF;绿柱面积:=IF(MACD<0,SUM(MACD,BARSLAST(JC<0)),0);红柱面积:=IF(MACD>0,SUM(MACD,BARSLAST(JC>0)),0);本次最低价:=LLV(L,BARSLAST(JC<0));本次最高价:=HHV(H,BARSLAST(JC>0));X1:=IF (MACD<0,BARSLAST(CROSS(DIFF,DEA)),0);前次绿柱面积:=REF(绿柱面积,X1+1);前次最低价:=REF(本次最低价,X1+1);Y1:=IF((绿柱面积<0 AND ABS(绿柱面积)<ABS(前次绿柱面积)AND 本次最低价<前次最低价),1,0);RS1:= MACD<0 AND REF(MACD,1)<0 AND C<前次最低价AND ABS(绿柱面积)<ABS(前次绿柱面积) AND ABS(MACD)<ABS(REF(MACD,1)); 底背驰:= IF (CROSS(DIFF,DEA),REF(Y1,1),0);DRAWTEXT(底背驰,-0.01,'积底'),COLORRED;{DRAWBAND(DIFF,RGB(200,50,55),DEA,RGB(50,100,10));}X2:=IF (MACD>0,BARSLAST(CROSS(DEA,DIFF)),0);前次红柱面积:=REF(红柱面积,X2+1);前次最高价:=REF(本次最高价,X2+1);Y2:=IF((红柱面积>0 AND 红柱面积<前次红柱面积AND 本次最高价>前次最高价),1,0); RS2:= MACD>0 AND REF(MACD,1)>0 AND C>前次最高价AND ABS(红柱面积)<ABS(前次红柱面积) AND ABS(MACD)<ABS(REF(MACD,1));顶背驰:= IF (CROSS(DEA,DIFF),REF(Y2,1),0);DRAWTEXT(顶背驰,0.01,'积顶'),COLORGREEN;A11:=BARSLAST(REF(CROSS(DIFF,DEA),1));JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));底背离:=REF(CLOSE,A11+1)>CLOSE AND DIFF>REF(DIFF,A11+1) ANDCROSS(DIFF,DEA);DRAWTEXT(底背离,DEA,' 线底'),COLORRED;A22:=BARSLAST(REF(CROSS(DEA,DIFF),1));顶背离:=REF(CLOSE,A22+1)<CLOSE AND REF(DIFF,A22+1)>DIFF ANDCROSS(DEA,DIFF);DRAWTEXT(顶背离,DEA,'线顶'),COLORGREEN;A1:=DIFF<0 AND DEA<0;A2:=A1>REF(A1,1);A3:=BARSLAST(A2);。
通达信MACD资金趋势幅图公式 源码 手机版测试通过
移动平均线发展而来的,由快的移动平均线减去慢的移动平均线。
MACD的意义和双移动平均线基本相同,但阅读起来更方便。
当MACD以大角度变化,表示快的移动平均线和慢的移动平均线的差距非常迅速的拉开,代表了一个市场大趋势的转变。
当MACD从负数转向正数,是买的信号。
当MACD从正数转向负数,是卖的信号。
MACD指标是由两线一柱组合起来形成,快速线为DIF,慢速线为DEA,柱状图为MACD。
在各类投资中,有以下方法供投资者参考:1、当DIF和MACD均大于0(即在图形上表示为它们处于零线以上)并向上移动时,一般表示为行情处于多头行情中,可以买入开仓或多头持仓;2、当DIF和MACD均小于0(即在图形上表示为它们处于零线以下)并向下移动时,一般表示为行情处于空头行情中,可以卖出开仓或观望;3、当DIF和MACD均小于0时(即在图形上表示为它们处于零线以下)但向上移动时,一般表示为行情即将上涨,股票将上涨,可以买入开仓或多头持仓。
买卖原则:1、DIF、DEA均为正,DIFF向上突破DEA,买入信号参考。
2、DIF、DEA均为负,DIFF向下跌破DEA,卖出信号参考。
3、DEA线与K线发生背离,行情可能出现反转信号。
4、MACD的值从正数变成负数,或者从负数变成正数并不是交易信号,因为它们落后于市场。
构造原理MACD指标是基于均线的构造原理,对价格收盘价进行平滑处理(求出算术平均值)后的一种趋向类指标。
它主要由两部分组成,即正负差(DIF)、异同平均数(DEA),其中,正负差是核心,是辅助。
DIF是快速平滑移动平均线(EMA1)和慢速平滑移动平均线(EMA2)的差。
在现有的技术分析软件中,MACD常用参数是快速平滑移动平均线为12,慢速平滑移动平均线参数为26。
此外,MACD还有一个辅助指标——柱状线(BAR)。
在大多数技术分析软件中,柱状线是有颜色的,在低于0轴以下是绿色,高于0轴以上是红色,前者代表趋势较弱,后者代表趋势较强。
通达信指标公式源码彩色MACD指标副图源码
通达信指标公式源码彩色MACD指标副图源码[object Object]彩色MACD指标是一种技术分析指标,用于判断股票或其他金融资产价格的趋势和买卖信号。
它是在传统的MACD指标基础上进行改进,通过在MACD指标的柱状图上添加颜色来增加指标的可读性和直观性。
下面是通达信软件中彩色MACD指标的源码:```python#定义彩色MACD指标函数def Colorful_MACD(ema1, ema2, dea, color1, color2):DIFF = ema1 - ema2DEA = deaMACD=2*(DIFF-DEA)color = [color1 if diff >= 0 else color2 for diff in DIFF]return MACD, DIFF, DEA, color#使用彩色MACD指标函数计算指标数值MACD, DIFF, DEA, color = Colorful_MACD(EMA(CLOSE, 12),EMA(CLOSE, 26), EMA(MACD, 9), COLORRED, COLORGREEN)#绘制彩色MACD指标副图PlotBar(MACD, DIFF, DEA, 0, color, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)```上述代码中,Colorful_MACD函数用于计算彩色MACD指标的数值。
函数的输入参数分别为短期指数移动平均(EMA)和长期EMA的数值,以及MACD的DEA数值。
函数根据DIFF(短期EMA减去长期EMA)的正负来确定颜色,如果DIFF大于等于0,则使用color1(例如COLORRED)作为颜色,否则使用color2(例如COLORGREEN)作为颜色。
函数的输出为MACD、DIFF、DEA和color四个变量。
通达信指标公式源码 macd副图指标,逃顶抄底,买卖利器
RSV:=(CLOSE-LLV(LOW,11))/(HHV(HIGH,11)-LLV(LOW,11))*100;DIF:EMA(CLOSE,12)-EMA(CLOSE,26);DEA:EMA(DIF,9);MACD:(DIF-DEA)*2,COLORSTICK;DIFF:=EMA(CLOSE,12)-EMA(CLOSE,27);DEA1:=EMA(DIFF,9);MACD1:=2*(DIFF-DEA1),COLORSTICK,LINETHICK2;趋势:=MA(MACD,1);DRAWICON(MACD1>REF(MACD1,1) AND 趋势>0 ,趋势,1);低位金叉:=CROSS(DIF,DEA) AND DIF<-0.1;JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=(3*K-2*D);DRAWTEXT(二次金叉,DEA*1,'低二叉'),COLORYELLOW;周DIF:="MACD.DIF#WEEK"(12,26,9);周DEA:="MACD.DEA#WEEK"(12,26,9);周MACD:="MACD.MACD#WEEK"(12,26,9);DIF周金叉:=CROSS(周DIF,周DEA);DRAWTEXT(DIF周金叉,0,'周叉'),COLORYELLOW;DRAWTEXT(CROSS(周DEA,周DIF),0,'周死'),COLORGREEN;MACD周金叉:=CROSS(周MACD,周DIF) AND 周MACD>=(0-0.05) AND 周MACD<=0.02; VARR:=EMA(EMA(CLOSE,13),13);控盘:=(VARR-REF(VARR,1))/REF(VARR,1)*1000;A10:=CROSS(控盘,0);控盘B:=FILTER(IF(A10,1,0),5);JJ:=DYNAINFO(11);P:=55;S:=8;M1:=3;刘:=(EMA(CLOSE,S)-EMA(CLOSE,P))*10;剑:=EMA(刘,M1);BTJ11:=(C-JJ)/JJ<-0.03;BTJ2:=控盘>REF(控盘,1) AND 控盘<-0.2;BTJ3:=CROSS(刘,剑) AND 刘<-0.3;BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,13);庄:= BTJ11 AND BTJ2 AND BTJ3;有庄:=FILTER(庄,55),COLORWHITE;DRAWTEXT(BTJ811,-0.2,'★有庄'),COLORYELLOW;DRAWTEXT(CROSS(J,-3),DIF,'出击'),COLORWHITE;A1:=BARSLAST(REF(CROSS(EMA(CLOSE,12)-EMA(CLOSE,26),EMA(EMA(CLOSE,12)-EMA( CLOSE,26),9)),1));底背离:=REF(CLOSE,A1+1)>CLOSE AND EMA(CLOSE,12)-EMA(CLOSE,26)>REF(EMA(CLOSE,12)-EMA(CLOSE,26),A1+1) AND CROSS(EMA(CLOSE,12)-EMA(CLOSE,26),EMA(EMA(CLOSE,12)-EMA(CLOSE,26),9));底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORMAGENTA,LINETHICK2;A2:=BARSLAST(REF(CROSS(EMA(EMA(CLOSE,12)-EMA(CLOSE,26),9),EMA(CLOSE,12)-E MA(CLOSE,26)),1));顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(EMA(CLOSE,12)-EMA(CLOSE,26),A2+1)>EMA(CLOSE,12)-EMA(CLOSE,26) AND CROSS(EMA(EMA(CLOSE,12)-EMA(CLOSE,26),9),EMA(CLOSE,12)-EMA(CLOSE,26));顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;。
双周期MACD通达信指标公式源码
双周期MACD通达信指标公式源码以下是双周期MACD通达信指标公式的源码,可以在通达信软件中使用。
```c/*--------------------------------------------------------------------------公式名称:双周期MACD英文名称:BIPERIOD_MACD附&注:其中周期1表示短周期,周期2表示长周期制作:通达信软件修改:通达信软件所属系统:通达信金融终端参数说明:周期1:周期2:本周期上涨的股票数:return[0]本周期下跌的股票数:return[1]上一周期上涨的股票数:return[2]上一周期下跌的股票数:return[3]返回值:无--------------------------------------------------------------------------*/double ema[2][2];double avg[2][2];void BIPERIOD_MACD(CArray& CLOSE, CArray& VOL, int n1, int n2)int i, j;double *dPre, *dCur;int n;double Trem;double TREND[10][2],ASON[10][2];for(i = 0; i < CLOSE.GetCount(; i++)n = (int)CLOSE.GetIndex(i);Trem = VOL.GetIndex(i);if(i == 0)ema[0][n] = CLOSE.GetVar(i);avg[0][n] = CLOSE.GetVar(i);Trend[n][i] = 0;Ason[N][i] = 0;}elseema[0][n] = ema[0][n]+2/(n1+1)*(CLOSE.GetVar(i)-ema[0][n]);ema[1][n] = ema[1][n]+2/(n2+1)*(CLOSE.GetVar(i)-ema[1][n]);avg[0][n-1] = avg[0][n-1]+2/(9+1)*(CLOSE.GetVar(i)-avg[0][n-1]);avg[1][n-1] = avg[1][n-1]+2/(9+1)*(CLOSE.GetVar(i)-avg[1][n-1]);Trend[n][i] = CLOSE.GetVar(i)-CLOSE.GetVar(i-1)-(avg[0][n]-avg[0][n-1]);Ason[N][i] = Ason[n][i-1]+2/(10+1)*(Trend[n][i]-Ason[n][i-1]);if (Trend[n][i]>0 && i>1 && Trend[n][i]>Ason[n][i] &&Trend[n][i-1]<Ason[n][i-1])return[0]++;}if (Trend[n][i]<0 && i>1 && Trend[n][i]<Ason[N][i] &&Trend[n][i-1]>Ason[N][i-1])return[1]++;}if (Trend[n][i]>0)return[2]++;}if (Trend[n][i]<0)return[3]++;}}}```这段代码实现了双周期MACD指标的计算。
通达信指标公式源码 MACD精品副图源码
{改良MACD}LC:=REF(C,1);预量:=IF(ISLASTBAR,V*240/FROMOPEN,V),NODRAW;量比:=预量/MA(REF(V,1),5),NODRAW;JJ:=(L+H+C*2)/4;DI:(EMA(C,12)-EMA(C,26))/C*500,COLORFF00FF;DE:EMA(DI,9),LINETHICK1,COLORFFFFFF;STICKLINE(DI>REF(DI,1) AND DI>DE AND MA(C,20)>REF(MA(C,20),1),-15,15,1,0),COLOR000066;MACD:(DI-DE)*2,COLORSTICK,COLORFFAA00;金:IF(((MACD<=-50 OR (MACD<=-30 AND MA(C,11)>REF(MA(C,11),1) AND MA(C,20)>REF(MA(C,20),1)AND MA(C,60)>REF(MA(C,60),1)) AND (H>LC OR C<LLV(LC,6)*0.98) AND C=LLV(C,10) AND (L=LLV(L,15)OR C<LLV(L,15)*1.015))) AND 预量<REF(V,1) AND 预量<MA(V,5) AND H<LLV(REF(L,1),2)*1.06 AND C>LC*0.9014 AND H>LC AND C<L*1.025,48,0),LINETHICK2,COLOR00FFFF; 银:IF(LLV(MACD,8)<-40 AND (C=LLV(C,11) OR L=LLV(L,11)) ANDDOWNNDAY(C,2) AND NDAY(O,C,2) AND 预量<REF(V,1) AND 预量<MA(V,5) AND C>LC*0.9015AND H<REF(H,1) AND H<LLV(REF(L,1),2)*1.06 AND C<L*1.02,45,0),LINETHICK4,COLORFFFFFF,STICK;低:IF(MACD<-26 AND HHV(DE,10)-DE>25 AND HHV(DI,250)<10 AND ((C=LLV(C,11) AND (L=LLV(L,15) OR C<LLV(L,15)*1.015)) OR (L<MA(C,5)*0.9 AND MA(C,5)/C>1.05)) AND H>LC ANDC<MA(C,5)*0.96AND H>LC AND C<L*1.025 AND H<LLV(REF(L,1),2)*1.06 AND C>LC*0.9014 AND预量<REF(V,1),38,0),LINETHICK2,COLOR0099FF;买:IF((LLV(DI,5)<-50) AND C<LLV(REF(L,1),10) AND H<LLV(REF(L,1),2)*1.06 AND C<L* 1.015 AND C>LC*0.9014 AND PERIOD=5 AND 预量<HHV(V,10),32,0),LINETHICK2,COLORFF00FF;抢:IF(LLV(MACD,10)<-16.2 AND HHV(DI,250)<10 AND C<MA(C,10)*0.92 AND L<MA(C,5)*0.88 ANDC<MA(C,5)*0.947 AND H>LC AND C=LLV(C,10) AND (L=LLV(L,10) OR C<LLV(L,10)*1.015) AND C<L*1.01 AND V<HHV(V,10) AND C>LC*0.901 AND H<LLV(REF(L,1),2)*1.06 AND H>LC AND C<L*1.025,30,0), LINETHICK2,COLORFF99FF;低2:IF(((MACD<-35 AND C<LLV(REF(L,1),10) AND C<L*1.02 AND H<LLV(REF(L,1),2)*1.06) OR((LLV(MACD,10)<-20 OR LLV(DE,10)<-30) AND C>400)) AND C=LLV(C,10) AND L=LLV(L,10),15,0),LINETHICK3,STICK,COLORFFAA00;买2:IF((HHV(REF(金,1),12)=10 AND C=LLV(C,10) AND (L=LLV(L,15) OR C<LLV(L,15)*1.015) ANDH>LC AND C>LC*0.9014) AND C*1.025>H AND H>LC AND C<L*1.025 AND H<LLV(REF(L,1),2)*1.06,-MACD,0),LINETHICK2,COLORCC00FF;高:IF(MACD>35 AND MACD>REF(MACD,1) AND C<LC*1.0985,-5,DRAWNULL),LINETHICK6,CROSSDOT,COLOR00FF00;卖:IF(HHV(MACD,4)>=42 AND (C=HHV(C,10) AND ((H=HHV(H,10) OR H>LC*1.07) OR C<MA(C,20)))AND (L<LC OR C>MA(C,5)*1.15) AND C<LC*1.0985,-10,0),STICK,LINETHICK3,COLOR00CC00;危:IF(HHV(MACD,7)>42 AND C=HHV(C,10) AND H=HHV(H,10) AND C<LC*1.0985 AND PERIOD=5,-10,0),LINETHICK3,STICK,COLORFFFFFF;大盘危:IF(HHV(MACD,8)>15 AND C>400 AND C<LC*1.0985 AND C=HHV(C,10) AND H=HHV(H,10),-15,0),COLORFFFFFF,LINETHICK4,STICK;DRAWICON(LLV(MACD,5)<-30 AND C>LC*0.9014 AND C<=O AND C=LLV(C,10) AND L=LLV(L,10),MACD,9);DRAWTEXT_FIX(ISLASTBAR AND DI>REF(DI,1) AND DI>DE AND C>MA(C,20),0.97,0.05,1,'上涨持股'),COLORYELLOW;。
通达信双重MACD副图公式 源码 支持手机
公式源码:STICKLINE(C>0,0,0,10,0),COLORGRAY;M6:=(EMA(c,5)+EMA(c,6))/2;M12:=EMA(c,12);M26:=EMA(c,26);M56:=ema(C,56);M121:=ema(C,121);xdif:((M6-M121)/2+(M12-M56+M26-M121)/2+M6-M26)/3,COLORWHITE;XDEA:ema(XDIF,3),COLORCYAN;XMACD:=2*(xdif-XDEA),LINETHICK,COLORWHITE;DIF:(M56-M121+(M26-M121)/2+(M12-M121)/3+(M6-M121)/4)/4,COLORMAGENTA; DEA:ema(DIF,9),COLORGREEN;MACD:2*(DIF-DEA),LINETHICK,COLOR00CCCC;BMACD:(MACD+XMACD/2)/2,LINETHICK,COLORRED;STICKLINE(BMACD>=0,0,BMACD,2,1),COLORRED;STICKLINE(BMACD<0,0,BMACD,2,1),COLOR00bb00;STICKLINE(MACD>=0,0,MACD,0,0),COLOR00CCCC;STICKLINE(MACD<0,0,MACD,0,0),COLORCYAN;....通达信电脑版公式导入方法A:源码导入1、把要导入的公式(源码)复制下来:方法是用左键先把源码变蓝,之后点右键,点复制;2、进入主界面,即K线图模式,同时按住CTRL+F,出现公式管理器-->用鼠标左键单击任何一个公式组的名称(选择技术指标公式或者条件选股公式)-->单击其他-->点新建公式-->在出现的公式编辑区的下面的空白处,把刚拷的源码粘贴上,将公式名称复制后粘贴到公式名称栏-->确定-->退出;3.如有参数的,如:N 1 100 15 之类,则需将这类数据填充到参数表中;B:文件指标导入1、先把指标文件复制到桌面(或者你知道的路径);2、打开通达信,按CTRL+F打开公式管理器点击“导入”按钮;3、找到桌面上要导入的公式选中”公式“后单击左键,后点击“打开”;4、把“+”号单击展开,在公式名前的空方框里单击成“勾选”后,在点击下方的“确认”;5、输入指标名称,回车即可。
分享两个手机版通达信的指标源码(PC端也适用)
分享两个手机版通达信的指标源码(PC端也适用)第一个:不用DLL的缠画笔指标,建议作为主图CLG:=MA(C,5);CLD:=MA(C,10);CLHH:=REF(H,5)=HHV(H,11);CLLL:=REF(L,5)=LLV(L,11);CLFG01:=BACKSET(CLHH,6)>BACKSET(CLHH,5) ;CLFD01:=BACKSET(CLLL,6)>BACKSET(CLLL,5) ;CLFG02:=IF(BARSLAST(CLFG01)=BARSLAST(CLFD01) AND CLG>CLD,CLFG01,IF(BARSLAST(CLFD01)>BARSLAST(CLFG01),CLFG01,0));CLFD02:=IF(BARSLAST(CLFG01)=BARSLAST(CLFD01) AND CLD>CLG,CLFD01,IF(BARSLAST(CLFG01)>BARSLAST(CLFD01),CLFD01,0));CLFG0:=CLFG02 AND H=HHV(H,BARSLAST(CLFD02));CLFD0:=CLFD02 AND L=LLV(L,BARSLAST(CLFG02));CLGP:=IF(CLFG0,H,DRAWNULL),CIRCLEDOT,COLORCYAN;CLDP:=IF(CLFD0,L,DRAWNULL),CIRCLEDOT,COLORCYAN;CLGQ:=L>REF(H,1) AND DAY!=REF(DAY,1);CLDQ:=H<REF(L,1) AND DAY!=REF(DAY,1);CLGQL:=REF(L,BARSLAST(CLGQ));CLDQH:=REF(H,BARSLAST(CLDQ));CLFGH:=REF(H,BARSLAST(CLFG0));CLFGL:=REF(L,BARSLAST(CLFG0));CLFGH1:=REF(H,BARSLAST(CLFG0)+1);CLFGL1:=REF(L,BARSLAST(CLFG0)+1);CLFGH2:=REF(H,BARSLAST(CLFG0)+2);CLFGL2:=REF(L,BARSLAST(CLFG0)+2);CLFDH:=REF(H,BARSLAST(CLFD0));CLFDL:=REF(L,BARSLAST(CLFD0));CLFDH1:=REF(H,BARSLAST(CLFD0)+1);CLFDL1:=REF(L,BARSLAST(CLFD0)+1);CLFDH2:=REF(H,BARSLAST(CLFD0)+2);CLFDL2:=REF(L,BARSLAST(CLFD0)+2);CLFGZH:=IF(CLFGL<=CLFGL1,CLFGH2,CLFGH1);CLFGZL:=IF(CLFGH1<CLFGL,CLFGL,IF(CLFGL<=CLFGL1,CLFG L2,CLFGL1));CLFDZH:=IF(CLFDL1>CLFDH,CLFDH,IF(CLFDH>=CLFDH1,CL FDH2,CLFDH1));CLFDZL:=IF(CLFDH>=CLFDH1,CLFDL2,CLFDL1);CLFG1:=CLFGH>CLFDZH AND CLFG0;{好股票}CLFD1:=CLFDL<CLFGZL AND CLFD0;CLFG:=CLFG1 AND CLFGH>CLFDH AND CLFGL>CLFDL AND CLFGL1>CLFDL;CLFD:=CLFD1 AND CLFDL<CLFGL AND CLFDH<CLFGH AND CLFDH1<CLFGH;CLBH0:=(H<=REF(H,1) AND L>=REF(L,1)) OR (H>=REF(H,1) AND L<=REF(L,1));CLBHG:=COUNT(CLBH0,BARSLAST(CLFD0));CLBHD:=COUNT(CLBH0,BARSLAST(CLFG0));CLBGQ:=COUNT(CLGQ,BARSLAST(CLFD0));CLBDQ:=COUNT(CLDQ,BARSLAST(CLFG0));CLBK0:=IF(CLBHG>0,CLBHG+2+1,IF(CLBHD,CLBHD+2+1,3));CLBK:=IF(CLBGQ,CLBK0-CLBGQ,IF(CLBDQ,CLBK0-CLBDQ,CLBK0));CLG1X:=(CLFG AND BARSLAST(CLFD)>CLBK);CLD1X:=(CLFD AND BARSLAST(CLFG)>CLBK);CLG1:=(CLFG0 ANDREF(H,BARSLAST(CLFG0))>=REF(H,BARSLAST(CLG1X)) AND BARSLAST(CLD1X)>BARSLAST(CLG1X)) OR (CLFG1 AND COUNT(CLGQ,BARSLAST(CLFD1))>0 AND REF(H,BARSLAST(CLFG1))>REF(H,BARSLAST(CLG1X)));CLD1:=(CLFD0 AND REF(L,BARSLAST(CLFD0))<=REF(L,BARSLAST(CLD1X)) AND BARSLAST(CLG1X)>BARSLAST(CLD1X)) OR (CLFD1 AND COUNT(CLDQ,BARSLAST(CLFG1))>0 AND REF(L,BARSLAST(CLFD1))<REF(H,BARSLAST(CLD1X)));CLG1H:=IF(BARSLAST(CLD1)>BARSLAST(CLG1),REF(H,BARS LAST(CLG1)),REF(H,BARSLAST(CLD1))),;CLD1L:=IF(BARSLAST(CLG1)>BARSLAST(CLD1),REF(L,BARSL AST(CLD1)),REF(L,BARSLAST(CLG1)));CLG2:=CLG1 AND H=HHV(CLG1H,BARSLAST(CLD1)+1) AND H>REF(H,1) AND BARSLAST(CLD1)>BARSLAST(CLG1);CLD2:=CLD1 AND L=LLV(CLD1L,BARSLAST(CLG1)+1) AND L<REF(L,1) AND BARSLAST(CLG1)>BARSLAST(CLD1);CLG3:=CLG2 OR (CLFG0 AND REF(H,BARSLAST(CLFG0))>REF(H,BARSLAST(CLG2)) AND BARSLAST(CLD2)>BARSLAST(CLG2));CLD3:=CLD2 OR (CLFD0 AND REF(L,BARSLAST(CLFD0))<REF(L,BARSLAST(CLD2)) AND BARSLAST(CLG2)>BARSLAST(CLD2));CLGPB:=IF(CLG1X,H,DRAWNULL),CIRCLEDOT,COLORYELLO W;CLDPB:=IF(CLD1X,L,DRAWNULL),CIRCLEDOT,COLORYELLOW;{画线}CLNN:=CLG3;CLUU:=CLD3;DRAWLINE(CLUU,L,CLNN, H,0),COLORYELLOW,DOTLINE;DRAWLINE(CLNN,H,CLUU, L,0),COLORWHITE,DOTLINE;第二个建议作为附图,MACD背驰参数:最小最大默认笔参数 1 999 3段参数 1 999 3DIF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORRED,LINETHICK2;DEA:EMA(DIF,9);IF(DIF<DEA,DIF,DRAWNULL),COLORBLACK,LINETHICK2;MACD:(DIF-DEA)*2,COLORSTICK;笔低A:=LOW<=LLV(LOW,笔参数),NODRAW;笔高A:=HIGH>=HHV(HIGH,笔参数),NODRAW;笔低:=笔低A AND 笔高A=0,NODRAW;笔高:=笔高A AND 笔低A=0,NODRAW;上笔:=DRAWLINE(笔低,LOW,笔高,HIGH,0)COLOR0000FF;下笔:=DRAWLINE(笔高,HIGH,笔低,LOW,0),COLOR00FF00;拐下:=上笔>REF(上笔,1) AND 下笔>REFX(下笔,1),NODRAW;拐上:=下笔<REF(下笔,1) AND 上笔<REFX(上笔,1),NODRAW;段低A:=LOW<=LLV(LOW,段参数*笔参数),NODRAW;段高A:=HIGH>=HHV(HIGH,段参数*笔参数),NODRAW;段低:=段低A AND 段高A=0,NODRAW;段高:=段高A AND 段低A=0,NODRAW;上段:=DRAWLINE(段低,LOW,段高,HIGH,0),LINETHICK2,COLORMAGENTA;下段:=DRAWLINE(段高,HIGH,段低,LOW,0),LINETHICK2,COLORFF8000;特殊底:=下段=上段 AND 段低 AND MACD<0,NODRAW;TTT:=REF(BARSLAST(特殊底),1)+1;底背离1:=特殊底AND LOW<REF(LOW,TTT) AND DIF>REF(DIF,TTT) AND LLV(DIF,BARSLASTCOUNT(MACD<0))>REF(DIF,TTT),NODRAW;底背左点1:=BACKSET(底背离1,TTT+1) AND REF(BACKSET(底背离1,TTT+1),1)=0 AND 特殊底;DRAWLINE(底背左点1,DIF,底背离1,DIF,0),COLORFF00FF,LINETHICK2;底背离2:=特殊底AND LOW<REF(LOW,TTT) AND MACD>REF(MACD,TTT) AND LLV(MACD,BARSLASTCOUNT(MACD<0))>REF(MACD,TTT),NODR AW;底背左点2:=BACKSET(底背离2,TTT+1) AND REF(BACKSET(底背离2,TTT+1),1)=0 AND 特殊底;DRAWLINE(底背左点2,MACD,底背离2,MACD,0),COLORFF00FF,LINETHICK1;特殊顶:=下段=上段 AND 段高 AND MACD>0,NODRAW;TTTG:=REF(BARSLAST(特殊顶),1)+1;顶背离1:=特殊顶AND HIGH>REF(HIGH,TTTG) AND DIF<REF(DIF,TTTG) AND HHV(DIF,BARSLASTCOUNT(MACD>0))<REF(DIF,TTTG),NODRAW;顶背左点1:=BACKSET(顶背离1,TTTG+1) AND REF(BACKSET(顶背离1,TTTG+1),1)=0 AND 特殊顶;DRAWLINE(顶背左点1,DIF,顶背离1,DIF,0),COLORGREEN,LINETHICK2;顶背离2:=特殊顶AND HIGH>REF(HIGH,TTTG) AND MACD<REF(MACD,TTTG) AND HHV(MACD,BARSLASTCOUNT(MACD>0))<REF(MACD,TTTG),NO DRAW;顶背左点2:=BACKSET(顶背离2,TTTG+1) AND REF(BACKSET(顶背离2,TTTG+1),1)=0 AND 特殊顶;DRAWLINE(顶背左点2,MACD,顶背离2,MACD,0),COLORGREEN,LINETHICK1;DRAWTEXT(底背离2=1,MACD,'柱背离'),COLORFF00FF;DRAWTEXT(底背离1=1,DIF,'线背离'),COLORFF00FF;DRAWTEXT(顶背离2=1,MACD,'←柱背离'),COLORGREEN;DRAWTEXT(顶背离1=1,DIF,'←线背离'),COLORGREEN;DRAWICON(REF(DIF,1)>REF(DIF,2) AND DIF<REF(DIF,1) AND DIF>0 AND DIF>DEA,DIF*1.1,2),COLORGREEN;DRAWICON(REF(DIF,1)<REF(DIF,2) AND DIF>REF(DIF,1) AND DIF<0 AND DIF<DEA,DIF*1.1,1),COLORRED;XA_2:=BARSLAST(REF(MACD,1)<0 AND MACD>0);XA_3:=LLVBARS(MACD,XA_2+20);XA_4:=IF(XA_3>XA_2,REF(MACD,XA_3),0);XA_5:=MACD<0 AND MACD>XA_4 AND LOW=LLV(LOW,XA_2+20) AND XA_4<0;柱背离1:=(REF(XA_5,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,XA_3)<0 AND MACD<0),NODRAW;DRAWLINE(XA_4=XA_3,MACD,柱背离1,MACD,0),COLORRED,LINETHICK1;DRAWICON(柱背离1,0,26);柱背离A:BARSLAST(柱背离1>0)+1,NODRAW;柱背离:BARSLAST(底背离2>0)+1,NODRAW;线背离:BARSLAST(底背离1>0)+1,NODRAW;DRAWRECTREL(0,965,130,999,RGB(0,0,1)),NOFRAME;以上就是分享的两个指标,大家别忘了点个赞哈。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
公式源码:
STICKLINE(C>0,0,0,10,0),COLORGRAY;
M6:=(EMA(c,5)+EMA(c,6))/2;
M12:=EMA(c,12);
M26:=EMA(c,26);
M56:=ema(C,56);
M121:=ema(C,121);
xdif:((M6-M121)/2+(M12-M56+M26-M121)/2+M6-M26)/3,COLORWHITE;
XDEA:ema(XDIF,3),COLORCYAN;
XMACD:=2*(xdif-XDEA),LINETHICK,COLORWHITE;
DIF:(M56-M121+(M26-M121)/2+(M12-M121)/3+(M6-M121)/4)/4,COLORMAGENTA; DEA:ema(DIF,9),COLORGREEN;
MACD:2*(DIF-DEA),LINETHICK,COLOR00CCCC;
BMACD:(MACD+XMACD/2)/2,LINETHICK,COLORRED;
STICKLINE(BMACD>=0,0,BMACD,2,1),COLORRED;
STICKLINE(BMACD<0,0,BMACD,2,1),COLOR00bb00;
STICKLINE(MACD>=0,0,MACD,0,0),COLOR00CCCC;
STICKLINE(MACD<0,0,MACD,0,0),COLORCYAN;
....
通达信电脑版公式导入方法
A:源码导入
1、把要导入的公式(源码)复制下来:方法是用左键先把源码变蓝,之后点右键,点复制;
2、进入主界面,即K线图模式,同时按住CTRL+F,出现公式管理器-->用鼠标左键单击任何一个公式组的名称(选择技术指标公式或者条件选股公式)-->单击其他-->点新建公式-->在出现的公式编辑区的下面的空白处,把刚拷的源码粘贴上,将公式名称复制后粘贴到公式名称栏-->确定-->退出;
3.如有参数的,如:N 1 100 15 之类,则需将这类数据填充到参数表中;
B:文件指标导入
1、先把指标文件复制到桌面(或者你知道的路径);
2、打开通达信,按CTRL+F打开公式管理器点击“导入”按钮;
3、找到桌面上要导入的公式选中”公式“后单击左键,后点击“打开”;
4、把“+”号单击展开,在公式名前的空方框里单击成“勾选”后,在点击下方的“确认”;
5、输入指标名称,回车即可。