以下是通达信红蓝三角公式 寻找突破的好帮手
通达信红蓝三角公式 寻找突破的好帮手
源码
SJ1:=(REF(HIGH,3) = HHV(HIGH,((2 * 3) + 1)));
SJ2:=FILTER(SJ1,3);
SJ3:=BACKSET(SJ2,(3 + 1));
SJ4:=FILTER(SJ3,3);
SJ5:=(REF(LOW,3) = LLV(LOW,((2 * 3) + 1)));
SJ6:=FILTER(SJ5,3);
SJ7:=BACKSET(SJ6,(3 + 1));
SJ8:=FILTER(SJ7,3);
SJ9:=((REF(LLV(LOW,(2 * 3)),1) + REF(HHV(HIGH,(2 * 3)),1)) / 2);
SJ10:=((HIGH + LOW) / 2);
SJ11:=(((SJ4 AND NOT((SJ8 AND (SJ9 >= SJ10)))) OR BARSTATUS) OR (BARSCOUNT(CLOSE) = 1));
SJ12:=(SJ8 AND NOT((SJ4 AND (SJ9 < SJ10))));
SJ13:=(SJ4 AND NOT((SJ8 AND (SJ9 >= SJ10))));
SJ14:=(REF(BARSLAST(SJ11),1) + 1);
SJ15:=BACKSET((SJ11 AND (COUNT(SJ12,SJ14) > 0)),LLVBARS(IF(SJ12,LOW,10000),SJ14));
SJ16:=(SJ15 > REF(SJ15,1));
SJ17:=BACKSET(SJ16,2);
SJ18:=(SJ17 > REF(SJ17,1));
SJ19:=((SJ18 OR BARSTATUS) OR (BARSCOUNT(CLOSE) = 1));
SJ20:=(REF(BARSLAST(SJ19),1) + 1);
SJ21:=BACKSET((SJ19 AND (COUNT(SJ13,SJ20) > 0)),HHVBARS(IF(SJ13,HIGH,0),SJ20));
SJ22:=(SJ21 > REF(SJ21,1));
SJ23:=BACKSET(SJ22,2);
SJ24:=(SJ23 > REF(SJ23,1));
SJ25:=BACKSET(BARSTATUS,(BARSLAST(SJ18) + 1));
SJ26:=(SJ25 > REF(SJ25,1));
SJ27:=BACKSET(BARSTATUS,(BARSLAST(SJ24) + 1));
SJ28:=(SJ27 > REF(SJ27,1));
底:=REF(LOW,BARSLAST(SJ26));
頂:=REF(HIGH,BARSLAST(SJ28));
STICKLINE(SJ26,頂,底,0,0),COLORBLUE,LINETHICK2;
DRAWLINE(SJ28,HIGH,SJ26,LOW,0),COLORBLUE,LINETHICK2;
DRAWLINE(SJ28,HIGH,SJ26,頂,0),COLORBLUE,LINETHICK2;
STICKLINE(SJ28,頂,底,0,0),COLORRED,LINETHICK2;
DRAWLINE(SJ26,LOW,SJ28,HIGH,0),COLORRED,LINETHICK2;
DRAWLINE(SJ26,LOW,SJ28,底,0),COLORRED,LINETHICK2;
糡三角画完出局:DRAWTEXT((BARSCOUNT(CLOSE)=BARSTATUS=2),HIGH,’ 糡色三角形画完出局’),COLOR0000FF;
蓝三角画完介入:DRAWTEXT((BARSCOUNT(CLOSE)=BARSTATUS=2),HIGH,’ 藍色三角形画完介入’),COLORBLUE;
评论(0)