LastBattle

Single Timeframe Moving Average

Provides Moving average of 200 and 50 at the specific timeframe regardless of what interval you're looking at.
Saving the need to change it manually each time you switch the interval.

In this chart, I am looking at 4H interval with EMA of 50/200 of daily timeframe.

오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?
study(title="Single Timeframe Moving Average", shorttitle="Single TF MA", overlay=true)

len_sma_long = input(200, minval=1, title="Long Simple Moving Average")
len_sma_short = input(50, minval=1, title="Short Simple Moving Average")
resCustom = input(title="Time interval (W, D, [min])", type=string, defval="D")

sma_long = security(tickerid, resCustom, sma(close, len_sma_long))
sma_short = security(tickerid, resCustom, sma(close, len_sma_short))
src = security(tickerid, resCustom, close)

s2 = cross(sma_long, sma_short) ? src : na
plot(sma_long, color=green)
plot(sma_short, color=red)

plotshape(cross(sma_long, sma_short) ? sma_long  : na, style=shape.xcross, text="ALERT")