通达信的必杀线公式
N:=10;
T1:=CONST(LLVBARS(LOW,N));
T1HIGH:=CONST(REF(HIGH,T1));
CC:=CONST(CURRBARSCOUNT);
T2:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T1)) AND (HIGH>T1HIGH)));
T2HIGH:=CONST(REF(HIGH,T2));
T3:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T2)) AND (HIGH>T2HIGH)));
T3HIGH:=CONST(REF(HIGH,T3));
必杀线:DRAWLINE(CURRBARSCOUNT=T3+1, T3HIGH, ISLASTBAR, T3HIGH, 1),LINETHICK3,COLOR8080FF;
DRAWTEXT(ISLASTBAR, T3HIGH, ' 必杀线')LINETHICK1,COLORYELLOW;
72488783.png
{ 公式名 周月必杀 }
N1:=10;
T1:=CONST(LLVBARS(LOW,N1));
T1HIGH:=CONST(REF(HIGH,T1));
CC:=CONST(CURRBARSCOUNT);
T2:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T1)) AND (HIGH>T1HIGH)));
T2HIGH:=CONST(REF(HIGH,T2));
T3:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T2)) AND (HIGH>T2HIGH)));
T3HIGH:=CONST(REF(HIGH,T3));
DRAWKLINE(H,O,L,C);
日必杀线:DRAWLINE(CURRBARSCOUNT=T3+1, T3HIGH, ISLASTBAR, T3HIGH, 1),LINETHICK3,COLOR8080FF;
DRAWTEXT(ISLASTBAR, T3HIGH, ' 日必杀线')LINETHICK1,COLORYELLOW,COLOR8080FF;
周必杀线:"必杀.必杀#WEEK";
DRAWTEXT(ISLASTBAR, 周必杀线, ' 周必杀线')LINETHICK1,COLORYELLOW;
月必杀线:"必杀.必杀#MONTH";
DRAWTEXT(ISLASTBAR, 月必杀线, ' 月必杀线')LINETHICK1,COLORFF00FF;
|