OPEN-SOURCE SCRIPT
已更新

Market-Aware Moving Averages

130
Market-Aware Moving Averages automatically switches its moving-average lengths based on the market the chart symbol belongs to, so you don't have to reconfigure it each time you move between Taiwan, the US, Japan, Korea, Europe, India, crypto, forex, and more.
Why this exists. Different markets follow different moving-average conventions. The US, Europe and India favor the round 50/200 set; Taiwan and Korea use the trading-day set (60 for a quarter, 240 for a year); Japan has its own 25/75 tradition. Changing lengths by hand on every switch is tedious and easy to forget. This script reads the symbol's country and type and applies the right set on its own.
What it plots. Five main lines covering week / month / quarter / half-year / year, plus optional secondary lines that are common but less central. Main and secondary use two distinct colors, and line width grows with period, so the longest (yearly) line is the thickest and least noisy.
Length sets by market:

  • US / Europe / India, and all non-stock instruments (default): 5 / 20 / 50 / 100 / 200; secondary 10 / 13 / 15 / 30
  • Taiwan / Korea: 5 / 20 / 60 / 120 / 240; secondary 10 (Korea also 90 / 180)
  • Japan: 5 / 25 / 75 / 100 / 200; secondary 10 / 15


How detection works. It uses Pine's syminfo.country and syminfo.type. Any stock without a mapped country, and every non-stock instrument (index, forex, crypto, futures, commodity), falls back to the default 5/20/50/200 set.
Settings. Override the auto-detection to force a specific system or fully custom lengths; switch between SMA and EMA; toggle each line; and change both colors. Secondary lines are hidden by default.
Note. Moving averages are lagging indicators and can give false signals in ranging markets. The length conventions used here are common market practices, not guarantees. This is a visualization tool, not financial advice.
發行說明
Market-Aware Moving AveragesA moving-average set that automatically switches its length convention to match the instrument's home market, so the lines reflect the periods traders in that market actually watch.It plots five main lines for the standard timeframes — week, month, quarter, half-year, and year — and picks the right lengths by market:US / EU / IN and all non-stock symbols (default): 5 / 20 / 50 / 100 / 200

Taiwan / Korea: 5 / 20 / 60 / 120 / 240

Japan: 5 / 25 / 75 / 100 / 200The market is detected automatically from the symbol's country and type, or you can force a system (Anglo, Asia, Japan, or fully Custom lengths) from the inputs.Design choices that make it readable: all main lines share one color, fixed by role; line width grows with period, so the fast week line is thinnest and the slow yearly line is thickest and calmest — you can read the timeframe at a glance from the thickness. An optional secondary set (off by default) adds market-specific extra lengths in a separate color: 10/13/15/30 for Anglo markets, 10 for Taiwan, 10/90/180 for Korea, 10/15 for Japan. SMA or EMA is selectable.Turning off the half-year line gives the classic 5/20/50/200 view.Use as a trend and support/resistance reference; the right MA convention varies by market, which is exactly what this automates.
發行說明
Market-Aware Moving Averages
A moving-average set that automatically switches its length convention to match the instrument's home market, so the lines reflect the periods traders in that market actually watch.
It plots five main lines for the standard timeframes — week, month, quarter, half-year, and year — and picks the right lengths by market:

  • US / EU / IN and all non-stock symbols (default): 5 / 20 / 50 / 100 / 200
  • Taiwan / Korea: 5 / 20 / 60 / 120 / 240
  • Japan: 5 / 25 / 75 / 100 / 200


The market is detected automatically from the symbol's country and type, or you can force a system (Anglo, Asia, Japan, or fully Custom lengths) from the inputs.
Design choices that make it readable: all main lines share one color, fixed by role; line width grows with period, so the fast week line is thinnest and the slow yearly line is thickest and calmest — you can read the timeframe at a glance from the thickness. An optional secondary set (off by default) adds market-specific extra lengths in a separate color: 10/13/15/30 for Anglo markets, 10 for Taiwan, 10/90/180 for Korea, 10/15 for Japan. SMA or EMA is selectable.
Turning off the half-year line gives the classic 5/20/50/200 view.
Use as a trend and support/resistance reference; the right MA convention varies by market, which is exactly what this automates.
發行說明
Market-Aware Moving Averages automatically switches its moving-average lengths based on the market the chart symbol belongs to, so you don't have to reconfigure it each time you move between Taiwan, the US, Japan, Korea, Europe, India, crypto, forex, and more.
Why this exists. Different markets follow different moving-average conventions. The US, Europe and India favor the round 50/200 set; Taiwan and Korea use the trading-day set (60 for a quarter, 240 for a year); Japan has its own 25/75 tradition. Changing lengths by hand on every switch is tedious and easy to forget. This script reads the symbol's country and type and applies the right set on its own.
What it plots. Five main lines covering week / month / quarter / half-year / year, plus optional secondary lines that are common but less central. Main and secondary use two distinct colors, and line width grows with period, so the longest (yearly) line is the thickest and least noisy.
Length sets by market:

US / Europe / India, and all non-stock instruments (default): 5 / 20 / 50 / 100 / 200; secondary 10 / 13 / 15 / 30
Taiwan / Korea: 5 / 20 / 60 / 120 / 240; secondary 10 (Korea also 90 / 180)
Japan: 5 / 25 / 75 / 100 / 200; secondary 10 / 15


How detection works. It uses Pine's syminfo.country and syminfo.type. Any stock without a mapped country, and every non-stock instrument (index, forex, crypto, futures, commodity), falls back to the default 5/20/50/200 set.
Settings. Override the auto-detection to force a specific system or fully custom lengths; switch between SMA and EMA; toggle each line; and change both colors. Secondary lines are hidden by default.
Note. Moving averages are lagging indicators and can give false signals in ranging markets. The length conventions used here are common market practices, not guarantees. This is a visualization tool, not financial advice.
6 hours ago
Release Notes
Market-Aware Moving AveragesA moving-average set that automatically switches its length convention to match the instrument's home market, so the lines reflect the periods traders in that market actually watch.It plots five main lines for the standard timeframes — week, month, quarter, half-year, and year — and picks the right lengths by market:US / EU / IN and all non-stock symbols (default): 5 / 20 / 50 / 100 / 200

Taiwan / Korea: 5 / 20 / 60 / 120 / 240

Japan: 5 / 25 / 75 / 100 / 200The market is detected automatically from the symbol's country and type, or you can force a system (Anglo, Asia, Japan, or fully Custom lengths) from the inputs.Design choices that make it readable: all main lines share one color, fixed by role; line width grows with period, so the fast week line is thinnest and the slow yearly line is thickest and calmest — you can read the timeframe at a glance from the thickness. An optional secondary set (off by default) adds market-specific extra lengths in a separate color: 10/13/15/30 for Anglo markets, 10 for Taiwan, 10/90/180 for Korea, 10/15 for Japan. SMA or EMA is selectable.Turning off the half-year line gives the classic 5/20/50/200 view.Use as a trend and support/resistance reference; the right MA convention varies by market, which is exactly what this automates.
6 hours ago
Release Notes
Market-Aware Moving Averages
A moving-average set that automatically switches its length convention to match the instrument's home market, so the lines reflect the periods traders in that market actually watch.
It plots five main lines for the standard timeframes — week, month, quarter, half-year, and year — and picks the right lengths by market:

US / EU / IN and all non-stock symbols (default): 5 / 20 / 50 / 100 / 200
Taiwan / Korea: 5 / 20 / 60 / 120 / 240
Japan: 5 / 25 / 75 / 100 / 200


The market is detected automatically from the symbol's country and type, or you can force a system (Anglo, Asia, Japan, or fully Custom lengths) from the inputs.
Design choices that make it readable: all main lines share one color, fixed by role; line width grows with period, so the fast week line is thinnest and the slow yearly line is thickest and calmest — you can read the timeframe at a glance from the thickness. An optional secondary set (off by default) adds market-specific extra lengths in a separate color: 10/13/15/30 for Anglo markets, 10 for Taiwan, 10/90/180 for Korea, 10/15 for Japan. SMA or EMA is selectable.
Turning off the half-year line gives the classic 5/20/50/200 view.
Use as a trend and support/resistance reference; the right MA convention varies by market, which is exactly what this automates.
發行說明
Market-Aware Moving Averages automatically switches its moving-average lengths based on the market the chart symbol belongs to, so you don't have to reconfigure it each time you move between Taiwan, the US, Japan, Korea, Europe, India, crypto, forex, and more.
Why this exists. Different markets follow different moving-average conventions. The US, Europe and India favor the round 50/200 set; Taiwan and Korea use the trading-day set (60 for a quarter, 240 for a year); Japan has its own 25/75 tradition. Changing lengths by hand on every switch is tedious and easy to forget. This script reads the symbol's country and type and applies the right set on its own.
What it plots. Five main lines covering week / month / quarter / half-year / year, plus optional secondary lines that are common but less central. Main and secondary use two distinct colors, and line width grows with period, so the longest (yearly) line is the thickest and least noisy.
Length sets by market:

US / Europe / India, and all non-stock instruments (default): 5 / 20 / 50 / 100 / 200; secondary 10 / 13 / 15 / 30
Taiwan / Korea: 5 / 20 / 60 / 120 / 240; secondary 10 (Korea also 90 / 180)
Japan: 5 / 25 / 75 / 100 / 200; secondary 10 / 15


How detection works. It uses Pine's syminfo.country and syminfo.type. Any stock without a mapped country, and every non-stock instrument (index, forex, crypto, futures, commodity), falls back to the default 5/20/50/200 set.
Settings. Override the auto-detection to force a specific system or fully custom lengths; switch between SMA and EMA; toggle each line; and change both colors. Secondary lines are hidden by default.
Note. Moving averages are lagging indicators and can give false signals in ranging markets. The length conventions used here are common market practices, not guarantees. This is a visualization tool, not financial advice.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。