时间周期黄金分割条件选股公式{☆§提示:1计算机画线不能代替手工作图。
2确定历史数据完整。
}{精确的黄金分割是二分之根号五减一,即0.618=(SQRT(5)-1)/2} {注释里有黄金分割的解释}input:左侧右移(0),右侧左移(0),开关(1,1,2);t1:=barpos=sysparam(2)+左侧右移;t2:=barpos=sysparam(3)-右侧左移;t11:=sysparam(2)+左侧右移;t21:=sysparam(3)-右侧左移;ymd:=date;D1:ymd[t11],linethick0;D2:ymd[t21],linethick0;{D2:hhv(if(t2,date,0),0),linethick0;}VERTLINE(t1),color00ffff,LINEDOT;VERTLINE(t2),color00ffff,LINEDOT;{d1:=if(t1 or t2,barpos,0);dd:=d1;x835:=SORTPOS(dd,1,1,datacount);间隔:abs(d1[dd[1]]-d1[dd[2]]),linethick0;}间隔:t21-t11,linethick0;{ccc:ref(BARSTATUS=2,右侧左移);}x1:=间隔*(0.191);x8:=间隔*(0.382);x05:=间隔*(0.5);x3:=间隔*(0.618);x5:=间隔*(0.809);x1831:=sysparam(2)+左侧右移+ROUND(x1);tx1:=BARPOS=x1831;VERTLINE(tx1),colorffff33,LINEDOT;D191:ymd[x1831],linethick0;x1838:=t11+ROUND(x8);tx8:=BARPOS=x1838;VERTLINE(tx8),color00aaaa,LINEDOT;D382:ymd[x1838],linethick0;x18305:=t11+ROUND(x05);tx05:=BARPOS=x18305;VERTLINE(tx05),color0000ff,LINEDOT;D05:ymd[x18305],linethick0;x1833:=t11+ROUND(x3);tx3:=BARPOS=x1833;VERTLINE(tx3),color00aaaa,LINEDOT;D618:ymd[x1833],linethick0;x1835:=t11+ROUND(x5);tx5:=BARPOS=x1835;VERTLINE(tx5),colorffff33,LINEDOT;D809:ymd[x1835],linethick0;ph:=SYSPARAM(4);pl:=SYSPARAM(5);drawtext(t1,pl,STRLEFT(NUMTOSTR(d1+19000000,0),4)+STRRIGHT(NUMTOSTR(d1,0),4)), color00ffff;drawtext(t2,pl,STRLEFT(NUMTOSTR(d2+19000000,0),4)+STRRIGHT(NUMTOSTR(d2,0),4)), color00ffff,align2;drawtext(tx1,pl,STRLEFT(NUMTOSTR(d191+19000000,0),4)+STRRIGHT(NUMTOSTR(d191, 0),4)),colorffff33;drawtext(tx8,pl,STRLEFT(NUMTOSTR(d382+19000000,0),4)+STRRIGHT(NUMTOSTR(D382 ,0),4)),color00aaaa;drawtext(tx05,pl,STRLEFT(NUMTOSTR(d05+19000000,0),4)+STRRIGHT(NUMTOSTR(D05, 0),4)),color0000ff;drawtext(tx3,pl,STRLEFT(NUMTOSTR(d618+19000000,0),4)+STRRIGHT(NUMTOSTR(D618 ,0),4)),color00aaaa;drawtext(tx5,pl,STRLEFT(NUMTOSTR(d809+19000000,0),4)+STRRIGHT(NUMTOSTR(d809, 0),4)),colorffff33;drawtext(t1,ph*0.99,'0点'),color00ffff;drawtext(t2,ph*0.99,'100%'),color00ffff,align2;drawtext(tx1,ph*0.99,'0.191'),colorffff33;drawtext(tx8,ph*0.99,'0.382'),color00aaaa;drawtext(tx05,ph*0.99,'0.5'),color0000ff;drawtext(tx3,ph*0.99,'0.618'),color00aaaa;drawtext(tx5,ph*0.99,'0.809'),colorffff33;if 开关=2 thenbeginx236:=间隔*(0.236);x764:=间隔*(0.764);x236:=sysparam(2)+左侧右移+ROUND(x236);tx236:=BARPOS=x236;VERTLINE(tx236),coloraaaaaa,LINEDOT;D236:ymd[x236],linethick0;x764:=t11+ROUND(x764);tx764:=BARPOS=x764;VERTLINE(tx764),coloraaaaaa,LINEDOT;D764:ymd[x764],linethick0;pllh:=(pl*4+ph)/5;phhl:=(pl+ph*4)/5;drawtext(tx236,pllh,STRLEFT(NUMTOSTR(d236+19000000,0),4)+STRRIGHT(NUMTOSTR(d 236,0),4)),coloraaaaaa;drawtext(tx764,pllh,STRLEFT(NUMTOSTR(d764+19000000,0),4)+STRRIGHT(NUMTOSTR(d 764,0),4)),coloraaaaaa;drawtext(tx236,phhl,'0.236'),coloraaaaaa;drawtext(tx764,phhl,'0.764'),coloraaaaaa;end;{§历史影响现在,现在影响未来。