OPEN-SOURCE SCRIPT
Forex Strong Weak Analysis (FX SW)

Overview
This indicator measures and ranks the relative strength of the 8 major forex currencies (EUR, USD, GBP, AUD, CAD, CHF, NZD, and JPY) by analysing price deviations from a moving average on each of the 28 currency pairings.
How It Works
The indicator measures momentum by calculating each pair’s percentage deviation from an exponential moving average (EMA). This value is then given to both the base and quote currencies as shown:
Base currency gains strength (+) when price is above its EMA.
Quote currency loses strength (-) when price is above its EMA.
Base currency loses strength (-) when price is below its EMA.
Quote currency gains strength (+) when price is below its EMA.
Each currency’s final strength value is derived by averaging its performance across all its pairs, ensuring a balanced and normalised result.
Key Features
- Choose the broker for the 28 currency pairs.
- Change the EMA length (default: 200).
- Change the EMA timeframe (default: 4H).
- Strength lines and table:
- Strength lines are real-time for each currency.
- Ranking table displays strongest to weakest currencies, based on the last candle that closed. - Changeable colours.
- Open Source.
How to Use
Great if you use an Exponential Moving Average as part of a trend trading system.
Identify the strongest and weakest currencies with the indicator.
And look to trade pairs that combine them.
Typical workflow example:
- Check the ranking table.
- Identify strongest currency (e.g., AUD)
- Identify weakest currency (e.g., JPY)
- Trade: AUDJPY
I recommend also enabling indicator name and value labels on the price scale, if you like that.
Important Notes
This indicator measures relative strength, not absolute direction.
Best used in trending or expanding market conditions.
Read the information buttons in the indicator settings.
Disclaimer
This tool is intended for analysis and educational purposes only. It does not provide financial advice and should be used in conjunction with other forms of analysis and risk management.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。