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 อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน