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. اقرأ المزيد في شروط الاستخدام.