联系方式 Contact

云指标公式网

淘宝:zb-mart.taobao.com

电话:18020657357

Q Q:396950280

网址:www.yzhibiao.com

搜索 Search

通达信分时四小时高低点连线

2015-1-18 13:55:03点击:

 

通达信分时图如何将每一小时的高低点连线画出趋势线?如果用DRAWLINE(,,,,)函数  不能够完成  因为DRAWLINE(,,,,)属于未来函数   通达信分时画线不支持未来函数 应答疑区同学求助  变通画出了由9:31分到10:30  10:30分到11:29  13:00到14:00   14:00到15:00高低点连线  不知道盘中是否适合判断趋势。

画线是这样的
如果9:31分的收盘价大于10:30分的收盘价  趋势向下  画绿色线  反之  就画上升趋势  红色   上个图   希望能够帮助大家盘中提前掌控趋势    高手飘过
 

SJ1:=TIME=93100;
T1:=BARSLAST(SJ1);
SJ2:=TIME=103000;
SJ4:=TIME=112900;
T2:=BARSLAST(SJ2);
T4:=BARSLAST(SJ4);
H1:=IF(TIME=103000,REF(C,T2),DRAWNULL)=C;
H2:=IF(TIME=112900,REF(C,T4),DRAWNULL)=C;
CS2:=CONST(REF(C,T2));
CS4:=CONST(REF(C,T4));
GL2:=FILTERX(H1,T2);
GL4:=FILTERX(H2,T4);
L1:=IF(TIME=93100,REF(C,T1),DRAWNULL)=C;
CS1:=CONST(REF(C,T1));
GL1:=FILTERX(L1,T1);
DA:=CONST(IF(REF(GL2,BARSLAST(GL2)),REF(BARSLAST(GL1),BARSLAST(GL2)),DRAWNULL));
DA1:=CONST(IF(REF(GL4,BARSLAST(GL4)),REF(BARSLAST(GL2),BARSLAST(GL4)),DRAWNULL));
A:=IF(BARSLAST(GL1)>=0 AND BARSLAST(GL1)<=DA,((CS2-CS1)/DA)*BARSLAST(GL1)+CS1,DRAWNULL);
B:=IF(BARSLAST(GL2)>=0 AND BARSLAST(GL2)<=DA1,((CS4-CS2)/DA1)*BARSLAST(GL2)+CS2,DRAWNULL);
IF(A>=REF(A,1),A,DRAWNULL)COLORLIMAGENTA;
IF(A<REF(A,1),A,DRAWNULL)COLORGREEN;
IF(B>=REF(B,1),B,DRAWNULL)COLORLIMAGENTA;
IF(B<REF(B,1),B,DRAWNULL)COLORGREEN;
XSJ1:=TIME=130000;
XT1:=BARSLAST(XSJ1);
XSJ2:=TIME=140000;
XSJ4:=TIME=150000;
XT2:=BARSLAST(XSJ2);
XT4:=BARSLAST(XSJ4);
XH1:=IF(TIME=140000,REF(C,XT2),DRAWNULL)=C;
XH2:=IF(TIME=150000,REF(C,XT4),DRAWNULL)=C;
XCS2:=CONST(REF(C,XT2));
XCS4:=CONST(REF(C,XT4));
XGL2:=FILTERX(XH1,XT2);
XGL4:=FILTERX(XH2,XT4);
XL1:=IF(TIME=130000,REF(C,XT1),DRAWNULL)=C;
XCS1:=CONST(REF(C,XT1));
XGL1:=FILTERX(XL1,XT1);
XDA:=CONST(IF(REF(XGL2,BARSLAST(XGL2)),REF(BARSLAST(XGL1),BARSLAST(XGL2)),DRAWNULL));
XDA1:=CONST(IF(REF(XGL4,BARSLAST(XGL4)),REF(BARSLAST(XGL2),BARSLAST(XGL4)),DRAWNULL));
XA:=IF(BARSLAST(XGL1)>=0 AND BARSLAST(XGL1)<=XDA,((XCS2-XCS1)/XDA)*BARSLAST(XGL1)+XCS1,DRAWNULL);
XB:=IF(BARSLAST(XGL2)>=0 AND BARSLAST(XGL2)<=XDA1,((XCS4-XCS2)/XDA1)*BARSLAST(XGL2)+XCS2,DRAWNULL);
IF(XA>=REF(XA,1),XA,DRAWNULL)COLORLIMAGENTA;
IF(XA<REF(XA,1),XA,DRAWNULL)COLORGREEN;
IF(XB>=REF(XB,1),XB,DRAWNULL)COLORLIMAGENTA;
IF(XB<REF(XB,1),XB,DRAWNULL)COLORGREEN;