主图和MACD融合的主图源码

高1:=REF(HHV(H,150),3); 低1:=REF(LLV(L,150),3); H3:=高1-(高1-低1)*0.5; 中轴:REFDATE(H3,DATE),POINTDOT,COLORLIGRAY,LINETHICK3; B1:=EMA(C,12); B2:=EMA(C,26); B3:=B1-B2; WDIF:EMA(EMA(EMA(C,3),3),3)+B3; WDEA:EMA(WDIF,9); MACD:=2*(WDIF-WDEA); STICKLINE(MACD>0,中轴,中轴+MACD,0,1),COLORRED; STICKLINE(MACD<0,中轴,中轴+MACD,0,1),COLORLIBLUE; STICKLINE(MACD<REF(MACD,1)AND MACD>0,中轴,中轴+MACD,0,0 ),COLOR00BBFF; STICKLINE(MACD>=REF(MACD,1)AND MACD>0,中轴,中轴+MACD,0,0 ),COLOR0011BB; STICKLINE(MACD>REF(MACD,1)AND MACD<0,中轴,中轴+MACD,0,0),COLORBB11BB; STICKLINE(MACD<=REF(MACD,1)AND MACD<0,中轴,中轴+MACD,0,0),COLORFFBB11; {DRAWTEXT(CROSS(MACDMA,MACD),HIGH*1.015,' 卖'),COLORFFFFCC;}; VARA:=LLV(LOW,36); VARB:=HHV(HIGH,30); VARC:=EMA((CLOSE-VARA)/(VARB-VARA)*4,4)*25; 趋势:= VARC, COLOR33FFFF; 顶背: STICKLINE(VARC>90,OPEN,CLOSE,3,0) , COLORRED; VAR26:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4; VAR27:=MA(VAR26,5); VAR28:=MA(VAR26,10); {DRAWTEXT(CROSS(VAR26,VAR27) AND VAR27<VAR28,L*0.95,'▲争'),COLORYELLOW;} STICKLINE(CROSS(VAR26,VAR27) AND VAR27<VAR28,OPEN,CLOSE,3,0),COLORYELLOW; {DRAWTEXT(CROSS(VAR7,VAR6) AND VAR7>VAR8,VAR3*0.95,'夺'),COLORYELLOW;} STICKLINE(CROSS(VAR27,VAR26) AND VAR27>VAR28,OPEN,CLOSE,3,0),COLORFF00FF; VAR5:=EMA(MA(CLOSE,3),34); VAR1:=4*SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1)- 3*SMA(SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1),3.2,1); VAR2:=8; CC:=CROSS(VAR1,VAR2); DRAWTEXT(CC,L*0.98,'买!'),COLOR0099FF; STICKLINE(CROSS(VAR1,VAR2) ,OPEN,CLOSE,3,0),COLORBB11BB; AA2:=AMOUNT/V; BB2:=L<AA2*0.9; CC2:=(C-REF(C,1))/REF(C,1)*100>1.2; DD2:=L<MA(C,5)*0.921; EE2:=V<MA(V,5)*1.5; FF2:=BB2 AND CC2 AND DD2 AND EE2,LINETHICK0; {DRAWTEXT(FF2,L*0.99,' 鼠'),COLORYELLOW;} STICKLINE(FF2,O,C,4,0),COLORRED; LC:=REF(CLOSE,1); RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100); FF:=EMA(CLOSE,3); MA15:=EMA(CLOSE,21); DRAWTEXT(CROSS(88,RSI),(HIGH * 1.0002),'↓'),COLOR1880FF; E:=(HIGH+LOW+OPEN+2*CLOSE)/5; AAA:=2*E-LOW,NODRAW; AB:=2*E-HIGH,NODRAW; ACC:=E+(HIGH-LOW),NODRAW; ADD:=E-(HIGH-LOW),NODRAW; 今阻力:REF(AAA,1),COLORWHITE,NODRAW; 今支撑:REF(AB,1),COLORYELLOW,NODRAW; 明阻力:AAA,COLORCYAN,NODRAW; 明支撑:AB,COLORMAGENTA,NODRAW; 明突破:ACC,COLORGREEN,NODRAW; 明反转:ADD,COLORLICYAN,NODRAW; GJ:=(C+H+L+O)/4; 明日阻力:=L+(GJ-L)+(C-L); 明日支撑:=L+(C-GJ); 今日阻力:REF(明日阻力 , 1),NODRAW; 今日支撑:REF(明日支撑 , 1),NODRAW; STICKLINE(ISLASTBAR AND C>=今日阻力,今日阻力,今日阻力,10,1),COLOR0000FF; STICKLINE(ISLASTBAR AND C<今日阻力,今日阻力,今日阻力,10,1),COLOR00FF00; STICKLINE(ISLASTBAR AND C>=今日支撑,今日支撑,今日支撑,10,1),COLORFF00FF; STICKLINE(ISLASTBAR AND C<今日支撑,今日支撑,今日支撑,10,1),COLORFF8800; STICKLINE(VARC>90 ,HIGH,LOW,0,1 ),COLORRED; STICKLINE(VARC>90 ,OPEN,CLOSE,3,0 ),COLOR000055; STICKLINE(VARC>90 ,OPEN,CLOSE,2.1,0 ),COLOR000099; STICKLINE(VARC>90 ,OPEN,CLOSE,1.5,0 ),COLOR0000BB; STICKLINE(VARC>90 ,OPEN,CLOSE,0.9,0 ),COLOR0000DD; STICKLINE(VARC>90 ,OPEN,CLOSE,0.3,0 ),COLOR0000FF;



来函数检测结果如下:
该公式没有未来函数


解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

高1赋值:REF(150日内H最高值,3)
低1赋值:REF(150日内L最低值,3)
H3赋值:高1-(高1-低1)*0.5
输出中轴:DATEH3日,POINTDOT,COLORLIGRAY,LINETHICK3
B1赋值:C的12日指数移动平均
B2赋值:C的26日指数移动平均
B3赋值:B1-B2
输出WDIF:C的3日指数移动平均,3),3)+B3
输出WDEA:WDIF的9日指数移动平均
MACD赋值:2*(WDIF-WDEA)
当满足条件MACD>0时,在中轴和中轴+MACD之间画柱状线
当满足条件MACD<0时,在中轴和中轴+MACD之间画柱状线
STICKLINE(MACD<1日前的MACDAND MACD>0,中轴,中轴+MACD,0,0 ),COLOR00BBFF
STICKLINE(MACD>=1日前的MACDAND MACD>0,中轴,中轴+MACD,0,0 ),COLOR0011BB
STICKLINE(MACD>1日前的MACDAND MACD<0,中轴,中轴+MACD,0,0),COLORBB11BB
STICKLINE(MACD<=1日前的MACDAND MACD<0,中轴,中轴+MACD,0,0),COLORFFBB11
{DRAWTEXT(MACDMA上穿MACD,最高价*1.015,' 卖'),COLORFFFFCC
}
VARA赋值:36日内最低价最低值
VARB赋值:30日内最高价最高值
VARC赋值:EMA((CLOSE-VARA)/(VARB-VARA)*4,4)*25
趋势赋值: VARC, COLOR33FFFF
当满足条件VARC>90时,在OPEN和CLOSE之间画柱状线
VAR26赋值:(CLOSE的3日简单移动平均+CLOSE的6日简单移动平均+CLOSE的12日简单移动平均+CLOSE的24日简单移动平均)/4
VAR27赋值:VAR26的5日简单移动平均
VAR28赋值:VAR26的10日简单移动平均
{DRAWTEXT(VAR26上穿VAR27 AND VAR27} STICKLINE(VAR26上穿VAR27 AND VAR27 {DRAWTEXT(VAR7上穿VAR6 AND VAR7>VAR8,VAR3*0.95,'夺'),COLORYEL最低价
} STICKLINE(VAR27上穿VAR26 AND VAR27>VAR28,OPEN,CLOSE,3,0),COLORFF00FF
VAR5赋值:ECLOSE的3日简单移动平均,34)
VAR1赋值:4*SMA((CLOSE-5日内最低价最低值)/(5日内最高价最高值-5日内最低价最低值)*100,5,1)- 3*SMA(SMA((CLOSE-5日内最低价最低值)/(5日内最高价最高值-5日内最低价最低值)*100,5,1),3.2,1)
VAR2赋值:8
CC赋值:VAR1上穿VAR2
当满足条件CC时,在L*0.98和'买!'位置书写文字
STICKLINE(VAR1上穿VAR2 ,OPEN,CLOSE,3,0),COLORBB11BB
AA2赋值:成交额/V
BB2赋值:L CC2:=(C-1日前的C)/1日前的C*100>1.2
DD2赋值:L EE2赋值:V FF2赋值:BB2 AND CC2 AND DD2 AND EE2,LINETHICK0
当满足条件FF2时,在L*0.99和' 鼠'位置书写文字
当满足条件FF2时,在O和C之间画柱状线
LC赋值:1日前的CLOSE
RSI赋值:((SMA(MAX((CLOSE - LC),0),3,1) / SMA((CLOSE - LC的绝对值),3,1)) * 100)
FF赋值:CLOSE的3日指数移动平均
MA15赋值:CLOSE的21日指数移动平均
DRAWTEXT(88上穿RSI,(最高价 * 1.0002),'↓'),COLOR1880FF
E赋值:(最高价+最低价+OPEN+2*CLOSE)/5
AAA赋值:2*E-最低价,NODRAW
AB赋值:2*E-最高价,NODRAW
ACC赋值:E+(最高价-最低价),NODRAW
ADD赋值:E-(最高价-最低价),NODRAW
输出今阻力:1日前的AAA,COLORWHITE,NODRAW
输出今支撑:1日前的AB,COLORYEL最低价,NODRAW
输出明阻力:AAA,画青色,NODRAW
输出明支撑:AB,COLORMAGENTA,NODRAW
输出明突破:ACC,COLORGREEN,NODRAW
输出明反转:ADD,COLORLICYAN,NODRAW
GJ赋值:(C+H+L+O)/4
明日阻力赋值:L+(GJ-L)+(C-L)
明日支撑赋值:L+(C-GJ)
输出今日阻力: 1日前的明日阻力 ,NODRAW
输出今日支撑: 1日前的明日支撑 ,NODRAW
当满足条件ISLASTBAR AND C>=今日阻力时,在今日阻力和今日阻力之间画柱状线
当满足条件ISLASTBAR AND C<今日阻力时,在今日阻力和今日阻力之间画柱状线
当满足条件ISLASTBAR AND C>=今日支撑时,在今日支撑和今日支撑之间画柱状线
当满足条件ISLASTBAR AND C<今日支撑时,在今日支撑和今日支撑之间画柱状线
当满足条件VARC>90 时,在最高价和最低价之间画柱状线
当满足条件VARC>90 时,在OPEN和CLOSE之间画柱状线
当满足条件VARC>90 时,在OPEN和CLOSE之间画柱状线
当满足条件VARC>90 时,在OPEN和CLOSE之间画柱状线
当满足条件VARC>90 时,在OPEN和CLOSE之间画柱状线
当满足条件VARC>90 时,在OPEN和CLOSE之间画柱状线

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

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