wma
This is a 3 time frame weighted moving average. It can help guide trades on a smaller time frame by showing larger timeframe trend.

สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
study("WMAMulti", overlay=true)

tf1 = input(title="time frame 1", defval="15")
tf2 = input(title="time frame 2", defval="30")
tf3 = input(title="time frame 3", defval="60")
length = input(title="length", defval=20)

ma1 = security(tickerid, tf1, wma(hl2, length))
ma2 = security(tickerid, tf2, wma(hl2, length))
ma3 = security(tickerid, tf3, wma(hl2, length))

getcolor (avg, tf) =>
    prev = security(tickerid, tf, wma(hl2, length)[1])
    avg >= prev ? green : red
   
plot(ma3, color=getcolor(ma3, tf3), style=line, linewidth=3)
plot(ma2, color=getcolor(ma2, tf2), style=line, linewidth=3)
plot(ma1, color=getcolor(ma1, tf1), style=line, linewidth=3)