通达信黄金分割与时间和空间的对应

 2023-11-17 21:21:06    通达信指标网  

{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),P1(0,255,3),P2(0,255,3),P3(0,255,3)}

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 )),NODRAW;

低价:IF(DATE>=RQD AND XG>=1,DJ,DRAWNULL),COLORFFFF00;

FU:=C-低价;

低到当前幅度:FU/低价*100,NODRAW,COLOR00FFFF;

FUGA:=高价-低价;

高到低价幅度%:FUGA/高价*100,NODRAW,COLOR00FFFF;

高点周期:=CONST(BARSLAST(DATE=RQG))+1;

底点周期:=CONST(BARSLAST(DATE=RQD))+1;

高底点周期:=ABS(高点周期-底点周期);

DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CLOSE,0.09,0.01,1,'高点交易日周期:');

DRAWNUMBER_FIX(CURRBARSCOUNT=1 AND CLOSE,0.09,0.01,0,高点周期);

DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CLOSE,0.09,0.04,1,'底点交易日周期:'),COLORFFAAFF;

DRAWNUMBER_FIX(CURRBARSCOUNT=1 AND CLOSE,0.09,0.04,0,底点周期),COLORFFAAFF;

DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CLOSE,0.08,0.07,1,'高底点周期:'),COLOR00FF00;

DRAWNUMBER_FIX(CURRBARSCOUNT=1 AND CLOSE,0.08,0.07,0,高底点周期),COLOR00FF00;

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)/高价;

QG1:=(低价+(高价 - DJ) * 1.191)/高价;

QG2:=(低价+(高价 - DJ) * 1.382)/高价;

QG3:=(低价+(高价 - DJ) * 1.50)/高价;

QG4:=(低价+(高价 - DJ) * 1.03)/高价;

QG5:=(低价+(高价 - DJ) * 1.08)/高价;

QG6:=(低价+(高价 - DJ) * 1.125)/高价;

ZH:=IF(HF,DATE<=RQG,DATE<=RQD),NODRAW;

高价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;

高价GA:IF(DATE>=RQD AND GF>=1,AH*QG1,DRAWNULL),COLOR007777,DOTLINE;

高价GB:IF(DATE>=RQD AND GF>=2,AH*QG2,DRAWNULL),COLOR007777,DOTLINE;

高价GC:IF(DATE>=RQD AND GF>=2,AH*QG3,DRAWNULL),COLOR007777,DOTLINE;

高价GD:IF(DATE>=RQD AND GF>=1,AH*QG4,DRAWNULL),COLOR777700,DOTLINE;

高价GE:IF(DATE>=RQD AND GF>=1,AH*QG5,DRAWNULL),COLOR777700,DOTLINE;

高价GF:IF(DATE>=RQD AND GF>=1,AH*QG6,DRAWNULL),COLOR770077,DOTLINE;

DRAWNUMBER(ZH,高价*Q1,高价*Q1),COLOR00FFFF;

DRAWNUMBER(ZH,高价*Q2,高价*Q2),COLOR00FFFF;

DRAWNUMBER(ZH,高价*Q3,高价*Q3),COLOR00FFFF;

DRAWNUMBER(ZH,高价*Q4,高价*Q4),COLOR00FFFF;

DRAWNUMBER(ZH,高价*Q5,高价*Q5),COLOR00FFFF;

DRAWNUMBER(ZH,高价*Q6,高价*Q6),COLOR00FF00;

DRAWNUMBER(ZH,高价*Q7,高价*Q7),COLOR00FF00;

DRAWNUMBER(ZH AND GF>=1,高价*QG1,高价*QG1),COLOR00FFFF;

DRAWNUMBER(ZH AND GF>=2,高价*QG2,高价*QG2),COLOR00FFFF;

DRAWNUMBER(ZH AND GF>=2,高价*QG3,高价*QG3),COLOR00FFFF;

DRAWNUMBER(ZH AND GF>=1,高价*QG4,高价*QG4),COLORFFFF00;

DRAWNUMBER(ZH AND GF>=1,高价*QG5,高价*QG5),COLORFFFF00;

DRAWNUMBER(ZH AND GF>=1,高价*QG6,高价*QG6),COLORFFAAFF;

AS:=(O+H+L+C)/4;

SY:=EMA(AS,10),LINETHICK2,COLORCCAACC;

BL:=EMA(AS,17),LINETHICK2,COLORFF6000;

SYA:EMA(AS,P1),LINETHICK1,COLORFFFFFF;

SYAA:EMA(AS,P2),LINETHICK1,COLOR00FF00;

SYAB:EMA(AS,P3),LINETHICK1,COLORFFFF00;

DRAWNUMBER(ISLASTBAR AND SYA,SYA*1.005,SYA);

LJ2:=(C-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;

LJF2:=(EMA(LJ2,3));

低:=18;

DI:=EMA(CLOSE,10) - EMA(CLOSE,22);

XG:=CROSS(LJF2,低);

DRAWICON(XG,L,11);

BLS:= BL+2.58*STDP(C,20);

BL2:= BL+1.96*STDP(C,20);

DRAWICON(CROSS(H,BLS),H,2);

DRAWICON(CROSS(H,BL2),H*1.007,8);

XGM:=CROSS(SY,BL);

DRAWICON(CROSS(C,BL) AND BL>REF(BL,1) AND DI>REF(DI,1),L,9);

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;

TYP:=(HIGH+LOW+CLOSE)/3;

CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));

DRAWICON(CROSS(CCI,-150),L,1);

DRAWTEXT(CROSS(CCI,-150),L,'↖CCI'),COLOR00FFFF;

{

请设置计算参数:

时间高定位: Param#0 (调整年度)

时间高定位: Param#1 (调整月份)

时间高定位: Param#2 (调整日期)

时间低定位: Param#3 (调整年度)

时间低定位: Param#4 (调整月份)

时间低定位: Param#5 (调整日期)

调整数值1-2:: Param#6 显示高低点线及黄金分割线

调整数值0-1:: Param#7 调整前后低点转换显示数值

调整数值0-5:: Param#8 (显示高点上黄金分割线)

调整数值1-255:: Param#9 (显示任意均价线)

调整数值1-255:: Param#10 (显示任意均价线)

调整数值1-255:: Param#11 (显示任意均价线)}

  •  标签:  

原文链接:https://www.tdxzb.com/?id=1852

本文版权:如无特别标注,本站文章均为原创。

相关文章

服务热线

18020657357

微信客服

微信客服