美文网首页通往成功之路
关于drawline函数的用法

关于drawline函数的用法

作者: 此十八 | 来源:发表于2018-03-02 17:10 被阅读331次

    一、DRAWLINE函数说明1、功能:图形上绘制直线段.2、用法: DRAWLINE(COND1,PRICE1,COND2,PRICE2,EXPAND),当COND1条件满足时,在PRICE1位置画直线起点,当COND2条件满足时,在PRICE2位置画直线终点,EXPAND为延长类型。只有COND1和COND2均成立后才画出线段。3、例:ABC:=DRAWLINE(HIGH>=HHV(HIGH,20),HIGH,LOW<=LLV(LOW,20),LOW,1)表示在创20天新高与创20天新低之间画直线并且向右延长。在COND2未成立时,赋值是空的,但是如果后面COND2成立了,ABC就被赋值了。4、说明:从历史信息上看,DRAWLINE函数提供的信号十分准确,但与未来函数一样,信号的出现需要后市信息的确定才可以确定,所以慎待DRAWLINE函数!!二、含有DRAWLINE函数的指标指标1N1:=7;LC:=REF(CLOSE,1);X:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100,COLORYELLOW,LINETHICK1;魔鬼:=DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),X,1),COLOR00FF00;魔王:=DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),1,X),COLOR00FF00;TJ0:=X=魔王;TJ1:=X=魔鬼;TJ2:=XREF(1,X);JRS1:=DRAWICON(TJ1 AND TJ2,X,1);JRS2:=DRAWICON(TJ0 AND TJ3,X,2);DRAWICON(FILTER(JRS1>0,1),L*0.97,1);DRAWICON(FILTER(JRS2>0,1),H*1.02,15); 指标2MA5:=EMA(C,5);MA13:=EMA(C,13);UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS(MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS(MA5,MA13))+1),0),COLOR0000FF;DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS(MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS(MA13,MA5))+1),0),COLOR00FF00;A8:=100*EMA(EMA((C-REF(C,1)),6),6)/EMA(EMA(ABS((C-REF(C,1))),6),6);UP1:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(EMA(CLOSE,19),EMA(CLOSE,7)))+1),LLV(L,BARSLAST(CROSS(EMA(CLOSE,19),EMA(CLOSE,7)))+1),H=HHV(H,BARSLAST(CROSS(EMA(CLOSE,7),EMA(CLOSE,19)))+1),HHV(H,BARSLAST(CROSS(EMA(CLOSE,7),EMA(CLOSE,19)))+1),0);DOWN1:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(EMA(CLOSE,7),EMA(CLOSE,19)))+1),HHV(H,BARSLAST(CROSS(EMA(CLOSE,7),EMA(CLOSE,19)))+1),L=LLV(L,BARSLAST(CROSS(EMA(CLOSE,19),EMA(CLOSE,7)))+1),LLV(L,BARSLAST(CROSS(EMA(CLOSE,19),EMA(CLOSE,7)))+1),0);买:=IF((LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2))) AND REF(DOWN,1)REF(DOWN,1),DRAWNULL,100);卖:=IF(DOWN = UP AND DOWN0,0,10,15,0),COLOR781816;LC:=REF(CLOSE,1);RSI5:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*10,COLORFF00FF,LINETHICK1;RSI10:SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*10,COLOR00FFFF;VAR1:=C-REF(C,1);VAR2:=100*EMA(EMA(VAR1,6),6)/EMA(EMA(ABS(VAR1),6),6);MA5:=EMA(C,5);MA13:=EMA(C,13);UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS(MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS(MA5,MA13))+1),0),COLOR0000FF;DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS(MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS(MA13,MA5))+1),0),COLOR00FF00;BT:(LLV(VAR2,2)=LLV(VAR2,7) AND COUNT(VAR2<0,2) AND CROSS(VAR2,MA(VAR2,2))) ANDREF(DOWN,1)REF(DOWN,1);0,COLORFF00FF;10,COLORFF0000;STICKLINE(UP,0,0.2,3,0),COLOR0000FF;STICKLINE(DOWN,0,0.2,3,0),COLOR00FF00;STICKLINE(BT,0,3,2,0),COLOR000088;STICKLINE(BT,0,3,1,0),COLOR0000CC;STICKLINE(BT,0,3,0.22,0),COLOR0000FF;DRAWTEXT(BT,3,'短牛'),COLOR0000FF;TJ1:=REF(DOWN,1)REF(DOWN,1) AND CREF(DOWN,1) AND CREF(UP,2) AND DOWN=1,80,10),STICK,COLORRED;(*慎待drawline函数*)

    相关文章

      网友评论

        本文标题:关于drawline函数的用法

        本文链接:https://www.haomeiwen.com/subject/cqoaxftx.html