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

    正文概述    2024-05-04 04:28:41  
    IF:EMA(CLOSE,12)-EMA(CLOSE,26); DEA:EMA(DIF,9); MACD:(DIF-DEA)*2,COLORSTICK; SWIFTK:='MACD.MACD'*REF('MACD.MACD',1) EARLYDAY_1:=BARSLAST(REF(SWIFTK,1)); EARLYDAY_2:=BARSLAST(REF(SWIFTK,2)); EARLYDAY_3:=BARSLAST(REF(SWIFTK,3)); EARLYDAY_4:=BARSLAST(REF(SWIFTK,4)); EARLYDAY_5:=BARSLAST(REF(SWIFTK,5)); CLOW_0:=REF(LLV(MIN(O,C),EARLYDAY_5-EARLYDAY_4-1),EARLYDAY_4+2); CLOW_1:=REF(LLV(MIN(O,C),EARLYDAY_3-EARLYDAY_2-1),EARLYDAY_2+2); CLOW_2:=LLV(MIN(O,C),EARLYDAY_1); DIFFLOW_0:=REF(LLV('MACD.DIFF',EARLYDAY_5-EARLYDAY_4-1),EARLYDAY_4+2); DIFFLOW_1:=REF(LLV('MACD.DIFF',EARLYDAY_3-EARLYDAY_2-1),EARLYDAY_2+2); DIFFLOW_2:=LLV('MACD.DIFF',EARLYDAY_1); 钝化L:= 'MACD.MACD' 0AND( (INTPART(DIFFLOW_2)-INTPART(DIFFLOW_1) 0ANDCLOW_1 CLOW_2)OR (INTPART(DIFFLOW_2)-INTPART(DIFFLOW_0) 0ANDCLOW_0 CLOW_2) 结构L:= 'MACD.MACD' 0ANDINTPART('MACD.DIFF') REF(INTPART('MACD.DIFF'),1)AND( (INTPART(DIFFLOW_2)-INTPART(DIFFLOW_1) 0ANDCLOW_1 CLOW_2ANDINTPART('MACD.DIFF') INTPART(DIFFLOW_2))OR (INTPART(DIFFLOW_2)-INTPART(DIFFLOW_0) 0ANDCLOW_0 CLOW_2ANDINTPART('MACD.DIFF') INTPART(DIFFLOW_2)) DRAWTEXT(钝化L,'MACD.DIFF','L'); DRAWICON(结构L,'MACD.DIFF',4); CHIGH_0:=REF(HHV(MAX(O,C),EARLYDAY_5-EARLYDAY_4-1),EARLYDAY_4+2); CHIGH_1:=REF(HHV(MAX(O,C),EARLYDAY_3-EARLYDAY_2-1),EARLYDAY_2+2); CHIGH_2:=HHV(MAX(O,C),EARLYDAY_1); DIFFHIGH_0:=REF(HHV('MACD.DIFF',EARLYDAY_5-EARLYDAY_4-1),EARLYDAY_4+2); DIFFHIGH_1:=REF(HHV('MACD.DIFF',EARLYDAY_3-EARLYDAY_2-1),EARLYDAY_2+2); DIFFHIGH_2:=HHV('MACD.DIFF',EARLYDAY_1); 钝化H:= 'MACD.MACD' 0AND( (INTPART(DIFFHIGH_2)-INTPART(DIFFHIGH_1) 0ANDCHIGH_1 CHIGH_2)OR (INTPART(DIFFHIGH_2)-INTPART(DIFFHIGH_0) 0ANDCHIGH_0 CHIGH_2) 结构H:= 'MACD.MACD' 0ANDINTPART('MACD.DIFF') REF(INTPART('MACD.DIFF'),1)AND( (INTPART(DIFFHIGH_2)-INTPART(DIFFHIGH_1) 0ANDCHIGH_1 CHIGH_2ANDINTPART('MACD.DIFF') INTPART(DIFFHIGH_2))OR (INTPART(DIFFHIGH_2)-INTPART(DIFFHIGH_0) 0ANDCHIGH_0 CHIGH_2ANDINTPART('MACD.DIFF') INTPART(DIFFHIGH_2)) DRAWTEXT(钝化H,'MACD.DIFF'*1.02,'H'),COLORGREEN; DRAWICON(结构H,'MACD.DIFF',5),COLORGREEN; N:=7;N2:=8;N3:=9; VAR1:=REF(MA(C,20),10);开:=O-VAR1;高:=H-VAR1;低:=L-VAR1;收:=C-VAR1;MID:=MA(C,20); UPPER:=MID+2*STD(C,20);LOWER:=MID-2*STD(C,20);V1:=(C-LOWER)/(UPPER-LOWER)*100; V2:=V1-EMA(V1,5);K1:=SUM(LLV(V2,4),4)/4;V3:=EMA(V2,64)*10;V4:=EMA(0.4*V2*(-1),3); V5:=-1*EMA(V2,39)*10;A:=V3 B:=V2 D:=V5 E:=V3 =10ORV2 =V4ORV5 1:MA(收,N); 均线2:MA(收,N2); 均线3:MA(收,N3); STICKLINE(C,0,0,6,0),COLORYELLOW; STICKLINE(收 =开ANDE,高,低,0,0),COLORRED; STICKLINE(收 =开ANDE,收,开,2,0),COLORRED; STICKLINE(收 开ANDE,高,低,0,0),COLORGREEN; STICKLINE(收 开ANDE,收,开,2,0),COLORGREEN; STICKLINE(开 收ANDA,低,高,0,0),COLORFF0000; STICKLINE(开 收ANDA,收,开,2,0),COLORFF0000; STICKLINE(开 =收ANDA,低,高,0,0),COLORYELLOW; STICKLINE(开 =收ANDA,收,开,2,1),COLORYELLOW; STICKLINE(开 收ANDB,低,高,0,0),COLORRED; STICKLINE(开 收ANDB,收,开,2,0),COLORRED; STICKLINE(开 =收ANDB,低,高,0,0),COLORRED; STICKLINE(开 =收ANDB,收,开,2,1),COLORRED; STICKLINE(开 收ANDD,低,高,0,0),COLORGREEN; STICKLINE(开 收ANDD,收,开,2,0),COLORGREEN; {STICKLINE(开 =收ANDD,收,开,2,1),COLORGREEN};[源码注释]通达信周K线副图显示指标公式公式解读


    输出条件判断:收盘价的12日指数移动平均-收盘价的26日指数移动平均 输出DEA:DIF的9日指数移动平均 输出平滑异同平均线:(DIF-DEA)*2,COLORSTICK SWIFTK赋值:'MACD.MACD'*1日前的'MACD.MACD' 0 EARLYDAY_1赋值:上次1日前的SWIFTK距今天数 EARLYDAY_2赋值:上次2日前的SWIFTK距今天数 EARLYDAY_3赋值:上次3日前的SWIFTK距今天数 EARLYDAY_4赋值:上次4日前的SWIFTK距今天数 EARLYDAY_5赋值:上次5日前的SWIFTK距今天数 CLOW_0赋值:EARLYDAY_4+2日前的EARLYDAY_5-EARLYDAY_4-1日内开盘价和收盘价的较小值的最低值 CLOW_1赋值:EARLYDAY_2+2日前的EARLYDAY_3-EARLYDAY_2-1日内开盘价和收盘价的较小值的最低值 CLOW_2赋值:EARLYDAY_1日内开盘价和收盘价的较小值的最低值 DIFFLOW_0赋值:EARLYDAY_4+2日前的EARLYDAY_5-EARLYDAY_4-1日内'MACD.DIFF'的最低值 DIFFLOW_1赋值:EARLYDAY_2+2日前的EARLYDAY_3-EARLYDAY_2-1日内'MACD.DIFF'的最低值 DIFFLOW_2赋值:EARLYDAY_1日内'MACD.DIFF'的最低值 钝化L赋值:'MACD.MACD' 0AND((DIFFLOW_2的整数部分-DIFFLOW_1的整数部分 0ANDCLOW_1 CLOW_2)OR(DIFFLOW_2的整数部分-DIFFLOW_0的整数部分 0ANDCLOW_0 CLOW_2)) 结构L赋值:'MACD.MACD' 0ANDINTPART('MACD.DIFF') 1日前的'MACD.DIFF'的整数部分AND((DIFFLOW_2的整数部分-DIFFLOW_1的整数部分 0ANDCLOW_1 CLOW_2ANDINTPART('MACD.DIFF') DIFFLOW_2的整数部分)OR(DIFFLOW_2的整数部分-DIFFLOW_0的整数部分 0ANDCLOW_0 CLOW_2ANDINTPART('MACD.DIFF') DIFFLOW_2的整数部分)) 当满足条件钝化L时,在'MACD.DIFF'位置书写文字 当满足条件结构L时,在'MACD.DIFF'位置画4号图标 CHIGH_0赋值:EARLYDAY_4+2日前的EARLYDAY_5-EARLYDAY_4-1日内开盘价和收盘价的较大值的最高值 CHIGH_1赋值:EARLYDAY_2+2日前的EARLYDAY_3-EARLYDAY_2-1日内开盘价和收盘价的较大值的最高值 CHIGH_2赋值:EARLYDAY_1日内开盘价和收盘价的较大值的最高值 DIFFHIGH_0赋值:EARLYDAY_4+2日前的EARLYDAY_5-EARLYDAY_4-1日内'MACD.DIFF'的最高值 DIFFHIGH_1赋值:EARLYDAY_2+2日前的EARLYDAY_3-EARLYDAY_2-1日内'MACD.DIFF'的最高值 DIFFHIGH_2赋值:EARLYDAY_1日内'MACD.DIFF'的最高值 钝化H赋值:'MACD.MACD' 0AND((DIFFHIGH_2的整数部分-DIFFHIGH_1的整数部分 0ANDCHIGH_1 CHIGH_2)OR(DIFFHIGH_2的整数部分-DIFFHIGH_0的整数部分 0ANDCHIGH_0 CHIGH_2)) 结构H赋值:'MACD.MACD' 0ANDINTPART('MACD.DIFF') 1日前的'MACD.DIFF'的整数部分AND((DIFFHIGH_2的整数部分-DIFFHIGH_1的整数部分 0ANDCHIGH_1 CHIGH_2ANDINTPART('MACD.DIFF') DIFFHIGH_2的整数部分)OR(DIFFHIGH_2的整数部分-DIFFHIGH_0的整数部分 0ANDCHIGH_0 CHIGH_2ANDINTPART('MACD.DIFF') DIFFHIGH_2的整数部分)) 当满足条件钝化H时,在'MACD.DIFF'*1.02位置书写文字,画绿色 当满足条件结构H时,在'MACD.DIFF'位置画5号图标,画绿色 N赋值:7 N2赋值:8 N3赋值:9 VAR1赋值:10日前的收盘价的20日简单移动平均 开赋值:开盘价-VAR1 高赋值:最高价-VAR1 低赋值:最低价-VAR1 收赋值:收盘价-VAR1 MID赋值:收盘价的20日简单移动平均 UPPER赋值:MID+2*收盘价的20日估算标准差 LOWER赋值:MID-2*收盘价的20日估算标准差 V1赋值:(收盘价-LOWER)/(UPPER-LOWER)*100 V2赋值:V1-V1的5日指数移动平均 K1赋值:4日内V2的最低值的4日累和/4 V3赋值:V2的64日指数移动平均*10 V4赋值:0.4*V2*(-1)的3日指数移动平均 V5赋值:-1*V2的39日指数移动平均*10 A赋值:V3 B赋值:V2 D赋值:V5 E赋值:V3 =10ORV2 =V4ORV5 输出均线1:收的N日简单移动平均 输出均线2:收的N2日简单移动平均 输出均线3:收的N3日简单移动平均 当满足条件收盘价时,在0和0位置之间画柱状线,宽度为6,0不为0则画空心柱.,画黄色 当满足条件收 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. =开ANDE,高,低,0,0),画红色 当满足条件收 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. =开ANDE,收,开,2,0),画红色 当满足条件收 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 开ANDE,高,低,0,0),画绿色 当满足条件收 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 开ANDE,收,开,2,0),画绿色 当满足条件开 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 收ANDA,低,高,0,0),COLORFF0000 当满足条件开 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 收ANDA,收,开,2,0),COLORFF0000 当满足条件开 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. =收ANDA,低,高,0,0),画黄色 当满足条件开 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. =收ANDA,收,开,2,1),画黄色 当满足条件开 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 收ANDB,低,高,0,0),画红色 当满足条件开 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 收ANDB,收,开,2,0),画红色 当满足条件开 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. =收ANDB,低,高,0,0),画红色 当满足条件开 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. =收ANDB,收,开,2,1),画红色 当满足条件开 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 收ANDD,低,高,0,0),画绿色 当满足条件开 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 收ANDD,收,开,2,0),画绿色




    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信周K线副图显示指标公式 加入收藏