趋势多空,参考共享。 通达信多空买卖趋势副图公式源码
M:=24;
A:=5;
RSV:=((HHV(HIGH,M)-CLOSE)/(HHV(HIGH,M)-LLV(LOW,M))*200)-125;
空方主力:SMA(RSV,A,1);
RSV1:=((CLOSE-LLV(LOW,M))/(HHV(HIGH,M)-LLV(LOW,M))*200)-105;
多方主力:SMA(RSV1,A,1);
WD:=CROSS(空方主力,-85);
WD1:=CROSS(空方主力,多方主力);
VAR1A:=ZIG(CLOSE,13);
买入确认: IF(REF(VAR1A,2)>REF(VAR1A,1) AND VAR1A>REF(VAR1A,1),0,-70),COLORRED;
卖出确认: IF(REF(VAR1A,2)<REF(VAR1A,1) AND VAR1A<REF(VAR1A,1),0,40);
趋势:SMA(((CLOSE- LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100),3,1),COLORYELLOW;
STICKLINE(趋势>50,趋势,50,2,0),COLORRED;
STICKLINE(趋势<50,趋势,50,2,0),COLORGREEN;
温度值:(C-LLV(C,21))/(HHV(C,21)-LLV(C,21))*100;
918344387.png
|