OPEN-SOURCE SCRIPT

Currency Strength [LuxAlgo]

The Currency Strength indicator displays the historical relative strength of 5 user selected currencies over a user selected period of time. Users can also display relative strength of currencies as a scatter plot, further informing on the evolution of currency strength.

🔶 SETTINGS

  • Display: Determines the type of data displayed by the indicator. By default, the trailing relative strength of currencies is displayed, with the other option displaying the scatter plot.
  • Timeframe: Timeframe period used to calculate currency relative strength.


🔹 Meter

  • Show Strength Meter: Displays the currency strength meter on the indicator panel.
  • Strength Meter Resolution: Resolution of the currency strength meter, higher resolutions allow to observe smaller difference in strength.
  • Location: Location of the currency strength meter on the indicator pane.
  • Size: Size of the currency strength meter.


🔹 Relative Strength Scatter Graph

  • Scatter Graph Resolution: Horizontal and vertical width of the scatter plot (in bars). Higher values allow a more precise position on the X axis.


🔶 USAGE

快照

Measuring the relative strength of a currency allows users to assess the relative performance of a currency against a basket of other currencies.

The term "strength" can convey various interpretations depending on the indicator. Here "strength" is interpreted as an indicator of performance, with stronger currencies having greater performances over the selected period (positive changes of higher magnitude).

The Currency Strength indicator allows users to analyze the relative strength of currencies over a user selected period - the returned results will reset periodically and will accumulate afterward.

快照

The above chart shows the hourly relative strength of various currencies on the 1min TF.

🔹 Scatter Graph

快照

The scatter graph displays the relative strength of a currency over its value during the previous period. This not only allows users to see if a currency is strong... but also if it's getting stronger compared to the previous period.

In order to quickly interpret results, the graph is divided into four areas. A currency (displayed as a point) being in a specific area returns the following information:

  • Strong(Green): Currency has a positive relative strength (bullish) and is greater than its value over the previous period.
  • Improving (Yellow): Currency has a negative relative strength (bearish) and is greater than its value over the previous period.
  • Weakening (Aqua): Currency has a positive relative strength (bullish) and is lower than its value over the previous period.
  • Weak (Red): Currency has a negative relative strength (bearish) and is lower than its value over the previous period.


🔶 DETAILS

There is a wide variety of methods for the calculation of a currency's relative strength. The primary focus of the indicator is on the meter as well as the relative strength scatter graph. The currency strength calculation can be considered more basic.

Given two currencies, B (base) and Q (quote), the proposed indicator calculation process is as follows:

Exchange rate BQ(t) over time t is obtained, a rising value of BQ(t) means that a unit of B is now worth a higher amount of Q, highlighting strength of B over Q on that precise variation.

The individual relative strength over time IRS(t) is obtained as the percentage relatively close to the open difference of BQ(t), that is:



Normalizing the close to open difference allows for the various currencies' relative strengths to approximately share the same scale.

The above operation is performed n times over a space of n currencies O(n). The obtained individual relative strengths for one specific currency are then added together, forming the final composite relative strength (CRS) of that currency:



The cumulative sum of CRS(t) over the user selected period is then obtained.
currencycurrencystrengthLUXluxalgorelativestrengthRelative Strength Comparison

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?


Get access to our exclusive tools: luxalgo.com

Join our 150k+ community: discord.gg/lux

All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
更多:

免責聲明