通达信黄金密码公式主图 源码

黄金密码:

日:=500;昨前:=60;
高:=REF(HHV(H,日),昨前);
低:=REF(LLV(L,日),昨前);
H1:=高-(高-低)*1;
H2:=高-(高-低)*0.91;
H3:=高-(高-低)*0.85;
H4:=高-(高-低)*0.809;
H5:=高-(高-低)*0.777;
H6:=高-(高-低)*0.707;
H7:=高-(高-低)*0.666;
H8:=高-(高-低)*0.618;
H9:=高-(高-低)*0.563;
H10:=高-(高-低)*0.5;
H11:=高-(高-低)*0.424;
H12:=高-(高-低)*0.382;
H13:=高-(高-低)*0.309;
H14:=高-(高-低)*0.25;
H15:=高-(高-低)*0.191;
H16:=高-(高-低)*0.1375;
H17:=高-(高-低)*0.0807;
一:REFDATE(H2,DATE),COLORLIRED;
二:REFDATE(H3,DATE),COLORYELLOW;
三:REFDATE(H4,DATE),COLORLIBLUE;
四:REFDATE(H5,DATE),COLORLIRED;
五:REFDATE(H6,DATE),COLORYELLOW;
六:REFDATE(H7,DATE),COLORLIBLUE;
七:REFDATE(H8,DATE),COLORLIRED;
八:REFDATE(H9,DATE),COLORYELLOW;
九:REFDATE(H10,DATE),COLORLIBLUE;
十:REFDATE(H11,DATE),COLORLIRED;
十一:REFDATE(H12,DATE),COLORYELLOW;
十二:REFDATE(H13,DATE),COLORLIBLUE;
十三:REFDATE(H14,DATE),COLORLIRED;
十四:REFDATE(H15,DATE),COLORYELLOW;
十五:REFDATE(H16,DATE),COLORLIBLUE;
十六:REFDATE(H17,DATE),COLORLIBLUE;
底:REFDATE(H1,DATE),COLORYELLOW;
顶:REFDATE(高,DATE),COLORYELLOW;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
 


加入以下源码:


MA1:MA(CLOSE,15);
MA2:MA(CLOSE,60);
IF(MA(CLOSE,15)<=MA(CLOSE,60) AND MA(CLOSE,15)<=REF(MA(CLOSE,15),1),MA(CLOSE,15),DRAWNULL),COLORLIBLUE;
IF(MA(CLOSE,15)<=MA(CLOSE,60) AND MA(CLOSE,15)>REF(MA(CLOSE,15),1),MA(CLOSE,15),DRAWNULL),COLORMAGENTA;
IF(MA(CLOSE,15)>MA(CLOSE,60) AND MA(CLOSE,15)>REF(MA(CLOSE,15),1),MA(CLOSE,15),DRAWNULL),COLORRED;
IF(MA(CLOSE,15)>MA(CLOSE,60) AND MA(CLOSE,15)<=REF(MA(CLOSE,15),1),MA(CLOSE,15),DRAWNULL),COLORYELLOW;
IF(MA(CLOSE,15)>MA(CLOSE,60) AND MA(CLOSE,60)<=REF(MA(CLOSE,60),1),MA(CLOSE,60),DRAWNULL),COLORMAGENTA;
IF(MA(CLOSE,15)>MA(CLOSE,60) AND MA(CLOSE,60)>REF(MA(CLOSE,60),1),MA(CLOSE,60),DRAWNULL),COLORRED;
IF(MA(CLOSE,15)<=MA(CLOSE,60) AND MA(CLOSE,60)<=REF(MA(CLOSE,60),1),MA(CLOSE,60),DRAWNULL),COLORLIBLUE;
IF(MA(CLOSE,15)<=MA(CLOSE,60) AND MA(CLOSE,60)>REF(MA(CLOSE,60),1),MA(CLOSE,60),DRAWNULL),COLORYELLOW;
IF(MA(CLOSE,15)>MA(CLOSE,60) AND MA(CLOSE,15)<=REF(MA(CLOSE,15),1),MA(CLOSE,60),DRAWNULL),COLORYELLOW;
IF(MA(CLOSE,15)<=MA(CLOSE,60) AND MA(CLOSE,15)<=REF(MA(CLOSE,15),1) AND MA(CLOSE,60)>REF(MA(CLOSE,60),1),MA(CLOSE,60),DRAWNULL),COLORWHITE;
IF(MA(CLOSE,15)<=MA(CLOSE,60) AND MA(CLOSE,15)>REF(MA(CLOSE,15),1) AND MA(CLOSE,60)<REF(MA(CLOSE,60),1),MA(CLOSE,60),DRAWNULL),COLORMAGENTA;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
DRAWTEXT(CURRBARSCOUNT=1 ,MA1*1.0,'1');
DRAWTEXT(CURRBARSCOUNT=5 ,MA1*1.0,'5');
DRAWTEXT(CURRBARSCOUNT=10,MA1*1.0,'10');
DRAWTEXT(CURRBARSCOUNT=15,MA1*1.0,'15');
DRAWTEXT(CURRBARSCOUNT=20,MA1*1.0,'20');
DRAWTEXT(CURRBARSCOUNT=30,MA1*1.0,'30');
DRAWTEXT(CURRBARSCOUNT=35,MA1*1.0,'35');
DRAWTEXT(CURRBARSCOUNT=44,MA1*1.0,'40');
DRAWTEXT(CURRBARSCOUNT=50,MA1*1.0,'50');
DRAWTEXT(CURRBARSCOUNT=60,MA1*1.0,'60');
DRAWLINE(LOW=LLV(LOW,5),LOW,HIGH=HHV(HIGH,5),HIGH,0)COLORYELLOW;
DRAWLINE(HIGH=HHV(HIGH,5),HIGH,LOW=LLV(LOW,5),LOW,0)COLORYELLOW;
DRAWLINE(LOW=LLV(LOW,60),LOW,HIGH=HHV(HIGH,60),HIGH,0)COLORWHITE;
DRAWLINE(HIGH=HHV(HIGH,60),HIGH,LOW=LLV(LOW,60),LOW,0)COLORWHITE;
DRAWICON(CROSS(MA(CLOSE,15),MA(CLOSE,60)),MA(CLOSE,60),17);
DRAWICON(CROSS(MA(CLOSE,60),MA(CLOSE,15)),MA(CLOSE,15),19);
 




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

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

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

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