//---parameters
PriceSmoothing = 15
Filter = 5
cHigh = weightedaverage[PriceSmoothing](high)
cLow = weightedaverage[PriceSmoothing](low)
cOpen = weightedaverage[PriceSmoothing](open)
cClose = weightedaverage[PriceSmoothing](close)
pClose = cClose[1]
trueRange = max(cHigh,cClose) - min(cLow,pClose)
rrange = cHigh-cLow
if rrange<>0 and trueRange<>0 then
vqi = ((cClose-pClose)/trueRange + (cClose-cOpen)/rrange)*0.5
else
vqi = vqi[1]
endif
vqi = abs(vqi)*(cClose-pClose+cClose-cOpen)*0.5
sumVqi = vqi
if Filter>0 then
if abs(sumVqi-sumVqi[1])<(Filter*ticksize) then
sumVqi = sumVqi[1]
endif
endif
if sumVqi > 0 then
color = 1
else
color = -1
endif
return sumVqi coloured by color
변환 문의드립니다. 감사합니다.
답변 1
예스스탁
예스스탁 답변
2020-04-03 19:33:54
안녕하세요
예스스탁입니다.
input : PriceSmoothing(15),Filter(0);
var : cHigh(0),cLow(0),cOpen(0),cClose(0),pClose(0);
var : tr(0),rrange(0),vqi(0),sumVqi(0),color(0);
cHigh = wma(H,PriceSmoothing);
cLow = wma(L,PriceSmoothing);
cOpen = wma(O,PriceSmoothing);
cClose = wma(C,PriceSmoothing);
pClose = cClose[1];
tr = max(cHigh,cClose) - min(cLow,pClose);
rrange = cHigh-cLow;
if rrange<>0 and tr <> 0 then
vqi = ((cClose-pClose)/tR + (cClose-cOpen)/rrange)*0.5;
else
vqi = vqi;
vqi = abs(vqi)*(cClose-pClose+cClose-cOpen)*0.5;
sumVqi = vqi;
if Filter>0 then
{
if abs(sumVqi-sumVqi[1]) < (Filter*PriceScale) then
sumVqi = sumVqi[1];
}
if sumVqi > 0 then
color = red;
else
color = blue;
plot1(sumVqi,"sumVqi",color);
즐거운 하루되세요
> thegin 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> //---parameters
PriceSmoothing = 15
Filter = 5
cHigh = weightedaverage[PriceSmoothing](high)
cLow = weightedaverage[PriceSmoothing](low)
cOpen = weightedaverage[PriceSmoothing](open)
cClose = weightedaverage[PriceSmoothing](close)
pClose = cClose[1]
trueRange = max(cHigh,cClose) - min(cLow,pClose)
rrange = cHigh-cLow
if rrange<>0 and trueRange<>0 then
vqi = ((cClose-pClose)/trueRange + (cClose-cOpen)/rrange)*0.5
else
vqi = vqi[1]
endif
vqi = abs(vqi)*(cClose-pClose+cClose-cOpen)*0.5
sumVqi = vqi
if Filter>0 then
if abs(sumVqi-sumVqi[1])<(Filter*ticksize) then
sumVqi = sumVqi[1]
endif
endif
if sumVqi > 0 then
color = 1
else
color = -1
endif
return sumVqi coloured by color
변환 문의드립니다. 감사합니다.