通达信多周期macd(副图源码贴图)非常好的

 

 多周期macd(通达信副图,源码,贴图)非常好的

{周MACD}

DIF55:(EMA(CLOSE,30)-EMA(CLOSE,90))*0.55;

DEA55:(EMA(DIF55,26));

MACD周:=(DIF55-DEA55)*2, COLORSTICK;

DRAWBAND(DEA55,RGB(135,255,35),DIF55,RGB(240,160,0));

DRAWTEXT(CURRBARSCOUNT=1,DIF55,'--周MACD'),COLORRED;

{日MACD}

DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);

DEA:=EMA(DIFF,9);

DRAWBAND(DIFF,RGB(255,80,120),DEA,RGB(21,138,255));

DRAWTEXT(CURRBARSCOUNT=1,DIFF,'--日MACD'),COLOR00FFFF;

{60分MACD}

DIF60:=EMA(CLOSE,12/2)-EMA(CLOSE,26/2);

DEA60:=EMA(DIF60,9/2);

DRAWBAND(DIF60,RGB(120,20,255),DEA60,RGB(80,255,20));

DRAWTEXT(CURRBARSCOUNT=1,DIF60,'--60分钟MACD'),COLORFF00FF;

{30分MACD}

DIF30:=(EMA(CLOSE,12/4)-EMA(CLOSE,26/4)),COLORGREEN,LINETHICK2;

DEA30:=(EMA(DIF30,9/4)),COLORMAGENTA,LINETHICK2;

DRAWBAND(DIF30,RGB(220,50,50),DEA30,RGB(50,120,50));

DRAWTEXT(CURRBARSCOUNT=1,DIF30,'--30分钟MACD'),COLORGREEN;

{日MACD柱}

0,COLORWHITE,DOTLINE;

MACD:(DIFF-DEA)*2,COLORSTICK;

STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1,1),COLORRED,;

STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,1,1),COLOR4080FF,;

STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1,1),COLORYELLOW,;

STICKLINE(MACD<REF(MACD,1) AND MACD<0,0,MACD,1,1),COLORLIGREEN,;

A1:=C>=REF(C,4);

A:=C<REF(C,4);

AA:=C<REF(C,4) AND REF(A1,1);

T:=BARSLAST(AA)NODRAW;

M:=(T=0 AND REFX(T=1 AND NOT(A),1)) OR (REFX(T=2 AND NOT(A),2)) OR (REFX(T=3 AND NOT(A),3)) OR (REFX(T=4 AND NOT(A),4)) OR (REFX(T=5 AND NOT(A),5))

OR (REFX(T=6 AND NOT(A),6)) OR (REFX(T=7 AND NOT(A),7)) OR (REFX(T=8 AND NOT(A),8));

M1:=T=1 AND REFX(T=2 AND NOT(A),1) OR (REFX(T=3 AND NOT(A),2)) OR (REFX(T=4 AND NOT(A),3)) OR (REFX(T=5 AND NOT(A),4)) OR (REFX(T=6 AND NOT(A),5))

OR (REFX(T=7 AND NOT(A),6)) OR (REFX(T=8 AND NOT(A),7));

M2:=T=2 AND REFX(T=3 AND NOT(A),1) OR (REFX(T=4 AND NOT(A),2)) OR (REFX(T=5 AND NOT(A),3)) OR (REFX(T=6 AND NOT(A),4)) OR (REFX(T=7 AND NOT(A),5)) OR (REFX(T=8 AND NOT(A),6));

M3:=T=3 AND REFX(T=4 AND NOT(A),1)OR (REFX(T=5 AND NOT(A),2)) OR (REFX(T=6 AND NOT(A),3)) OR (REFX(T=7 AND NOT(A),4))  OR (REFX(T=8 AND NOT(A),5));

M4:=T=4 AND REFX(T=5 AND NOT(A),1) OR (REFX(T=6 AND NOT(A),2)) OR (REFX(T=7 AND NOT(A),3)) OR (REFX(T=8 AND NOT(A),4));

M5:=T=5 AND  REFX(T=6 AND NOT(A),1) OR (REFX(T=7 AND NOT(A),2)) OR (REFX(T=8 AND NOT(A),3));

M6:=T=6  AND  REFX(T=7 AND NOT(A),1) OR (REFX(T=8 AND NOT(A),2));

M7:=T=7  AND  REFX(T=8 AND NOT(A),1);

N:=T=1 AND REF(T=0 AND AA,1) AND A;

N1:=T=2 AND REF(N,1) AND A;

N2:=T=3 AND REF(N1,1) AND A;

N3:=T=4 AND REF(N2,1) AND A;

N4:=T=5 AND REF(N3,1) AND A;

N5:=T=6 AND REF(N4,1) AND A;

N6:=T=7 AND REF(N5,1) AND A;

N7:=T=8 AND REF(N6,1) AND A;

低:=IF(N7,0.3,0),LINETHICK4,COLORRED;

B1:=C<=REF(C,4);

B:=C>REF(C,4);

BB:=C>REF(C,4) AND REF(B1,1);

T1:=BARSLAST(BB)NODRAW;

M111:=(T1=0 AND REFX(T1=1 AND NOT(B),1)) OR (REFX(T1=2 AND NOT(B),2)) OR (REFX(T1=3 AND NOT(B),3)) OR (REFX(T1=4 AND NOT(B),4)) OR (REFX(T1=5 AND NOT(B),5))

OR (REFX(T1=6 AND NOT(B),6)) OR (REFX(T1=7 AND NOT(B),7)) OR (REFX(T1=8 AND NOT(B),8));

M11:=T1=1 AND REFX(T1=2 AND NOT(B),1) OR (REFX(T1=3 AND NOT(B),2)) OR (REFX(T1=4 AND NOT(B),3)) OR (REFX(T1=5 AND NOT(B),4)) OR (REFX(T1=6 AND NOT(B),5))

OR (REFX(T1=7 AND NOT(B),6)) OR (REFX(T1=8 AND NOT(B),7));

M22:=T1=2 AND REFX(T1=3 AND NOT(B),1) OR (REFX(T1=4 AND NOT(B),2)) OR (REFX(T1=5 AND NOT(B),3)) OR (REFX(T1=6 AND NOT(B),4)) OR (REFX(T1=7 AND NOT(B),5)) OR (REFX(T1=8 AND NOT(B),6));

M33:=T1=3 AND REFX(T1=4 AND NOT(B),1)OR (REFX(T1=5 AND NOT(B),2)) OR (REFX(T1=6 AND NOT(B),3)) OR (REFX(T1=7 AND NOT(B),4))  OR (REFX(T1=8 AND NOT(B),5));

M44:=T1=4 AND REFX(T1=5 AND NOT(B),1) OR (REFX(T1=6 AND NOT(B),2)) OR (REFX(T1=7 AND NOT(B),7)) OR (REFX(T1=8 AND NOT(B),4));

M55:=T1=5 AND  REFX(T1=6 AND NOT(B),1) OR (REFX(T1=7 AND NOT(B),2)) OR (REFX(T1=8 AND NOT(B),3));

M66:=T1=6  AND  REFX(T1=7 AND NOT(B),1) OR (REFX(T1=8 AND NOT(B),2));

M77:=T1=7  AND  REFX(T1=8 AND NOT(B),1);

N111:=T1=1 AND REF(T1=0 AND BB,1) AND B;

N11:=T1=2 AND REF(N111,1) AND B;

N22:=T1=3 AND REF(N11,1) AND B;

N33:=T1=4 AND REF(N22,1) AND B;

N44:=T1=5 AND REF(N33,1) AND B;

N55:=T1=6 AND REF(N44,1) AND B;

N66:=T1=7 AND REF(N55,1) AND B;

N77:=T1=8 AND REF(N66,1) AND B;

高:=IF(N77,0.3,0),LINETHICK4;




来函数检测结果如下
该公式包含未来函数:REFX

解密、定制、编写公式指标请联系QQ或微信同号:88652583
置顶指标

相关指标公式

输出 多周期MACD(通达信副图,源码,贴图)非常好的DIF55:(收盘价的30日指数移动平均-收盘价的90日指数移动平均)*0.55
输出DEA55:(DIF55的26日指数移动平均)
MACD周赋值:(DIF55-DEA55)*2, COLORSTICK
画带状线
当满足条件到最后交易的周期=1时,在DIF55位置书写文字,画红色
DIFF赋值:收盘价的12日指数移动平均-收盘价的26日指数移动平均
DEA赋值:DIFF的9日指数移动平均
画带状线
当满足条件到最后交易的周期=1时,在DIFF位置书写文字,COLOR00FFFF
DIF60赋值:收盘价的12/2日指数移动平均-收盘价的26/2日指数移动平均
DEA60赋值:DIF60的9/2日指数移动平均
画带状线
当满足条件到最后交易的周期=1时,在DIF60位置书写文字,COLORFF00FF
DIF30赋值:(收盘价的12/4日指数移动平均-收盘价的26/4日指数移动平均),画绿色,线宽为2
DEA30赋值:(DIF30的9/4日指数移动平均),画洋红色,线宽为2
画带状线
当满足条件到最后交易的周期=1时,在DIF30位置书写文字,画绿色
0,画白色,DOTLINE
输出平滑异同平均线:(DIFF-DEA)*2,COLORSTICK
当满足条件MACD>1日前的MACDANDMACD>0时,在0和MACD位置之间画柱状线,宽度为1,1不为0则画空心柱.,画红色,
当满足条件MACD<1日前的MACDANDMACD>0时,在0和MACD位置之间画柱状线,宽度为1,1不为0则画空心柱.,COLOR4080FF,
当满足条件MACD>1日前的MACDANDMACD<0时,在0和MACD位置之间画柱状线,宽度为1,1不为0则画空心柱.,画黄色,
当满足条件MACD<1日前的MACDANDMACD<0时,在0和MACD位置之间画柱状线,宽度为1,1不为0则画空心柱.,画淡绿色,
A1赋值:收盘价>=4日前的收盘价
A赋值:收盘价<4日前的收盘价
AA赋值:收盘价<4日前的收盘价 AND 1日前的A1
T赋值:上次AA距今天数NODRAW
M赋值:(T=0 AND 1日后的T=1ANDNOT(A)) OR (2日后的T=2ANDNOT(A)) OR (3日后的T=3ANDNOT(A)) OR (4日后的T=4ANDNOT(A)) OR (5日后的T=5ANDNOT(A))OR (6日后的T=6ANDNOT(A)) OR (7日后的T=7ANDNOT(A)) OR (8日后的T=8ANDNOT(A))
M1赋值:T=1 AND 1日后的T=2ANDNOT(A) OR (2日后的T=3ANDNOT(A)) OR (3日后的T=4ANDNOT(A)) OR (4日后的T=5ANDNOT(A)) OR (5日后的T=6ANDNOT(A))OR (6日后的T=7ANDNOT(A)) OR (7日后的T=8ANDNOT(A))
M2赋值:T=2 AND 1日后的T=3ANDNOT(A) OR (2日后的T=4ANDNOT(A)) OR (3日后的T=5ANDNOT(A)) OR (4日后的T=6ANDNOT(A)) OR (5日后的T=7ANDNOT(A)) OR (6日后的T=8ANDNOT(A))
M3赋值:T=3 AND 1日后的T=4ANDNOT(A)OR (2日后的T=5ANDNOT(A)) OR (3日后的T=6ANDNOT(A)) OR (4日后的T=7ANDNOT(A)) OR (5日后的T=8ANDNOT(A))
M4赋值:T=4 AND 1日后的T=5ANDNOT(A) OR (2日后的T=6ANDNOT(A)) OR (3日后的T=7ANDNOT(A)) OR (4日后的T=8ANDNOT(A))
M5赋值:T=5 AND 1日后的T=6ANDNOT(A) OR (2日后的T=7ANDNOT(A)) OR (3日后的T=8ANDNOT(A))
M6赋值:T=6 AND 1日后的T=7ANDNOT(A) OR (2日后的T=8ANDNOT(A))
M7赋值:T=7 AND 1日后的T=8ANDNOT(A)
N赋值:T=1 AND 1日前的T=0ANDAA AND A
N1赋值:T=2 AND 1日前的N AND A
N2赋值:T=3 AND 1日前的N1 AND A
N3赋值:T=4 AND 1日前的N2 AND A
N4赋值:T=5 AND 1日前的N3 AND A
N5赋值:T=6 AND 1日前的N4 AND A
N6赋值:T=7 AND 1日前的N5 AND A
N7赋值:T=8 AND 1日前的N6 AND A
低赋值:如果N7,返回0.3,否则返回0,线宽为4,画红色
B1赋值:收盘价<=4日前的收盘价
B赋值:收盘价>4日前的收盘价
BB赋值:收盘价>4日前的收盘价 AND 1日前的B1
T1赋值:上次BB距今天数NODRAW
M111赋值:(T1=0 AND 1日后的T1=1ANDNOT(B)) OR (2日后的T1=2ANDNOT(B)) OR (3日后的T1=3ANDNOT(B)) OR (4日后的T1=4ANDNOT(B)) OR (5日后的T1=5ANDNOT(B))OR (6日后的T1=6ANDNOT(B)) OR (7日后的T1=7ANDNOT(B)) OR (8日后的T1=8ANDNOT(B))
M11赋值:T1=1 AND 1日后的T1=2ANDNOT(B) OR (2日后的T1=3ANDNOT(B)) OR (3日后的T1=4ANDNOT(B)) OR (4日后的T1=5ANDNOT(B)) OR (5日后的T1=6ANDNOT(B))OR (6日后的T1=7ANDNOT(B)) OR (7日后的T1=8ANDNOT(B))
M22赋值:T1=2 AND 1日后的T1=3ANDNOT(B) OR (2日后的T1=4ANDNOT(B)) OR (3日后的T1=5ANDNOT(B)) OR (4日后的T1=6ANDNOT(B)) OR (5日后的T1=7ANDNOT(B)) OR (6日后的T1=8ANDNOT(B))
M33赋值:T1=3 AND 1日后的T1=4ANDNOT(B)OR (2日后的T1=5ANDNOT(B)) OR (3日后的T1=6ANDNOT(B)) OR (4日后的T1=7ANDNOT(B)) OR (5日后的T1=8ANDNOT(B))
M44赋值:T1=4 AND 1日后的T1=5ANDNOT(B) OR (2日后的T1=6ANDNOT(B)) OR (7日后的T1=7ANDNOT(B)) OR (4日后的T1=8ANDNOT(B))
M55赋值:T1=5 AND 1日后的T1=6ANDNOT(B) OR (2日后的T1=7ANDNOT(B)) OR (3日后的T1=8ANDNOT(B))
M66赋值:T1=6 AND 1日后的T1=7ANDNOT(B) OR (2日后的T1=8ANDNOT(B))
M77赋值:T1=7 AND 1日后的T1=8ANDNOT(B)
N111赋值:T1=1 AND 1日前的T1=0ANDBB AND B
N11赋值:T1=2 AND 1日前的N111 AND B
N22赋值:T1=3 AND 1日前的N11 AND B
N33赋值:T1=4 AND 1日前的N22 AND B
N44赋值:T1=5 AND 1日前的N33 AND B
N55赋值:T1=6 AND 1日前的N44 AND B
N66赋值:T1=7 AND 1日前的N55 AND B
N77赋值:T1=8 AND 1日前的N66 AND B
高赋值:如果N77,返回0.3,否则返回0,线宽为4

指标安装下载帮助  |   联系我们  |  乐淘公式网  |  公式网   |  指标公式  |   加入收藏   |  设为主页

@2005-2025 浙ICP备2024071487号-1 乐淘公式网公式网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
免责声明:乐淘公式网所有指标公式及文章由网络收集,不保障实时性和真实性, 仅供学习研究并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。
QQ:88652583 微信 88652583
sitemap站点地图