时空之窗
-
相关简介:C/C++ Code 复制内容到剪贴板 t1:=BARPOS=SYSPARAM(2)+左侧右移; t2:=BARPOS=SYSPARAM(3)-右侧左移; t11:=SYSPARAM(2)+左侧右移; t21:=SYSPARAM(3)-右侧左移; ymd:=DATE; D1:ymd[t11],linethick0,coloryellow; D2:ymd[t21],linethick0,coloryellow; {D2:hhv( if (t2,date,0),0),
-
文章来源:择股网作者:股海网发布时间:2009-10-27浏览次数:
C/C++ Code复制内容到剪贴板
- t1:=BARPOS=SYSPARAM(2)+左侧右移;
- t2:=BARPOS=SYSPARAM(3)-右侧左移;
- t11:=SYSPARAM(2)+左侧右移;
- t21:=SYSPARAM(3)-右侧左移;
- ymd:=DATE;
- D1:ymd[t11],linethick0,coloryellow;
- D2:ymd[t21],linethick0,coloryellow;
- {D2:hhv(if(t2,date,0),0),linethick0;}
- VERTLINE(t1),color00ffff,POINTDOT;
- VERTLINE(t2),color00ffff,POINTDOT;
- {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,POINTDOT;
- D191:ymd[x1831],linethick0,colorcyan;
- x1838:=t11+ROUND(x8);
- tx8:=BARPOS=x1838;
- VERTLINE(tx8),color00aaaa,POINTDOT;
- D382:ymd[x1838],linethick0,color009999;
- x18305:=t11+ROUND(x05);
- tx05:=BARPOS=x18305;
- VERTLINE(tx05),color0000ff,POINTDOT;
- D050:ymd[x18305],linethick0,colorred;
- x1833:=t11+ROUND(x3);
- tx3:=BARPOS=x1833;
- VERTLINE(tx3),color00aaaa,POINTDOT;
- D618:ymd[x1833],linethick0,color009999;
- x1835:=t11+ROUND(x5);
- tx5:=BARPOS=x1835;
- VERTLINE(tx5),colorffff33,POINTDOT;
- D809:ymd[x1835],linethick0,colorcyan;
- 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;
- 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(d050+19000000,0),4)+STRRIGHT(NUMTOSTR(D050,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.000'),color00ffff;
- DRAWTEXT(t2,ph*0.99,'1.000'),color00ffff;
- DRAWTEXT(tx1,ph*0.99,'0.191'),colorffff33;
- DRAWTEXT(tx8,ph*0.99,'0.382'),color00aaaa;
- DRAWTEXT(tx05,ph*0.99,'0.500'),color0000ff;
- DRAWTEXT(tx3,ph*0.99,'0.618'),color00aaaa;
- DRAWTEXT(tx5,ph*0.99,'0.809'),colorffff33;
- H1:=HHV(HIGH,N);
- L1:=LLV(LOW,N);
- HH:=REF(H1,NN);
- LL:=REF(L1,NN);
- <%
- VH=FFL.VARDATA("HH")
- VL=FFL.VARDATA("LL")
- VN=FFL.VARDATA("N")
- LAST=UBOUND(VH)
- IF VN>LAST THEN VN=LAST+1
- FOR I=LAST TO LAST-VN+1 STEP-1
- VH(I)=VH(LAST)
- VL(I)=VL(LAST)
- NEXT
- FFL.VARDATA("HH")=VH
- FFL.VARDATA("LL")=VL
- FFL.VARSTARTINDEX("HH")=LAST-VN+1
- FFL.VARSTARTINDEX("LL")=LAST-VN+1
- %>
- HH,color009999;
- DRAWTEXT(CLOSE>0 and ISLASTBAR=1,HH,' 1.000'),color009999;
- DRAWNUMBER(BARSCOUNT(LL)=N-(N-1),HH,HH,2),align2,color009999;
- LL+((HH-LL)*0.809),POINTDOT,linethick1,coloryellow;
- DRAWTEXT(CLOSE>0 and ISLASTBAR=1,LL+((HH-LL)*0.809),' 0.809'),color009999;
- DRAWNUMBER(BARSCOUNT(LL)=N-(N-1),LL+((HH-LL)*0.809),LL+((HH-LL)*0.809),2),align2,color009999;
- LL+((HH-LL)*0.764),POINTDOT,linethick1,coloryellow;
- DRAWTEXT(CLOSE>0 and ISLASTBAR=1,LL+((HH-LL)*0.764),' 0.764'),color009999;
- DRAWNUMBER(BARSCOUNT(LL)=N-(N-1),LL+((HH-LL)*0.764),LL+((HH-LL)*0.764),2),align2,color009999;
- LL+((HH-LL)*0.618),POINTDOT,linethick1,coloryellow;
- DRAWTEXT(CLOSE>0 and ISLASTBAR=1,LL+((HH-LL)*0.618),' 0.618'),color009999;
- DRAWNUMBER(BARSCOUNT(LL)=N-(N-1),LL+((HH-LL)*0.618),LL+((HH-LL)*0.618),2),align2,color009999;
- LL+((HH-LL)*0.500),POINTDOT,linethick1,coloryellow;
- DRAWTEXT(CLOSE>0 and ISLASTBAR=1,LL+((HH-LL)*0.500),' 0.500'),color009999;
- DRAWNUMBER(BARSCOUNT(LL)=N-(N-1),LL+((HH-LL)*0.500),LL+((HH-LL)*0.500),2),align2,color009999;
- LL+((HH-LL)*0.382),POINTDOT,linethick1,coloryellow;
- DRAWTEXT(CLOSE>0 and ISLASTBAR=1,LL+((HH-LL)*0.382),' 0.382'),color009999;
- DRAWNUMBER(BARSCOUNT(LL)=N-(N-1),LL+((HH-LL)*0.382),LL+((HH-LL)*0.382),2),align2,color009999;
- LL+((HH-LL)*0.236),POINTDOT,linethick1,coloryellow;
- DRAWTEXT(CLOSE>0 and ISLASTBAR=1,LL+((HH-LL)*0.236),' 0.236'),color009999;
- DRAWNUMBER(BARSCOUNT(LL)=N-(N-1),LL+((HH-LL)*0.236),LL+((HH-LL)*0.236),2),align2,color009999;
- LL+((HH-LL)*0.191),POINTDOT,linethick1,coloryellow;
- DRAWTEXT(CLOSE>0 and ISLASTBAR=1,LL+((HH-LL)*0.191),' 0.191'),color009999;
- DRAWNUMBER(BARSCOUNT(LL)=N-(N-1),LL+((HH-LL)*0.191),LL+((HH-LL)*0.191),2),align2,color009999;
- LL,color009999;
- DRAWTEXT(CLOSE>0 and ISLASTBAR=1,LL,' 0.000↑'),color009999;
- DRAWNUMBER(BARSCOUNT(LL)=N-(N-1),LL,LL,2),align2,color009999;
- fbars:=SYSPARAM(0);
- f5:=BARSSINCE(CLOSE)=fbars-1;
- VERTLINE(f5),POINTDOT,color996666,linethick1,shift5;
- DRAWNUMBER(f5,SYSPARAM(4),5,0),shift5,coloryellow;
- ff5:=BARSSINCE(CLOSE)=fbars-5;
- VERTLINE(ff5),POINTDOT,color996666,linethick1;
- DRAWNUMBER(ff5,SYSPARAM(4),5,0),coloryellow;
- f8:=BARSSINCE(CLOSE)=fbars-1;
- ff8:=BARSSINCE(CLOSE)=fbars-8;
- VERTLINE(f8),POINTDOT,color996666,linethick1,shift8;
- DRAWNUMBER(f8,SYSPARAM(4),8,0),shift8,colorred;
- VERTLINE(ff8),POINTDOT,color996666,linethick1;
- DRAWNUMBER(ff8,SYSPARAM(4),8,0),colorred;
- f13:=BARSSINCE(CLOSE)=fbars-1;
- ff13:=BARSSINCE(CLOSE)=fbars-13;
- VERTLINE(f13),POINTDOT,color996666,linethick1,shift13;
- DRAWNUMBER(f13,SYSPARAM(4),13,0),shift13,colorgreen;
- VERTLINE(ff13),POINTDOT,color996666,linethick1;
- DRAWNUMBER(ff13,SYSPARAM(4),13,0),colorgreen;
- f21:=BARSSINCE(CLOSE)=fbars-1;
- ff21:=BARSSINCE(CLOSE)=fbars-21;
- VERTLINE(f21),POINTDOT,color996666,linethick1,shift21;
- DRAWNUMBER(f21,SYSPARAM(4),21,0),shift21,colormagenta;
- VERTLINE(ff21),POINTDOT,color996666,linethick1;
- DRAWNUMBER(ff21,SYSPARAM(4),21,0),colormagenta;
- f34:=BARSSINCE(CLOSE)=fbars-1;
- ff34:=BARSSINCE(CLOSE)=fbars-34;
- VERTLINE(f34),POINTDOT,color996666,linethick1,shift34;
- DRAWNUMBER(f34,SYSPARAM(4),34,0),shift34,colorcyan;
- VERTLINE(ff34),POINTDOT,color996666,linethick1;
- DRAWNUMBER(ff34,SYSPARAM(4),34,0),colorcyan;
- f55:=BARSSINCE(CLOSE)=fbars-1;
- ff55:=BARSSINCE(CLOSE)=fbars-54;
- VERTLINE(f55),POINTDOT,color996666,linethick1,shift55;
- DRAWNUMBER(f55,SYSPARAM(4),55,0)shift55,COLORFF0099;
- VERTLINE(ff55),POINTDOT,color996666,linethick1;
- DRAWNUMBER(ff55,SYSPARAM(4),55,0),COLORFF0099;
- f89:=BARSSINCE(CLOSE)=fbars-1;
- ff89:=BARSSINCE(CLOSE)=fbars-88;
- VERTLINE(f89),POINTDOT,color996666,linethick1,shift89;
- DRAWNUMBER(f89,SYSPARAM(4),89,0),shift89,colorblue;
- VERTLINE(ff89),POINTDOT,color996666,linethick1;
- DRAWNUMBER(ff89,SYSPARAM(4),89,0),colorblue;
- f134:=BARSSINCE(CLOSE)=fbars+20;
- ff134:=BARSSINCE(CLOSE)=fbars-144;
- VERTLINE(f134),POINTDOT,color996666,linethick1,shift124;
- DRAWNUMBER(f134,SYSPARAM(4),144,0),shift124,color996666;
- VERTLINE(ff134),POINTDOT,color996666,linethick1;
- DRAWNUMBER(ff134,SYSPARAM(4),144,0),color996666;
- 当前月:=FRACPART(ROUND(CURRENTDATE/100)/100)*100;
- DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='1',CLOSE,NUMTOSTR(当前月,0)+'月时间窗口:6、15、21、*25\n \n \n \n '),COLOR00FFFF,ALIGN4;
- DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='2',CLOSE,NUMTOSTR(当前月,0)+'月时间窗口:6、15、21\n \n \n \n '),COLOR00FFFF,ALIGN4;
- DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='3',CLOSE,NUMTOSTR(当前月,0)+'月时间窗口:6、15、*20、21\n \n \n \n '),COLOR00FFFF,ALIGN4;
- DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='4',CLOSE,NUMTOSTR(当前月,0)+'月时间窗口:6、15、21\n \n \n \n '),COLOR00FFFF,ALIGN4;
- DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='5',CLOSE,NUMTOSTR(当前月,0)+'月时间窗口:6、*12、15、21\n \n \n \n '),COLOR00FFFF,ALIGN4;
- DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='6',CLOSE,NUMTOSTR(当前月,0)+'月时间窗口:6、*14、21\n \n \n \n '),COLOR00FFFF,ALIGN4;
- DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='7',CLOSE,NUMTOSTR(当前月,0)+'月时间窗口:8、15、*19、23\n \n \n \n '),COLOR00FFFF,ALIGN4;
- DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='8',CLOSE,NUMTOSTR(当前月,0)+'月时间窗口:*6、8、15、23\n \n \n \n '),COLOR00FFFF,ALIGN4;
- DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='9',CLOSE,NUMTOSTR(当前月,0)+'月时间窗口:8、15、*18、23\n \n \n \n '),COLOR00FFFF,ALIGN4;
- DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='10',CLOSE,NUMTOSTR(当前月,0)+'月时间窗口:8、15、23、*31\n \n \n \n '),COLOR00FFFF,ALIGN4;
- DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='11',CLOSE,NUMTOSTR(当前月,0)+'月时间窗口:8、15、23、*28\n \n \n \n '),COLOR00FFFF,ALIGN4;
- DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='12',CLOSE,NUMTOSTR(当前月,0)+'月时间窗口:8、15、23、*31\n \n \n \n '),COLOR00FFFF,ALIGN4;