OPEN-SOURCE SCRIPT
Dual HTF EMA

Multi-timeframe Exponential Moving Average (EMA) indicator plots two separate higher timeframe (HTF) EMAs of your choice. Displays four EMAs per HTF while providing optional background coloring (bullish/bearish). The background coloring occurs when two EMA's cross per HTF. User can select two of the four EMAs to determine the trend direction as they cross creating the background color.
User can configure timeframe, EMA lengths, EMA cross and background, source, and visibility; separately for each timeframe.
Default lengths are 9, 21, 50, 200 with source as closed and EMA cross background from EMA 1 and EMA 3. Also clear visual distinction using thick solid lines for HTF 1 and thin dashed lines for HTF 2.
Uses request.security() with gaps=barmerge.gaps_on to avoid staircase effects on lower timeframes.
This script is ideal for multi-timeframe analysis, helping traders align shorter-term price movements with broader trends from higher timeframes without cluttering the chart.
User can configure timeframe, EMA lengths, EMA cross and background, source, and visibility; separately for each timeframe.
Default lengths are 9, 21, 50, 200 with source as closed and EMA cross background from EMA 1 and EMA 3. Also clear visual distinction using thick solid lines for HTF 1 and thin dashed lines for HTF 2.
Uses request.security() with gaps=barmerge.gaps_on to avoid staircase effects on lower timeframes.
This script is ideal for multi-timeframe analysis, helping traders align shorter-term price movements with broader trends from higher timeframes without cluttering the chart.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน