通达信威廉K线主图源码公式:
input:N(19,1,999)
WR:=(100 + ((100 * (CLOSE - HHV(HIGH,N))) / (HHV(HIGH,N) - LLV(LOW,N))));
WR24:=(100 + ((100 * (CLOSE - HHV(HIGH,(N * 2)))) / (HHV(HIGH,(N * 2)) - LLV(LOW,(N * 2)))));
上档:HHV(HIGH,N),COLORFF00FF;
强势:(((HHV(HIGH,N) - LLV(LOW,N)) * 0.8) + LLV(LOW,N)),COLOR808080;
上防:(((HHV(HIGH,N) - LLV(LOW,N)) * 0.618) + LLV(LOW,N)),COLOR808080;
中线:((HHV(HIGH,N) + LLV(LOW,N)) / 2),COLORFFFFFF;
下防:(((HHV(HIGH,N) - LLV(LOW,N)) * 0.382) + LLV(LOW,N)),COLOR808080;
弱势:(((HHV(HIGH,N) - LLV(LOW,N)) * 0.2) + LLV(LOW,N)),COLOR808080;
下档:LLV(LOW,N),COLORFF00FF;
多空线:MA(CLOSE,13),COLORFFFF00;
振幅:=((HHV(HIGH,N) - LLV(LOW,N)) / LLV(LOW,N));
STICKLINE(((WR >= 80) AND (CLOSE >= OPEN)),OPEN,CLOSE,8,1),COLORFF00FF;
STICKLINE(((WR >= 80) AND (CLOSE < OPEN)),OPEN,CLOSE,8,0),COLORFF00FF;
STICKLINE((((WR >= 50) AND (WR < 80)) AND (CLOSE >= OPEN)),OPEN,CLOSE,8,1),COLORFF00FF;
STICKLINE((CLOSE > OPEN),HIGH,CLOSE,0.4,0),COLORFF00FF;
STICKLINE((CLOSE > OPEN),OPEN,LOW,0.4,0),COLORFF00FF;
STICKLINE((((WR >= 50) AND (WR < 80)) AND (CLOSE < OPEN)),OPEN,CLOSE,8,0),COLORFF00FF;
STICKLINE(((WR <= 50) AND (CLOSE >= OPEN)),OPEN,CLOSE,8,1),COLORFF00FF;
STICKLINE(((WR <= 20) AND (CLOSE < OPEN)),OPEN,CLOSE,8,0),COLORFF00FF;
{STICKLINE((((WR > 20) AND (WR < 50)) AND (CLOSE >= OPEN)),OPEN,CLOSE,8,1),COLORFF00FF;
STICKLINE((OPEN > CLOSE),HIGH,OPEN,0.4,0),COLORFF00FF;
STICKLINE((OPEN > CLOSE),CLOSE,LOW,0.4,0),COLORFF00FF;}
{STICKLINE((((WR > 20) AND (WR < 50)) AND (CLOSE < OPEN)),OPEN,CLOSE,8,0),COLORFF00FF;} |