咨詢內容:
要求在高九的最高價位置和低九的最低價位置處向右延伸畫水平線
A1:=C>=REF(C,4);A2:=REF(C,0)<REF(C,4);
T1:=A2 AND REF(A1,1);
T2:=A2 AND REF(T1,1);
T3:=A2 AND REF(T2,1);
T4:=A2 AND REF(T3,1);
T5:=A2 AND REF(T4,1);
T6:=A2 AND REF(T5,1);
T7:=A2 AND REF(T6,1);
T8:=A2 AND REF(T7,1);
T9:=A2 AND REF(T8,1);
A:=T1 AND T2 AND T3 AND T4 AND T5 AND T6 AND T7 AND T8 AND T9;
DRAWTEXT(T9,LOW,'低9'),COLOR00FF00,ALIGN1,VALIGN0;
DRAWICON(T9,LOW,7);
DRAWTEXT(T1,LOW,'1'),COLOR00FF00,ALIGN1,VALIGN0;
A11:=C<=REF(C,4);A21:=REF(C,0)>REF(C,4);
T11:=A21 AND REF(A11,1);
T21:=A21 AND REF(T11,1);
T31:=A21 AND REF(T21,1);
T41:=A21 AND REF(T31,1);
T51:=A21 AND REF(T41,1);
T61:=A21 AND REF(T51,1);
T71:=A21 AND REF(T61,1);
T81:=A21 AND REF(T71,1);
T91:=A21 AND REF(T81,1);
DRAWTEXT(T91,HIGH,'高9'),COLOR00FFFF,ALIGN1,VALIGN2;
DRAWICON(T91,H,5);
DRAWTEXT(T11,HIGH,'1'),COLOR00FFFF,ALIGN1,VALIGN2;
A3:=BARSLAST(T91);
DRAWLINE(T91,TH,REFX(T91,1),REF(T91,A3),0);
?
要求在高九的最高價位置和低九的最低價位置處向右延伸畫水平線,直到下次再出高九和低九時結束此水平線段。我自己弄出來的是斜線而非水平線,不知問題出何處。
?
?
?來源:程序化99網( www.kzuj.com.cn )
博易技術人員:
A1:=C>=REF(C,4);A2:=REF(C,0)<REF(C,4);
T1:=A2 AND REF(A1,1);
T2:=A2 AND REF(T1,1);
T3:=A2 AND REF(T2,1);
T4:=A2 AND REF(T3,1);
T5:=A2 AND REF(T4,1);
T6:=A2 AND REF(T5,1);
T7:=A2 AND REF(T6,1);
T8:=A2 AND REF(T7,1);
T9:=A2 AND REF(T8,1);
A:=T1 AND T2 AND T3 AND T4 AND T5 AND T6 AND T7 AND T8 AND T9;
DRAWTEXT(T9,LOW,'低9'),COLOR00FF00,ALIGN1,VALIGN0;
DRAWICON(T9,LOW,7);
DRAWTEXT(T1,LOW,'1'),COLOR00FF00,ALIGN1,VALIGN0;
A11:=C<=REF(C,4);A21:=REF(C,0)>REF(C,4);
T11:=A21 AND REF(A11,1);
T21:=A21 AND REF(T11,1);
T31:=A21 AND REF(T21,1);
T41:=A21 AND REF(T31,1);
T51:=A21 AND REF(T41,1);
T61:=A21 AND REF(T51,1);
T71:=A21 AND REF(T61,1);
T81:=A21 AND REF(T71,1);
T91:=A21 AND REF(T81,1);
DRAWTEXT(T91,HIGH,'高9'),COLOR00FFFF,ALIGN1,VALIGN2;
DRAWICON(T91,H,5);
DRAWTEXT(T11,HIGH,'1'),COLOR00FFFF,ALIGN1,VALIGN2;
A11:=BARSLAST(T91);
A22:=BARSLAST(T9);
DRAWLINE(T91,HIGH,REFX(T91,1),REF(HIGH,A11),0);
DRAWLINE(T9,LOW,REFX(T9,1),REF(LOW,A22),0);
首先感謝???基本是這個結果了,美中不足是畫線只能在出后一個九時才顯示。我希望的是出第一個九就開始自然畫線直到下一個九出現結束本次畫線
來源 程序化久久網