等级: 新手上路
- 注册:
- 2021-9-16
- 曾用名:
|
VARIABLE:TK:=0,UP:=0,DN:=0;
N:=62;
M:=10;
TR1:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ATR:=MA(TR1,N);
MID:= (HIGH + LOW) /2;
UP:= MID+ATR * M;
DN:=MID-ATR * M;
TK:=IF(C>REF(UP,1),1,IF(C<REF(DN,1),-1,TK));
FLAG:=TK<0 AND REF(TK,1)>0;
FLAGH:=TK>0 AND REF(TK,1)<0;
DN:=IF(TK>0 AND DN<REF(DN,1),REF(DN,1),DN);
UP:=IF(TK<0 AND UP>REF(UP,1),REF(UP,1),UP);
UP:=IF(FLAG,MID + ATR * M,UP);
DN:=IF(FLAGH,MID - ATR * M,DN);
OUTTR:=TK;
OUTUP:=UP;
OUTDN:=DN;
SUPERTREN:IF(OUTTR=1,OUTDN,OUTUP),COLORWHITE;
PARTLINE(TK=1,SUPERTREN,RGB(255,0,255)),LINETHICK1;
PARTLINE(TK=-1,SUPERTREN,RGB(0,255,255)),LINETHICK1;
|
|