设为首页加入收藏

微信关注
官方微信号:71712643
加关注获取每日精选资讯
股票入门欢迎您加入
广告服务联系我们网站地图

同花顺分割图提示公式源码 同花顺指标公式大全(2)

2015-10-29 9:21:59 股票入门 http://rumen.southmoney.com

//分割显示
IF 切换>=1 AND 切换<=3 THEN BEGIN
VERLINE(nx=终点 OR nx=起点,2),COLOR009fff;
x1:=IF(切换=1,J1,IF(切换=2,H1,IF(切换=3,B1,DRAWNULL)));
x2:=IF(切换=1,J2,IF(切换=2,H2,IF(切换=3,B2,DRAWNULL)));
x3:=IF(切换=1,J3,IF(切换=2,H3,IF(切换=3,B3,DRAWNULL)));
x4:=IF(切换=1,J4,IF(切换=2,H4,IF(切换=3,B4,DRAWNULL)));
高:BACKSET(IF(wz,ZH,DRAWNULL),起点-1)*wxz,COLORff88ff,LINETHICK2;
低:BACKSET(IF(wz,ZL,DRAWNULL),起点-1)*wxz,COLORff88ff,LINETHICK2;
中:BACKSET(IF(wz,(ZH+ZL)/2,DRAWNULL),起点-1)*wxz,COLORff88ff;
分1:BACKSET(IF(wz,X1,DRAWNULL),起点-1)*wxz,COLORffff00;
分2:BACKSET(IF(wz,X2,DRAWNULL),起点-1)*wxz,COLORffff00;
分3:BACKSET(IF(wz,X3,DRAWNULL),起点-1)*wxz,COLORffff00;
分4:BACKSET(IF(wz,X4,DRAWNULL),起点-1)*wxz,COLORffff00;
END;
IF 切换=2 OR 切换=3 THEN BEGIN
x5:=IF(切换=2,H5,B5);
x6:=IF(切换=2,H6,B6);
分5:BACKSET(IF(wz,X5,DRAWNULL),起点-1)*wxz,COLORffff00;
分6:BACKSET(IF(wz,X6,DRAWNULL),起点-1)*wxz,COLORffff00;
END;
IF 切换=3 THEN BEGIN
x7:=B7;
x8:=B8;
分7:BACKSET(IF(wz,X7,NULL),起点-1)*wxz,COLORffff00;
分8:BACKSET(IF(wz,X8,NULL),起点-1)*wxz,COLORffff00;
END;
//分割提示
DRAWTEXT(wz,高,'`'+TOSTRING(高,2)+'(高)'),COLORff88ff;
DRAWTEXT(wz,低,'`'+TOSTRING(低,2)+'(低)'),COLORff88ff;
DRAWTEXT(wz,中,'`'+TOSTRING(中,2)+'(中)'),COLORff88ff;
DRAWTEXT(wz,分1,'`'+TOSTRING(分1,2)+'(分1)'),COLORffffff;
DRAWTEXT(wz,分2,'`'+TOSTRING(分2,2)+'(分2)'),COLORffffff;
DRAWTEXT(wz,分3,'`'+TOSTRING(分3,2)+'(分3)'),COLORffffff;
DRAWTEXT(wz,分4,'`'+TOSTRING(分4,2)+'(分4)'),COLORffffff;
DRAWTEXT(wz,分5,'`'+TOSTRING(分5,2)+'(分5)'),COLORffffff;
DRAWTEXT(wz,分6,'`'+TOSTRING(分6,2)+'(分6)'),COLORffffff;
DRAWTEXT(wz,分7,'`'+TOSTRING(分7,2)+'(分7)'),COLORffffff;
DRAWTEXT(wz,分8,'`'+TOSTRING(分8,2)+'(分8)'),COLORffffff;
IF 切换=4 THEN BEGIN
AA5:MA(C,5),colorffffff;
AA10:MA(C,10),color00ffff;
AA20:MA(C,20),color009fff;
AA30:MA(C,30),colorffff00;
AA60:MA(C,60),color0000ff;
AA120:MA(C,120),color00ff00;
AA250:MA(C,250),colorff00ff;
zdx:=MAX(AA5,AA10,AA20,AA30,AA60,AA120,AA250);
ZXx:=MIN(AA5,AA10,AA20,AA30,AA60,AA120,AA250);
nhd:=(zdx/ZXx-1)*100;
中位线:=(AA5+AA10+AA20+AA30+AA60+AA120+AA250)/7;
PARTLINE(中位线,1,RGB(255,100,255),1,RGB(255,100,255)),LINETHICK2;
DRAWTEXT(CURRBARSCOUNT+1=1,中位线,'``中位线:'+TOSTRING(中位线,2)+'`\n``粘合度:'+TOSTRING(nhd,2)+'%'),colorff88ff;
END;
IF 切换=5 THEN BEGIN
BOLL:MA(CLOSE,20),COLORcccccc;//曲线属性--输出线性--不输出
PARTLINE(BOLL,BOLL>BOLL[1],RGB(255,0,0),BOLL<=BOLL[1],RGB(0,255,255));
UB:BOLL+2*STD(CLOSE,20),COLORff88ff;
LB:BOLL-2*STD(CLOSE,20),COLOR00FFff;
DRAWTEXT(CURRBARSCOUNT+1=1,BOLL,'``中轨值:'+TOSTRING(BOLL,2)+'`\n``上下轨比:'+TOSTRING((UB/LB-1)*100,2)+'%'),colorff88ff;
END;
DRAWTEXT_FIX(CURRBARSCOUNT=1,1/100,0,0,'休闲人原创【分割图】 当前是'+IF(切换=1,'[黄金分割]',IF(切换=2,'[江恩分割]',
IF(切换=3,'[百分比]',IF(切换=4,'[平均线]','布林线'))))),color00ffff;

更多同花顺指标公式请关注南方财富网

上一页  [1] [2] 

股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。