study("Multi Time Frame Exponential Moving Average", "MTF EMA", overlay=true)
ma_len = input(title="Length", type=integer, defval=100)
src = input(title="Source", type=source, defval=close)
ma_offset = input(title="Offset", type=integer, defval=0)
res = input(title="Resolution", type=resolution, defval="240")
htf_ma = ema(src, ma_len)
out = security(tickerid, res, htf_ma)
plot(out, color=red, offset=ma_offset)
트레이딩뷰 지표입니다.
예스 수식으로 만들어주세요.
답변 1
예스스탁
예스스탁 답변
2023-10-23 16:02:39
안녕하세요
예스스탁입니다.
올려주신 내용은 다른주기의 지수이평을 그리는 내용입니다.
예스랭귀지에서는 아래식 이용하시면 됩니다.
Input : ntime(240),ma_len(100);
var : S1(0),D1(0),TM(0),TF1(0);
Var : Ep1(0), JISU1(0), PreJISU1(0);
Ep1 = 2/(ma_len+1);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF1 = TM%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF1 < TF1[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
value1 = value1+1;
PreJISU1 = JISU1[1];
}
if value1 <= 1 then
{
JISU1 = C;
}
else{
JISU1 = C * EP1 + PreJISU1 * (1-EP1);
}
plot1(JiSu1);
}
즐거운 하루되세요
> 신대륙발견 님이 쓴 글입니다.
> 제목 : 문의 드립니다.
> study("Multi Time Frame Exponential Moving Average", "MTF EMA", overlay=true)
ma_len = input(title="Length", type=integer, defval=100)
src = input(title="Source", type=source, defval=close)
ma_offset = input(title="Offset", type=integer, defval=0)
res = input(title="Resolution", type=resolution, defval="240")
htf_ma = ema(src, ma_len)
out = security(tickerid, res, htf_ma)
plot(out, color=red, offset=ma_offset)
트레이딩뷰 지표입니다.
예스 수식으로 만들어주세요.