最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 通达信画三角形主图指标公式

    正文概述    2024-05-04 04:18:25  
    difF:ema(CLOSE,5)-ema(CLOSE,26);DEA:EMA(DIFF,50);:2*(DIFF-DEA),COLORSTICK;A1:=BArslAST(REF(crOSS(DIFF,DEA),1));B1:=REF(C,A1+1) CANDREF(DIFF,A1+1) DIFFANDCROSS(DIFF,DEA);A2:=BARSLAST(REF(CROSS(".K"(9,3,3),"kdJ.D"(9,3,3)),1));B2:=REF(C,A2+1) CANDREF("KDJ.K"(9,3,3),A2+1) "KDJ.K"(9,3,3)ANDCROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));A3:=BARSLAST(REF(CROSS(".RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));B3:=REF(C,A3+1) CANDREF("RSI.RSI1"(6,12,24),A3+1) "RSI.RSI1"(6,12,24)ANDCROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));D1:=REF(C,C1+1) CANDREF(DIFF,C1+1) DIFFANDCROSS(DEA,DIFF);C2:=BARSLAST(REF(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));D2:=REF(C,C2+1) CANDREF("KDJ.K"(9,3,3),C2+1) "KDJ.K"(9,3,3)ANDCROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3));C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));D3:=REF(C,C3+1) CANDREF("RSI.RSI1"(6,12,24),C3+1) "RSI.RSI1"(6,12,24)ANDCROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));macd底背:IF(B1 0,-0.1,0),COLORWHITE,POINTDOT;KDJ底背:IF(B2 0,-0.1,0),COLORFF00FF,POINTDOT;RSI底背:IF(B3 0,-0.1,0),COLORBLUE,POINTDOT;MACD顶背:IF(D1 0,0.1,0),COLOR00FF00,POINTDOT;KDJ顶背:IF(D2 0,0.1,0),COLORFFCC66,POINTDOT;RSI顶背:IF(D3 0,0.1,0),COLORRED,POINTDOT;STICKLINE(B1 0,-0.1,0,2,0),COLORWHITE;STICKLINE(B2 0,-0.1,0,2,0),COLORFF00FF;STICKLINE(B3 0,-0.1,0,2,0),COLORBLUE;STICKLINE(D1 0,0.1,0,2,0),COLOR00FF00;STICKLINE(D2 0,0.1,0,2,0),COLORFFCC66;STICKLINE(D3 0,0.1,0,2,0),COLORRED;STICKLINE(MACD REF(MACD,1)ANDMACD 0,0,MACD,0,0),COLORWHITE;STICKLINE(MACD =REF(MACD,1)ANDMACD 0,0,MACD,0,0),COLORBLUE;STICKLINE(MACD REF(MACD,1)ANDMACD 0,0,MACD,0,0),COLORGREEN;STICKLINE(MACD =REF(MACD,1)ANDMACD 0,0,MACD,0,0),COLORLIMAGENTA;STICKLINE(C 0,0,0,50,1),COLORYELLOW;DIFF,COLORCYAN;DEA,COLORBLUE;强:IF(DIFF MA(DIFF,2),DIFF,DRAWNULL),COLORWHITE;弱:IF(DEA MA(DEA,2),DEA,DRAWNULL),COLORLIMAGENTA;必买:IF(TROUGHBARS(3,15,1)=0ANDHIGH LOW+0.01,1,-0),COLORBLUE,LINETHICK4;必卖:IF(PEAKBARS(3,15,1)=1,1,-0),COLORCYAN,LINETHICK4; MA5:=MA(C,5); MA10:=MA(C,10); MA20:=MA(C,20); MA30:=MA(C,30); VAR1:=CROSS(MA10,MA5); VAR2:=CROSS(MA5,MA10)ANDCOUNT(VAR1,7)=1; VAR3:=VOL=HHV(VOL,4)ANDCLOSE MA5ANDCLOSE MA10ANDCLOSE MA20ANDCLOSE MA30; VAR4:VAR2ANDVAR3;

    公式解读:

    通达信画三角形主图指标公式源码解读


    输出DIFF:收盘价的5日指数移动平均-收盘价的26日指数移动平均 输出DEA:DIFF的50日指数移动平均 输出平滑异同平:2*(DIFF-DEA),COLORSTICK A1赋值:上次1日前的DIFF上穿DEA距今天数 B1赋值:A1+1日前的收盘价 CANDREF(DIFF,A1+1) DIFFANDCROSS(DIFF,DEA) A2赋值:上次?日前的"上穿?距今天数 KDJ的K" (9,3,3)," KDJ的D" (9,3,3)),1)) B2赋值:A2+1日前的收盘价 CANDREF(" KDJ的K" (9,3,3),A2+1) KDJ的K" (9,3,3)ANDCROSS(" KDJ的K" (9,3,3)," KDJ的D" (9,3,3)) A3赋值:上次?日前的"上穿?距今天数 RSI的RSI1" (6,12,24)," RSI的RSI2" (6,12,24)),1)) B3赋值:A3+1日前的收盘价 CANDREF(" RSI的RSI1" (6,12,24),A3+1) RSI的RSI1" (6,12,24)ANDCROSS(" RSI的RSI1" (6,12,24)," RSI的RSI2" (6,12,24)) C1赋值:上次1日前的DEA上穿DIFF距今天数 D1赋值:C1+1日前的收盘价 CANDREF(DIFF,C1+1) DIFFANDCROSS(DEA,DIFF) C2赋值:上次?日前的"上穿?距今天数 KDJ的D" (9,3,3)," KDJ的K" (9,3,3)),1)) D2赋值:C2+1日前的收盘价 CANDREF(" KDJ的K" (9,3,3),C2+1) KDJ的K" (9,3,3)ANDCROSS(" KDJ的D" (9,3,3)," KDJ的K" (9,3,3)) C3赋值:上次?日前的"上穿?距今天数 RSI的RSI2" (6,12,24)," RSI的RSI1" (6,12,24)),1)) D3赋值:C3+1日前的收盘价 CANDREF(" RSI的RSI1" (6,12,24),C3+1) RSI的RSI1" (6,12,24)ANDCROSS(" RSI的RSI2" (6,12,24)," RSI的RSI1" (6,12,24)) 输出MACD底背:如果B1 ,返回?,否则返回? 0,-0.1,0),画白色,POINTDOT 输出KDJ底背:如果B2 ,返回?,否则返回? 0,-0.1,0),COLORFF00FF,POINTDOT 输出RSI底背:如果B3 ,返回?,否则返回? 0,-0.1,0),画蓝色,POINTDOT 输出MACD顶背:如果D1 ,返回?,否则返回? 0,0.1,0),COLOR00FF00,POINTDOT 输出KDJ顶背:如果D2 ,返回?,否则返回? 0,0.1,0),COLORFFCC66,POINTDOT 输出RSI顶背:如果D3 ,返回?,否则返回? 0,0.1,0),画红色,POINTDOT 当满足条件B1 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 0,-0.1,0,2,0),画白色 当满足条件B2 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 0,-0.1,0,2,0),COLORFF00FF 当满足条件B3 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 0,-0.1,0,2,0),画蓝色 当满足条件D1 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 0,0.1,0,2,0),COLOR00FF00 当满足条件D2 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 0,0.1,0,2,0),COLORFFCC66 当满足条件D3 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 0,0.1,0,2,0),画红色 当满足条件MACD 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 1日前的MACDANDMACD 0,0,MACD,0,0),画白色 当满足条件MACD 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. =1日前的MACDANDMACD 0,0,MACD,0,0),画蓝色 当满足条件MACD 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 1日前的MACDANDMACD 0,0,MACD,0,0),画绿色 当满足条件MACD 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. =1日前的MACDANDMACD 0,0,MACD,0,0),画淡洋红色 当满足条件收盘价 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 0,0,0,50,1),画黄色 DIFF,画青色 DEA,画蓝色 输出强:如果DIFF ,返回?,否则返回? DIFF的2日简单移动平均,DIFF,无效数),画白色 输出弱:如果DEA ,返回?,否则返回? DEA的2日简单移动平均,DEA,无效数),画淡洋红色 输出必买:如果收盘价15%之字转向的前1个波谷位置=0ANDHIGH ,返回?,否则返回? 最低价+0.01,1,-0),画蓝色,线宽为4 输出必卖:如果收盘价15%之字转向的前1个波峰位置=1,返回1,否则返回-0,画青色,线宽为4 MA5赋值:收盘价的5日简单移动平均 MA10赋值:收盘价的10日简单移动平均 MA20赋值:收盘价的20日简单移动平均 MA30赋值:收盘价的30日简单移动平均 VAR1赋值:MA10上穿MA5 VAR2赋值:MA5上穿MA10ANDCOUNT(VAR1,7)=1 VAR3赋值:(手)=4日内成交量(手)的最高值ANDCLOSE MA5ANDCLOSE MA10ANDCLOSE MA20ANDCLOSE MA30 输出VAR4:VAR2ANDVAR3




    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信画三角形主图指标公式 加入收藏