全新解读任意两点黄金分割(主图 源码 帖图)

2011-02-16 11:34:00来源:本站整理浏览:107

INPUT:高(0,0,9999),DHV(0,0,1),低L(0,0,255);
TTt:=ISLASTBAR=1;
TA1:=BARPOS=SYSPARAM(1);
T1:=datacount-barpos+0;
T2:=DATEDIFF(date,CURRENTDATE);
DRAWTEXTEX(TTt,0,2,5,'★交易天:'+NUMTOSTR(T1[SYSPARAM(1)],0)+'(天) / '+'◆自然天:'+NUMTOSTR(T2[SYSPARAM(1)],0)+'(天) '),COLORbbbbbb;
X:=SYSPARAM(2);   
X1:=SYSPARAM(3);   
YG:=REF(H,BARSLAST(TA1));
N:=((X1 - X) + 1);
BHC:=IF(DHV=0,H,C);
DHC:=IF(DHV=0,L,C);
AHH:=HHV(BHC,N);
ZG:=ref(BHC,高);
BHH:=HHV(zg,1);
YD:=REF(DHC,BARSLAST(TA1));
ZDL:=ref(L,低L);
BDL:=LLV(ZDL,1);
DDL:=BDL[X1];
HH:=IF(高=0,AHH,BHH);
LL:=LLV(L,N);
GG:HH[X1],colorFF00FF;
DD1:LL[X1],colorff0000;
DD:=YD[X1],color005555,LINEDOT;
PARTLINE(YD,YD),LINETHICK1,COLOR008F00;
DRAWTEXT(TTT ,DD1,'最低'+NUMTOSTR(DD1,2)),ALIGN1,colorFFEE00,,pxup25;
DRAWTEXT(TTT ,GG,' 最高'+NUMTOSTR(GG,2)),ALIGN1,colorffaaaa,,pxDN5;
Q:=(DD + ((GG - DD) * 0.191));
Q2:=(DD + ((GG - DD) * 0.382));
Q3:=(DD + ((GG - DD) * 0.50));
Q4:=(DD + ((GG - DD) * 0.618));
Q5:=(DD + ((GG - DD) * 0.809));
Q6:=(DD + ((GG - DD) * 0.45));
Q7:=(DD + ((GG - DD) * 0.55));
Y_1:=REF(Q,BARSLAST(TA1));
Y_2:=REF(Q2,BARSLAST(TA1));
Y_3:=REF(Q3,BARSLAST(TA1));
Y_4:=REF(Q4,BARSLAST(TA1));
Y_5:=REF(Q5,BARSLAST(TA1));
Y_6:=REF(Q6,BARSLAST(TA1));
Y_7:=REF(Q7,BARSLAST(TA1));
PARTLINE(Y_1,Y_1),LINEDOT,Color005555;
PARTLINE(Y_2,Y_2),LINEDOT,Color005555;
PARTLINE(Y_3,Y_3),LINEDOT,Color888888;
PARTLINE(Y_4,Y_4),LINEDOT,Color005555;
PARTLINE(Y_5,Y_5),LINEDOT,Color005555;
DRAWTEXT(TA1,Y_1,' 191*('+NUMTOSTR(Q,2)),COLOR00bbbb,ALIGN1,PXDN5;
DRAWTEXT(TA1,Y_2,' 382*('+NUMTOSTR(Q2,2)),COLOR00bbbb,ALIGN1,PXUP22;
DRAWTEXT(TA1,Y_3,' ★:1/2('+NUMTOSTR(Q3,2)),COLOReeeeee,ALIGN1,PXDN5;
DRAWTEXT(TA1,Y_4,' 618*('+NUMTOSTR(Q4,2)),COLOR00bbbb,ALIGN1,PXDN5;
DRAWTEXT(TA1,Y_5,' 809*('+NUMTOSTR(Q5,2)),COLOR00bbbb,ALIGN1,PXDN5;
DRAWTEXT(TA1,Y_6,' 45﹡→('+NUMTOSTR(Q6,2)),COLOReeeeee,ALIGN1,PXDN5;
DRAWTEXT(TA1,Y_7,' 55﹡→('+NUMTOSTR(Q7,2)),COLOReeeeee,ALIGN1,PXDN5;
STICKLINE(TA1,gg,dd,0,0),LINETHICK0,COLORFFAAAA;
DRAWTEXT(TA1,dd,'▲'),ALIGN0,color00FFdd,pxdn5;
DRAWTEXT(TA1,dd,'      --'+NUMTOSTR(yd,2)),ALIGN0,color00FFdd,pxdn5;

 

股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式