예스스탁
예스스탁 답변
2020-04-29 14:05:56
안녕하세요
예스스탁입니다.
input : len(40),len2(40);
var : o1(0),c1(0),h1(0),l1(0);
var : haclose(0),haopen(0),hahigh(0),halow(0);
var : o2(0),c2(0),h2(0),l2(0);
var : col(0);
o1=ema(open,len);
c1=ema(close,len);
h1=ema(high,len);
l1=ema(low,len);
if CurrentBar >= 1 then
{
haclose = (o1+h1+l1+c1)/4;
haopen = (haopen[1] + haclose[1]) / 2;
hahigh = max (h1, max(haopen,haclose));
halow = min (l1, min(haopen,haclose));
o2=ema(haopen, len2);
c2=ema(haclose, len2);
h2=ema(hahigh, len2);
l2=ema(halow, len2);
col = iff(o2>c2,red,GREEN);
PlotPaintBar(h2, l2, o2, c2,"hs",col);
}
즐거운 하루되세요
> thegin 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> len=input(40)
o=ema(open,len)
c=ema(close,len)
h=ema(high,len)
l=ema(low,len)
haclose = (o+h+l+c)/4
haopen = na(haopen[1]) ? (o + c)/2 : (haopen[1] + haclose[1]) / 2
hahigh = max (h, max(haopen,haclose))
halow = min (l, min(haopen,haclose))
len2=input(40)
o2=ema(haopen, len2)
c2=ema(haclose, len2)
h2=ema(hahigh, len2)
l2=ema(halow, len2)
col=o2>c2 ? red : lime
plotcandle(o2, h2, l2, c2, title="hs", color=col)
수식 변환 문의드립니다.
감사합니다.