「通达信」红绿柱趋势指标公式

VAR1:=(HHV(high,9)-close)/(HHV(HIGH,9)-LLV(LOW,9))*100-70;
VAr2:=sma(VAR1,9,1) 100;
VAR3:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR4:=SMA(VAR3,3,1);
VAR5:=SMA(VAR4,3,1) 100;
VAR6:=VAR5-VAR2;
趋势: IF(VAR6>45,VAR6-45,0);
stICKLINE(REF(趋势,1)< 趋势, 趋势,REF(趋势,1),2,0),COLORMAGENTA;
STICKLINE(REF(趋势,1)> 趋势, 趋势,REF(趋势,1),2,0),COLORGREEN;
DRAWicoN(FILTER(REF(趋势,1)< 趋势 AND REF(趋势,1)<1,5),趋势,23);

分享: