TradingView
LuxAlgo
Feb 7, 2023 3:24 PM

Currency Strength [LuxAlgo] 

U.S. Dollar/Japanese YenFXCM

描述

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:

IRS(t) = [close(t) - open(t)] / open(t) * 100


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:

CRS[Currency A](t) = IRS[Currency A, Currency B](t) + IRS[Currency A, Currency C](t) + ... + IRS[Currency A, Currency N](t)


The cumulative sum of CRS(t) over the user selected period is then obtained.
评论
RDreesmann
WOW
gianfranco60
Really good work . But can you add xau, xag. oil etc too?
alexgrover
@gianfranco60, you can change the currencies in the indicator settings
gianfranco60
@alexgrover, Thanks it is useful for spread treading
dannydholmes1
@gianfranco60, this would be great
Daveatt
Wonderful script and way of displaying data!!!
CaptainAwesome3
can we please have all G8 currencys in relations to each other?
dioalexm
cam028
its missing NZD
emadghane8981
Best
更多