根据日期选择任意高低点区间黄金分割线预期支撑与压力(源码 主图 贴图)介绍
根据日期选择任意高低点区间黄金分割线预期支撑与压力(源码 主图 贴图)
此指标可手动调出“日期”选择任意高低点区间的高点前后面低点黄金分割线及百分比水平值 3% 5% 8%1 3% 18%.........
如图:
{INPUT:RQ1(1990,3000,2010),RQ2(1,12,1),RQ3(1,31,1),RQA(1990,3000,2010),RQB(1,12,1),RQC(1,31,1),XG(0,3,0),HF(0,1,0),GF(0,5,0)}
RQG:=(RQ1-1900)*10000+RQ2*100+RQ3;
AH:=REF(H,BARSLAST(DATE<=RQG )),NODRAW;
高价:IF(DATE>=RQG AND XG>=1,AH,DRAWNULL),COLOR00FFFF;{时间定位画直线};
RQD:=(RQA-1900)*10000+RQB*100+RQC;
DJ:=REF(L,BARSLAST(DATE<=RQD ));{求某一日期的最低价}
DRAWTEXT(ISLASTBAR,AH,'【创与2011/02/18の草根】'),COLOR0000FF;
低价:IF(DATE>=RQD AND XG>=1,DJ,DRAWNULL),COLORFFFF00;{时间定位画直线};
FU:=C-低价;
低到当前幅度:FU/低价*100,NODRAW,COLOR00FFFF;
FUGA:=高价-低价;
高到低价幅度%:FUGA/高价*100,NODRAW,COLOR00FFFF;
低价A:IF(DATE>=RQD AND GF>=1,DJ*1.03,DRAWNULL),COLOR999999;
低价B:IF(DATE>=RQD AND GF>=1,DJ*1.05,DRAWNULL),COLOR999999;
低价C:IF(DATE>=RQD AND GF>=2,DJ*1.08,DRAWNULL),COLOR999999;
低价D:IF(DATE>=RQD AND GF>=2,DJ*1.13,DRAWNULL),COLOR999999;
低价E:IF(DATE>=RQD AND GF>=3,DJ*1.18,DRAWNULL),COLOR999999;
低价F:IF(DATE>=RQD AND GF>=3,DJ*1.25,DRAWNULL),COLOR999999;
低价G:IF(DATE>=RQD AND GF>=4,DJ*1.34,DRAWNULL),COLOR999999;
低价H:IF(DATE>=RQD AND GF>=4,DJ*1.37,DRAWNULL),COLOR999999;
DRAWTEXT(ISLASTBAR AND GF>=1,DJ*1.03,'3%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND GF>=1,DJ*1.05,'5%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND GF>=2,DJ*1.08,'8%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND GF>=2,DJ*1.13,'13%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND GF>=3,DJ*1.18,'18%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND GF>=3,DJ*1.25,'25%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND GF>=4,DJ*1.34,'34%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND GF>=4,DJ*1.37,'37%'),COLOR208FFF;
STICKLINE(DATE<=RQG,低价,高价,0,0),COLOR00FF00;{↓垂直线}
STICKLINE(DATE<=RQD,低价,高价,0,0),COLORFF00FF;{↑垂直线}
Q1:=(低价+(高价 - DJ) * 0.191)/高价;
Q2:=(低价+(高价 - DJ) * 0.382)/高价;
Q3:=(低价+(高价 - DJ) * 0.50)/高价;
Q4:=(低价+(高价 - DJ) * 0.618)/高价;
Q5:=(低价+(高价 - DJ) * 0.809)/高价;
Q6:=(低价+(高价 - DJ) * 0.333)/高价;
Q7:=(低价+(高价 - DJ) * 0.667)/高价;
ZH:=IF(HF,DATE<=RQG,DATE<=RQD);
DRAWTEXT(ZH,高价*Q1,'→191%'),COLORYELLOW;
DRAWTEXT(ZH,高价*Q2,'→382%'),COLORYELLOW;
DRAWTEXT(ZH,高价*Q3,'→50%'),COLORYELLOW;
DRAWTEXT(ZH,高价*Q4,'→618%'),COLORYELLOW;
DRAWTEXT(ZH,高价*Q5,'→809%'),COLORYELLOW;{
DRAWTEXT(ZH AND XG>=2,高价*Q6,'→1/3'),COLOR00FF00;
DRAWTEXT(ZH AND XG>=2,高价*Q7,'→2/3'),COLOR00FF00;}
DRAWNUMBER(ZH,高价*Q1*1.018,高价*Q1),COLOR00FFFF;
DRAWNUMBER(ZH,高价*Q2*1.018,高价*Q2),COLOR00FFFF;
DRAWNUMBER(ZH,高价*Q3*1.018,高价*Q3),COLOR00FFFF;
DRAWNUMBER(ZH,高价*Q4*1.018,高价*Q4),COLOR00FFFF;
DRAWNUMBER(ZH,高价*Q5*1.018,高价*Q5),COLOR00FFFF;
DRAWNUMBER(ZH,高价*Q6*0.999,高价*Q6),COLOR00FF00;
DRAWNUMBER(ZH,高价*Q7*1.018,高价*Q7),COLOR00FF00;
高价A:IF(DATE>=RQD AND XG>=2,AH*Q1,DRAWNULL),COLOR007777,DOTLINE;{时间定位画直线};
高价B:IF(DATE>=RQD AND XG>=2,AH*Q2,DRAWNULL),COLOR007777,DOTLINE;
高价C:IF(DATE>=RQD AND XG>=2,AH*Q3,DRAWNULL),COLOR007777,DOTLINE;
高价D:IF(DATE>=RQD AND XG>=2,AH*Q4,DRAWNULL),COLOR007777,DOTLINE;
高价E:IF(DATE>=RQD AND XG>=2,AH*Q5,DRAWNULL),COLOR007777,DOTLINE;
高价F:IF(DATE>=RQD AND XG>=2,AH*Q6,DRAWNULL),COLOR007700,LINETHICK3;
高价G:IF(DATE>=RQD AND XG>=2,AH*Q7,DRAWNULL),COLOR007700,LINETHICK3;
LC := REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
GB:IF(RSI1>76,H*1.001,DRAWNULL),CIRCLEDOT,LINETHICK3,COLORFFFF00;
GBB:IF(RSI1>80,H*1.002,DRAWNULL),CROSSDOT,LINETHICK3,COLOR0000FF;
AS:=(O+H+L+C)/4;
BL:EMA(AS,17),LINETHICK2,COLORFF6000;
DRAWNUMBER(ISLASTBAR AND BL,BL*1.005,BL);
XGM:=CROSS(C,BL);
DRAWICON(XGM,BL,9);
IF(BL>REF(BL,1),BL,DRAWNULL),LINETHICK2,COLORYELLOW;
{请设置计算参数:
高日期定位: PARAM#0 (调整年度
高日期定位: PARAM#1 (调整月份
高日期定位: PARAM#2 (调整日期
低日期定位: PARAM#3 (调整年度
低日期定位: PARAM#4 (调整月份
低日期定位: PARAM#5 (调整日期
调整数值A 0-2: PARAM#6 (高低点与黄金分割线
调整数值B 0-1: PARAM#7 (前后低点黄金线数值
调整数值C 1--5: PARAM#8(显示百分比涨幅度线};
gd12378