예스스탁
예스스탁 답변
2020-02-21 13:59:04
안녕하세요
예스스탁입니다.
1
input : length(5),factor(0.7),highlightMovements(true);
var : src(0),t1(0),t2(0),t3(0),t3Color(0);
src = close;
t1 = ema(src, length) * (1 + factor) - ema(ema(src, length), length) * factor;
t2 = ema(t1, length) * (1 + factor) - ema(ema(t1, length), length) * factor;
t3 = ema(t2, length) * (1 + factor) - ema(ema(t2, length), length) * factor;
t3Color = iff(highlightMovements,iff(t3 > t3[1],green,red),BLACK);
plot1(t3,"T3",t3Color);
2
input : length(15),bt(100),st( -100),markCrossovers(false);
var: bpv(0),spv(0),ttf(0),long_f(false),short_f(false),bs(0),us(0);
#prev(s,i) =>
# y=abs(round(i))
# s[y]
bpv = highest( high, length ) - lowest( low, length )[length];
spv = highest( high, length )[length] - lowest( low, length );
ttf = 100 * (bpv - spv) / ( 0.5*( bpv + spv) );
PlotBaseLine1(0,"0",gray);
PlotBaseLine2(bt,"bt",gray);
PlotBaseLine3(st,"st",gray);
long_f = crossup( ttf, st ) and ttf > ttf[1];
short_f = CrossDown(ttf, bt ) and ttf < ttf[1];
bs = iff(ttf > bt, bt , ttf);
us = iff(ttf < st, st , ttf);
plot1(bs,"bs",white);
plot2(us,"us",white);
plot3(ttf,"TTF",iff(markCrossovers,iff(long_f ,green,iff(short_f,red, blue)),BLACK));
즐거운 하루되세요
> 물고기 님이 쓴 글입니다.
> 제목 : 안녕하세요
> study(title="T", shorttitle="T", overlay=true)
length = input(title="Length", type=integer, defval=5)
factor = input(title="Factor", type=float, minval=0, maxval=1, defval=0.7)
highlightMovements = input(title="Highlight Movements ?", type=bool, defval=true)
src = input(title="Source", type=source, defval=close)
gd(src, length) =>
ema(src, length) * (1 + factor) - ema(ema(src, length), length) * factor
t3 = gd(gd(gd(src, length), length), length)
t3Color = highlightMovements ? (t3 > t3[1] ? green : red) : #6d1e7f
plot(t3, title="T3", linewidth=2, color=t3Color, transp=0)
예스트레이더 수식으로 변경 문의드립니다.
-------------------------------------------------------------------------
study("TFactor", shorttitle="B")
length=input(15)
bt = input( 100, title="Buy Trigger")
st = input( -100, title="Sell Trigger")
markCrossovers=input(false, type=bool)
prev(s,i) =>
y=abs(round(i))
s[y]
calc_ttf( periods ) =>
bp = highest( high, periods ) - prev( lowest( low, periods ), - periods )
sp = prev( highest( high, periods ), - periods ) - lowest( low, periods )
100 * (bp - sp) / ( 0.5*( bp + sp) )
ttf = calc_ttf( length )
plot(0, color=gray)
btl=plot(bt, color=gray, style=3)
stl=plot(st, color=gray, style=3)
long_f = cross( ttf, st ) and rising(ttf, 1)
short_f = cross(ttf, bt ) and falling(ttf, 1)
bs = (ttf > bt) ? bt : ttf
us = (ttf < st) ? st : ttf
bl=plot(bs, color=white)
ul=plot(us, color=white)
tl=plot(ttf, title="TTF", color=markCrossovers ? (long_f ? green : short_f ? red : blue) : maroon, linewidth=2)
fill(bl, tl, color=green, transp=75)
fill(ul, tl, color=red, transp=75)
예스랭귀지로 변환 문의드립니다. 감사합니다.