Bond Yield SpreadThe Bond Yield Spread Script is developed for forex traders, offering an automated tool to calculate the bond yield spread between two countries associated with the forex pair displayed on the chart.
Functionality:
The script starts by identifying the base and quote currencies of the current forex pair and aligns them with their corresponding national bond symbols based on user-selected maturity, with options ranging from 01Y to 30Y. It calculates the yield spread by subtracting the bond yield associated with the quote country from that of the base country, following the formula:
Yield Spread = Yield(Base Country) − Yield(Quote Country)
which is then displayed as a plot line on the chart.
This script relies solely on TradingView's internal yield symbols, with the following calculation:
"currency" => "first two letters" + maturity
And maturity, in this case, is the value that is configured in the indicator settings, for example:
"EUR" => "EU" + "02Y" will result in EU02Y -> which will be used in the formula, depending on the quote or base currency.
Application in Trading:
This indicator is invaluable for traders employing carry trading strategies or assessing currency strength based on traded interest rates as an indicator. A higher yield spread typically indicates a stronger currency, because the return obtained for holding the currency is higher.
Originality and Practicality:
This script is self-developed, aiming to fill the gap in automatic bond yield comparisons within the TradingView environment. It is particularly beneficial for traders focusing on macroeconomic factors affecting forex markets. Unlike other scripts, it integrates various bond maturities into one tool, enhancing its utility and application range.
Conclusion:
Designed for traders incorporating macroeconomics in their strategy, this script will be useful to calculate the bond yield differences automatically without having to enter a new formula for every new currency pair.
Compliance and Limitations:
The script complies with TradingView scripting standards, ensuring no lookahead bias and maintaining real-time data integrity. However, its utility depends on the comprehensive availability of bond yield data within TradingView. As not all countries issue bonds for each listed maturity, this may limit the script’s application for certain currency pairs or specific maturities.
Currencystrength
Multi-Asset Performance [Spaghetti] - By LeviathanThis indicator visualizes the cumulative percentage changes or returns of 30 symbols over a given period and offers a unique set of tools and data analytics for deeper insight into the performance of different assets.
Multi Asset Performance indicator (also called “Spaghetti”) makes it easy to monitor the changes in Price, Open Interest, and On Balance Volume across multiple assets simultaneously, distinguish assets that are overperforming or underperforming, observe the relative strength of different assets or currencies, use it as a tool for identifying mean reversion opportunities and even for constructing pairs trading strategies, detect "risk-on" or "risk-off" periods, evaluate statistical relationships between assets through metrics like correlation and beta, construct hedging strategies, trade rotations and much more.
Start by selecting a time period (e.g., 1 DAY) to set the interval for when data is reset. This will provide insight into how price, open interest, and on-balance volume change over your chosen period. In the settings, asset selection is fully customizable, allowing you to create three groups of up to 30 tickers each. These tickers can be displayed in a variety of styles and colors. Additional script settings offer a range of options, including smoothing values with a Simple Moving Average (SMA), highlighting the top or bottom performers, plotting the group mean, applying heatmap/gradient coloring, generating a table with calculations like beta, correlation, and RSI, creating a profile to show asset distribution around the mean, and much more.
One of the most important script tools is the screener table, which can display:
🔸 Percentage Change (Represents the return or the percentage increase or decrease in Price/OI/OBV over the current selected period)
🔸 Beta (Represents the sensitivity or responsiveness of asset's returns to the returns of a benchmark/mean. A beta of 1 means the asset moves in tandem with the market. A beta greater than 1 indicates the asset is more volatile than the market, while a beta less than 1 indicates the asset is less volatile. For example, a beta of 1.5 means the asset typically moves 150% as much as the benchmark. If the benchmark goes up 1%, the asset is expected to go up 1.5%, and vice versa.)
🔸 Correlation (Describes the strength and direction of a linear relationship between the asset and the mean. Correlation coefficients range from -1 to +1. A correlation of +1 means that two variables are perfectly positively correlated; as one goes up, the other will go up in exact proportion. A correlation of -1 means they are perfectly negatively correlated; as one goes up, the other will go down in exact proportion. A correlation of 0 means that there is no linear relationship between the variables. For example, a correlation of 0.5 between Asset A and Asset B would suggest that when Asset A moves, Asset B tends to move in the same direction, but not perfectly in tandem.)
🔸 RSI (Measures the speed and change of price movements and is used to identify overbought or oversold conditions of each asset. The RSI ranges from 0 to 100 and is typically used with a time period of 14. Generally, an RSI above 70 indicates that an asset may be overbought, while RSI below 30 signals that an asset may be oversold.)
⚙️ Settings Overview:
◽️ Period
Periodic inputs (e.g. daily, monthly, etc.) determine when the values are reset to zero and begin accumulating again until the period is over. This visualizes the net change in the data over each period. The input "Visible Range" is auto-adjustable as it starts the accumulation at the leftmost bar on your chart, displaying the net change in your chart's visible range. There's also the "Timestamp" option, which allows you to select a specific point in time from where the values are accumulated. The timestamp anchor can be dragged to a desired bar via Tradingview's interactive option. Timestamp is particularly useful when looking for outperformers/underperformers after a market-wide move. The input positioned next to the period selection determines the timeframe on which the data is based. It's best to leave it at default (Chart Timeframe) unless you want to check the higher timeframe structure of the data.
◽️ Data
The first input in this section determines the data that will be displayed. You can choose between Price, OI, and OBV. The second input lets you select which one out of the three asset groups should be displayed. The symbols in the asset group can be modified in the bottom section of the indicator settings.
◽️ Appearance
You can choose to plot the data in the form of lines, circles, areas, and columns. The colors can be selected by choosing one of the six pre-prepared color palettes.
◽️ Labeling
This input allows you to show/hide the labels and select their appearance and size. You can choose between Label (colored pointed label), Label and Line (colored pointed label with a line that connects it to the plot), or Text Label (colored text).
◽️ Smoothing
If selected, this option will smooth the values using a Simple Moving Average (SMA) with a custom length. This is used to reduce noise and improve the visibility of plotted data.
◽️ Highlight
If selected, this option will highlight the top and bottom N (custom number) plots, while shading the others. This makes the symbols with extreme values stand out from the rest.
◽️ Group Mean
This input allows you to select the data that will be considered as the group mean. You can choose between Group Average (the average value of all assets in the group) or First Ticker (the value of the ticker that is positioned first on the group's list). The mean is then used in calculations such as correlation (as the second variable) and beta (as a benchmark). You can also choose to plot the mean by clicking on the checkbox.
◽️ Profile
If selected, the script will generate a vertical volume profile-like display with 10 zones/nodes, visualizing the distribution of assets below and above the mean. This makes it easy to see how many or what percentage of assets are outperforming or underperforming the mean.
◽️ Gradient
If selected, this option will color the plots with a gradient based on the proximity of the value to the upper extreme, zero, and lower extreme.
◽️ Table
This section includes several settings for the table's appearance and the data displayed in it. The "Reference Length" input determines the number of bars back that are used for calculating correlation and beta, while "RSI Length" determines the length used for calculating the Relative Strength Index. You can choose the data that should be displayed in the table by using the checkboxes.
◽️ Asset Groups
This section allows you to modify the symbols that have been selected to be a part of the 3 asset groups. If you want to change a symbol, you can simply click on the field and type the ticker of another one. You can also show/hide a specific asset by using the checkbox next to the field.
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:
IRS(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 (t) = IRS (t) + IRS (t) + ... + IRS (t)
The cumulative sum of CRS(t) over the user selected period is then obtained.
In Chart Currency TickersQuick View of Multiple Currencies & Gold Price on Chart
In Chart Currency Tickers will help quick view of Multiple Currencies (Up/Down points & Percentage), you can change symbols on settings as per your requirement
മെയിൻ കറൻസികളും സ്വർണവിലയും റിയൽ ടൈം മോണിറ്റർ ചെയ്യുന്നതിനും മാർക്കറ്റ് സെന്റിമെൻറ് അറിയുന്നതിനും അതിനനുസരിച്ച് ട്രേഡിങ്ങ് ഡിസിഷൻ എടുക്കുന്നതിനും നിങ്ങളെ സഹായിക്കുന്നു
Happy Trading to All..!!!
Asif Kerim Naduvilaparambil
Currency Strength by Bollinger BandsOVERVIEW
This indicator is a currency strength by bollinger band.
CONCEPTS
- The currency strength of the passage is determined by each deviation of the Bollinger Bands.
- Wins if price is above MA, ±1σ, ±2σ. Mark is "○".
- Lose if price is below MA, ±1σ, ±2σ. Mark is "●".
- Display up to 9 currency combinations
- Support for bar indexes other than the latest
Currency Strength V2An update to my original Currency Strength script to include a 2nd timeframe for more market context.
Changed the formatting slightly for better aesthetics, as the extra column and colors became unsightly.
Also added a new setting for "Flat Color", which changes the value background to a simple green/red for above or below 50, rather than using the Color Scale that increases color intensity the further it gets from 50.
________________________________________________________________________________
This script measures the strength of the 6 major currencies USD, EUR, GBP, CAD, AUD and JPY.
Simply, it averages the RSI values of a currency vs the 5 other currencies in the basket, and displays each average RSI value in a table with color coding to quickly identify the strongest and weakest currencies over the past 14 bars (or user defined length).
The arrow in the current RSI column shows the difference in average RSI value between current and X bars back (user defined), telling you whether the combined RSI value has gone up or down in the last X bars.
Using the average RSI allows us to get a sense of the currency strength vs an equally weighted basket of the other majors, as opposed to using Indexes which are heavily weighted to 1 or 2 currencies.
The additional security calls for the extra timeframe make this slower to load than the original, but this was a user request so hopefully it will prove worthwhile for some people.
Those who find the loading too slow when switching between charts may be better off still using the original, which is why this is posted as a separate script and not an update to the original.
This is the table with Flat Color option enabled.
Currency Strength Index by zdmreCurrency strength expresses the value of currency. For economists, it is often calculated as purchasing power, while for financial traders, it can be described as an indicator, reflecting many factors related to the currency; for example, fundamental data, overall economic performance (stability) or interest rates.
The method used in this indicator is its strength against the US Dollar (xxxUSD)
Currencies:
EUR
GBP
AUD
NZD
JPY
CNY
CAD
Your Symbol (Optionally) defval: TRYUSD
You can also optionally add a symbol. However, this unit must be in the form of xxxUSD
Trend Trading with Currency Strength MeterThis is a trend trading strategy designed mainly for forex made of two big components:
First we have the currency meter, which is made of taking TSI of different INDEXes such as EUR, USD, GBP, JPY, NZD, AUD , CHF and CAD.
Once we establish which one is the weakest and most powerful, we pair them together and we go on that chart.
Lastly we check with the EMA 200 to confirm our direction.
We can see in this example for the USDJPY chart, that USD is the strongest, JPY is the weakest and ema confirm our bullish trend.
For timeframe in general I recommend big timeframes, 1-4h+ , and as a mentality a swing trading mentality, we can stay in trade for days/weeks.
For exit in general I recommend to exit when either one of the pairs losses/gain power or when the EMA is crossing with current candle
If you have any questions, let me know !
Currency StrengthThis script measures the strength of the 6 major currencies USD, EUR, GBP, CAD, AUD and JPY.
Simply, it averages the RSI values of a currency vs the 5 other currencies in the basket, and displays each average RSI value in a table with color coding to quickly identify the strongest and weakest currencies over the past 14 bars (or user defined length).
The Dir. value looks at the difference in average RSI value between current and X bars back (user defined), telling you whether the combined RSI value has gone up or down in the last X bars.
Using the average RSI allows us to get a sense of the currency strength vs an equally weighted basket of the other majors, as opposed to using Indexes which are heavily weighted to 1 or 2 currencies.
The table doesn't load super fast as we are making 15 Security requests to get the values for each pair (where possible we reverse the values of the pair to reduce Security requests, e.g. we don't need to request EURUSD and USDEUR, we reverse the value to calculate the USD RSI).
CCFp (Complex Common Frames percent) ,Currency StrengthCCFp displays the strength of a currency pair.
It is based on the CCFp of MT4.
It is available for USD, EUR, GBP, CHF, JPY, AUD, CAD, NZD.
Best Currency Strength Indicator By Mahfuz AzimBest Currency Strength Indicator is a visual guide that demonstrates which currencies are currently strong, and which ones are weak.
FX Currency strength indicators include multiple calculation to choose from
1. Relative Strength Index ( RSI )
2. True Strength Index (TSI)
3. Absolute Strength Index (ASI)
4. Linear Regression Slope ( LRS )
5. Rate of Change ( ROC ) and
6. Z-Score
8 Pair StrengthCurrency Strength meter
This is a stripped down version of the "8 Pair Strength - updated by rmireland for CHF/ EUR/GBP" and "8 Pair Strength - updated by rmireland for AUD/CAD / NZD/USD"
which give a Heat-map of all Pairs
First created by Glaz in 2015 and updated a few times by JustUncleL in 2017 , I have stripped out the plot functions and Heat Mapped the currencies
Enjoy and comments welcome
ps : The bottom window is the original 8 Pair Strength code with columns added for better clarity and ray coming off the previous points to show movement from the previous to the current
All_Props - non weighted currency indices for major fx pairsAll_Props - non weighted currency indices for major fx pairs
Quickly gauge major fx currency flows in one indicator
Extra use: 2 instances can be combined in the same indicator window to compare just the base currency vs the inverted quote currency. Note: You will need to set one of the instances to 'Only display base currency' and the other to 'Only display inverted quote currency' if you wish to use it in this manner. One of the instances should also have tradingview scaling set to 'Pin to Scale -> No scale fullscreen'
If you wish to update the indicator with new currency values then make a personal copy and update the 'Index Formulas: Copy and paste formulas here' section
FX Currency Strength IndicatorFX Currency strength indicator is a visual guide that demonstrates which currencies are currently strong, and which ones are weak.
FX Currency strength indicators include multiple calculation to choose from
1. Relative Strength Index (RSI)
2. True Strength Index (TSI)
3. Absolute Strength Index (ASI)
4. Linear Regression Slope (LRS)
5. Rate of Change (ROC)
6. Z-Score
Three display modes
1. Lines
2. Columns
3. Areas
Currency Relative Strength IndexCurrency Relative Strength Index
This scripts show current RSI value and histogram of 7 Currency index on 3 time frame: 4H, 1H, 15M
//=== RSI Function ===\\
rsi_period=input(14)
M15_RSI( sym ) =>
M15_RSI = security( sym , "15", rsi (close,rsi_period))
H1_RSI( sym ) =>
H1_RSI = security( sym , "60", rsi (close,rsi_period))
H4_RSI( sym ) =>
H4_RSI = security( sym , "240", rsi (close,rsi_period))
//=== Currency Index ===\\
1. DXY - USD Index - U.S. Dollar Index
2. EXY - EUR Index - Euro Currency Index
3. JXY - JPY Index - Japanese Yen Index
4. BXY - GBP Index - British Pound Index
5. AXY - AUD index - Australian Dollar Index
6. CXY - CAD Index - Canadian Dollar Index
7. SXY - CHF Index - Swiss Franc Currency Index
Currency Strength ALT v1.0Description:
This study is a version of Currency Strength Meter, that utilises TradingViews built-in 8 Currency indices (?XY), rather calculate them from currency pair values. It also utilises the built-in TSI function, the TSI uses moving averages of the underlying momentum of a financial instrument. The advantage of using the Currency Indices for strength is the fact that they are based on multiple Exchange sources and so hopefully making it more representative.
***WARNING*** The TradingView Currency Indices do tend to have gaps between candles especially on the low volume currencies like NZD and AUD, so strength chart can also jump around. I suggest using the indicator with higher TF (4H+) charts.
BEST Currency Strength Indicator DivergenceHello traders
Hope you had a great Thanksgiving
Now it's my turn to give and all I ask in return is you to be thankful (did I get the "Thanksgiving" thing right?)
The Currency Strength Indicator plots an average of the selected FX pairs in the indicator.
Someone asked me if I could develop an alternative of that script adding a divergence component.
The script evaluates the divergences between the average of the selected RSI(FOREX pairs) and the RSI(FOREX pair) displayed on the chart.
This version includes new features such as:
- the RSI length can now be selected
- we can select the 6 pairs used for the divergence calculations
All the BEST my aspiring traders and quants
See you tomorrow for another script
Dave
8 Pair Strength - updated by rmireland for CHF/EUR/GBPCurrency Strength meter
First created by Glaz in 2015 and updated a few times by JustUncleL in 2017 , I have stripped out the plot functions and color coded results against pairs.
I feel this makes the results easier to interpret. The darker the color the stronger the asset.
As Pine Script only allows a maximum of outputs, I have split this into 2 Scripts to cover all 28 pairs.
8 Pair Strength - AUD/CAD/NZD/USD for AUD/CAD - AUD/CHF - AUD/JPY - AUD/NZD
AUD/USD - CAD/CHF - CAD/JPY - NZD/CAD
NZD/CHF - NZD/JPY - NZD/USD - USD/CAD
USD/CHF - USD/JPY
8 Pair Strength - CHF/EUR/GBP for CHF/JPY - EUR/AUD - EUR/JPY - EUR/CAD
EUR/CHF - EUR/NZD - EUR/GBP - EUR/USD
GBP/AUD - GBP/CAD - GBP/CHF - GBP/JPY
GBP/NZD - GBP/USD
Enjoy
8 Pair Strength - updated by rmireland for AUD/CAD/NZD/USDCurrency Strength meter
First created by Glaz in 2015 and updated a few times by JustUncleL in 2017 , I have stripped out the plot functions and color coded results against pairs.
I feel this makes the results easier to interpret. The darker the color the stronger the asset.
As Pine Script only allows a maximum of outputs, I have split this into 2 Scripts to cover all 28 pairs.
8 Pair Strength - AUD/CAD/NZD/USD for AUD/CAD - AUD/CHF - AUD/JPY - AUD/NZD
AUD/USD - CAD/CHF - CAD/JPY - NZD/CAD
NZD/CHF - NZD/JPY - NZD/USD - USD/CAD
USD/CHF - USD/JPY
8 Pair Strength - CHF/EUR/GBP for CHF/JPY - EUR/AUD - EUR/JPY - EUR/CAD
EUR/CHF - EUR/NZD - EUR/GBP - EUR/USD
GBP/AUD - GBP/CAD - GBP/CHF - GBP/JPY
GBP/NZD - GBP/USD
Enjoy
NZD RSCNZD Relative Strength Comparison to the basket of other major currencies.
nzd = (nzdusd + nzdjpy/100 + nzdcad + 1/gbpnzd + 1/eurnzd + nzdchf + 1/audnzd)/7
EUR RSCEUR Relative Strength Comparison to the basket of other major currencies.
eur = (eurusd + eurgbp + eurjpy/100 + eurcad + eurchf + euraud + eurnzd)/7
AUD RSCAUD Relative Strength Comparison to the basket of other major currencies.
aud = (audusd + audjpy/100 + audcad + audchf + 1/euraud + 1/gbpaud + audnzd)/7
CHF RSCCHF Relative Strength Comparison to the basket of other major currencies.
chf = (1/usdchf + chfjpy/100 + 1/cadchf + 1/gbpchf + 1/eurchf + 1/audchf + 1/nzdchf)/7