interest rate gap for forexThis indicator is useful for forex traders.
This script displays interest rate differentials and customizable durations for about 180 currencies.
In general, when interest rate differentials widen, traders tend to buy currencies with higher interest rates.
Fundamental Analysis
Economic Data Trading alerts - CPI, Interest rate, PPI, etcDescription:
This indicator is designed to alert based on user-selected economic data for Europe, the US, and Japan. It allows users to define their preferred economic data points and trade direction based on the change in the economic data compared to the previous value.
you can use the strategy to automate economic data trading.
Key Features:
Choose from various economic data points for Europe, the US, and Japan.
Customize trade direction based on whether the economic data is above or below the previous value.
Define entry conditions based on user preferences.
Visualize trade entries on the chart.
Display a table showing the results of executed trades.
Please note that this strategy is provided for educational purposes only and should not be considered as financial advice. Always do your own research and use proper risk management when trading.
The indicator is BETA please make sure to test it before using it.
IMPORTANT: you need to be aware of the fundmentals because the regime changes and markets react to every release of data differently.
Federal Funds Rate Projections [tedtalksmacro]Track the Federal Funds Rate projections for each month via the Fed Funds Rate Futures Contracts CBOT:ZQ1!
This will be updated monthly to ensure that the current and relevant contracts are implemented.
Traders can use this to speculate on whether the Federal Reserve is likely to raise, cut or do nothing to their key interest rate at the next meeting.
Modified Mannarino Market Risk Indicator MMMRI MMRIModified Mannarino Market Risk Indicator MMMRI was developed by "Nobody Special Finance" as an enhancement to the original MMRI developed by Gregory Mannarino. The original and modified version were created as a way to gauge current level of risk in the market. This published indicator includes both versions along with ability to customize the symbols, denominators, and ratio factors that are used within their formulas. Additional options have been included to colorize the candles, plot, and level fills, as well as the option to show or hide a table containing the realtime values for both versions, along with the current dollar strength and 10Y yield.
Levels of market risk are denoted by dashed lines which represent the following levels: 0-50 slight risk, 50-100 low risk, 100-200 moderate risk, 200-300 high risk, 300+ extreme risk. The plot displays whichever of the following two formulas has been selected in the indicator settings, the default choice has been set to MMMRI:
MMRI = (USD Strength * USD Interest Rate) / 1.61
MMMRI = (Debt / GDP) * (USD Strength * USD Interest Rate) / 1.61
NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
Reverse Relative Strength Indicator [CC]The Reverse Relative Strength Index was created by Giorgos Siligardos (Stocks & Commodities V. 21:6 (18-30)). It is a handy indicator that reverse engineers the RSI price calculation to show what the price would have to be for the RSI value to match our chosen input. You can select your chosen RSI level using the RSI Level input for this indicator. For example if you wanted to see what the price would be for the RSI value to match the oversold level then you would set the RSI Level for 30 and it will plot that price on the chart. This uses some simple math to extrapolate the price with some basic algebra from the typical RSI calculation. This, of course, is a very similar concept to my previous Reverse Moving Average Convergence Divergence script. This indicator formula can be used for any oscillator with some slight tweaking and could also be customized to show the price for overbought and oversold levels, which I will probably do in the near future. This indicator is useful in many ways such as a trend indicator as my example shows or for a price projection tool. For example, if you had a current RSI level of 66 and it was going up and you want to see what the price would be if it reached the overbought level then you could do that. Let me know what works well for you and if you have any suggestions for how to further improve upon this script. I have included darker colors to show stronger signals and lighter colors to show normal signals. Buy when the line turns green and sell when it turns red.
I have a bunch of backlogged scripts that I'm trying to publish, so I figured I would focus on my RSI scripts since I have a bunch, so be prepared to see a bunch of those over the next week or so. Let me know if there are any other scripts you would like to see me publish!
US Treasuries Yield CurveNews about the yield curve became pretty crucial for all the trades in the last year.
So in the team, we decided to implement a nice widget that will allow you to track the current yield curve in your chart directly.
It's possible to compare the current yield curve with past yield curves. You can choose to display the number of curves weeks, months, and years ago. So you can see the dynamics of the yield curve change.
When the Y2 > Y10 curve is considered invested, so you'll see an "Inverted" notification on the chart.
Thanks to @MUQWISHI for helping code it.
Disclaimer
Please remember that past performance may not indicate future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
Blocky's EMA RibbonA classic EMA ribbon setup.
The script uses eight EMAs, with default lengths ranging from 21 to 55 periods, with an additional EMA with a default length of 200 periods.
The lengths of the EMAs can be customized, when customizing, the shortest time frame should be first and the longest time frame last.
The ribbons gradient strength is calculated based on the EMA's sequence, and their separation.
The color and transparency are set based on the calculated strength. The bolder the color, the stronger the strength.
Use the opacity multiplier to increase/decrease the strength of the gradient. BITSTAMP:BTCUSD
Net USD Liquidity w/ overlays [tedtalksmacro]This script aggregates and analyses total USD market liquidity in trillions of dollars - albeit with lagged, weekly data (live data is not available in TradingView!)
There's a positive correlation with the total liquidity available in the world's largest economy and risk assets like BITSTAMP:BTCUSD
The formula for net liquidity is as follows and uses account balances at the Fed and of the Treasury's General Account:
Fed Balance Sheet ECONOMICS:USCBBS — Accepted Reverse Repo Bids FRED:RRPONTTLD — Treasury General Account Balance FRED:WTREGEN
This script shows positive prints when liquidity is above it's 7 day EMA and negative when below... don't use this on timeframes lower than the 1D chart!
CBDE OscillatorWhat makes The Universe grow at an accelerating pace?
Dark Energy.
What makes The Economy grow at an accelerating pace?
Debt.
Debt is the Dark Energy of The Economy.
The Central Bank Dark Energy Oscillator (CBDEO) is a companion to the popular CBDET (Central Bank Dark Energy Tracer) script.
CBDEO is an oscillator that shows up in a separate TradingView pane in order to provide a relative change signal. It uses the same equations to aggregate central bank liquidity that are used in CBDET, and adds unique analysis tools that provide rate of change data.
There are 2 signals in the chart. First is the change/delta on a per bar basis, based on the chart time frame. The default style for this plot is "columns". This style parameter can be changed in the settings, along with each plot's visibility.
The second plot is a divergence signal that tests the change vs a simple moving average of the CBDET signal (central bank liquidity). The SMA length is customizable in the Input tab within the settings for the indicator. The SMA is based on the chart's current time frame.
The changes in liquidity on various time frames, and calculated as divergence against the liquidity signal SMA can be useful in determining the rate of change in liquidity, and therefore potential thrust in market price action.
Fundamentals Graphing [Kioseff Trading]Hello!
This script "Fundamental Comparison" allows you to compare almost any fundamental metric across 40 assets; various charting methods are employable!
Thank you to @TradingView / @PineCoders for providing the framework in the "Financials on Chart" indicator - thereby expediting a generous portion of work (:
Features
Most metrics included in the "Financials on Chart" indicator are graphable
Scatter chat
Histogram
Bar chart
Pie chart
Reversible scaling
Adjusts to the size of your chart
10 industry presets
Custom symbol dataset
Retrieve, graph, and compare fundamental data by quarter/year. The indicator can "look back" to grab fundamental data from previous quarters/years.
Sortable data - ascending/descending
Built-in search function
Self-Adjusting Graph
The graph adjusts to the orientation/size of your chart!
The image above shows the graph on a price chart with a 229 bar difference.
The image above shows the same price chart; however, there's now a 1941 bar difference to which the fundamentals graph automatically adjusts!
The images above show the same expansion/reduction for the pie chart; all graph types shrink and expand with the price chart.
Fundamental Metrics
The image above shows most of the settings for the indicator!
Most of the metrics from the "Financials on Chart" indicator are included!
Quarterly or annual data are retrievable, in addition to industry presets.
Additionally, you can retrieve the financial data any number of intervals back (so long as the data exists and is provided by TradingView)
The image above shows an example of retrieving a fundamental metric from a previous FQ. The same can be done with FY!
Sortable Data
All data retrieved by the indicator is sortable - allowing for, hopefully, easier evaluations (:
The image above exemplifies the capability!
Data from any quarter/year can be sorted similarly.
Reversible Scale / Reversible Color Scheme
A seemingly trivial feature: a reversible scale and color scheme should assist in instances where "a higher number is bad" and a "lower number is good" - in addition to other scenarios.
For instance,
The image above shows a graph for taxes. The scale and color scheme have not been reversed and, presently, larger columns are correlating to a smaller amount of money out/in than smaller columns.
This can be fixed by reversing the scale.
The image above shows the "Reverse Scale" feature selected. Consequently, larger columns correlate to a larger amount of money out/in.
Similarly, a "Reverse Colors" feature is available. A useful option when a more positive number is "bad" and a less positive number is "good".
For instance,
The image above shows graphing for the Beneish M-Score.
A more positive number is generally interpreted as "bad"; a less positive number is generally interpreted as "good".
However, our color scheme doesn't seem to correspond (unless one considers red = good and green = bad)
Let's enable the reverse color feature.
The image above shows the completion of the process!
Finally, there's a built-in search feature that's a bit difficult to use; however, should you grow comfortable with it you may save some time sorting through fundamental data.
Big thanks to @rumpypumpydumpy for providing an easy-to-work-with framework for the pie chart!
That's all for now; thank you for checking this out.
Financial Data 8 YearsThis indicator will show the financial data of stock.
4 items is allowed to select.
especially item no 4, will show in each quarters below.
it simply give the raw data of financial data over 8 years (when combine annual and quarter data together).
feel free to give me feedback.
Disclaimer.
- The data may not be correct. Check and Confirm before use. Use at your own risk.
Major Central Bank Assets [tedtalksmacro]This script shows the balance sheets of the world's major central banks, the ECB [ FRED:ECBASSETSW , the PBoC [ ECONOMICS:CNCBBS , the Fed [ ECONOMICS:USCBBS and the BOJ [ FRED:JPNASSETS
Central banks drive the world's financial system and are the largest providers of liquidity so it is important to track whether they are providing or withdrawing liquidity from markets. Direct correlations between asset prices and central bank liquidity levels can be drawn.
IMPORTANT NOTES:
- Use this script on timeframes > 1D for greatest accuracy.
- Also included in the net effect of the reverse repo operations and treasury general account in the US.
- Ensure to turn labels on so that you can understand which line is what central bank!
- The black line shows the average, smoothed assets for the largest central banks... closest I could achieve to the net effect given scaling limitations of pinescript.
PBoC Liquidity Injections [tedtalksmacro]This script shows open market operations by the world's fourth largest central bank (by assets) - the people's bank of china.
Use this script on the 1D timeframe and higher to understand where there are periods of heightened intervention by the PBoC where financial conditions in China are loosened! Looser financial conditions often correlate with higher risk asset prices.
Takes into account:
- PBoC RR operations [ ECONOMICS:CNLIVRR ]
USD Market Liquidity [tedtalksmacro]This script aggregates and analyses total USD market liquidity in trillions of dollars - albeit with lagged, weekly data (live data is not available in TradingView!)
There's a positive correlation with the total liquidity available in the world's largest economy and risk assets like BITSTAMP:BTCUSD
The formula for net liquidity is as follows and uses account balances at the Fed and of the Treasury's General Account:
Fed Balance Sheet ECONOMICS:USBBS — Accepted Reverse Repo Bids FRED:RRPONTTLD — Treasury General Account Balance FRED:WTREGEN
This script shows positive prints when liquidity is above it's 7 day EMA and negative when below... don't use this on timeframes lower than the 1D chart!
Grenblatt Magic FormulaThe magic formula is an investing strategy created by Joel Greenblatt that focuses on finding the best price to buy certain companies in order to maximize returns. When Greenblatt coined the term magic formula investing, his portfolio had a return of 24% from 1998 to 2009.
This means that $10,000 invested at 24% for the period would have turned into just over $1 million. A fund based on the S&P 500 index for the same period would have turned that $10,000 into just under $75,000.1
Note
Bigger returns matter, especially over long periods, due to the power of compounding.
Others who ran their own experiments were not able to duplicate Greenblatt's high returns but still yielded positive results. As a result, investing experts agree that the strategy of magic formula investing outperforms the indexes. In most cases, though, it doesn't seem to beat indexes by as much as Greenblatt indicated when he introduced the concept in his book, The Little Book That Beats the Market.
There are two ratios in the magic formula. The first is the earnings yield: EBIT /EV. This is earnings before interest and taxes divided by enterprise value.A simpler and more common version of this ratio is earnings /price. Greenblatt prefers EBIT over earnings , because EBIT more accurately compares companies with different tax rates. EV is preferred to share price because EV also factors in the company's debt. Therefore, EBIT /EV provides a better picture of overall earnings than earnings /price.
The second ratio is return on capital, which is EBIT /(Net Fixed Assets + Working Capital)
The first ratio looks at earnings before interest and taxes compared to enterprise value. The second ratio focuses on the earnings relative to tangible assets. Many assets listed on the balance sheet depreciate over time as their usefulness is used up. These types of assets are called "fixed assets."
Net fixed assets are fixed assets minus all the accumulated depreciation and any liabilities associated with the asset. This gives a more accurate sense of the real value of a company's assets, compared to just looking at the total asset number on the balance sheet . Working capital is also part of this ratio and is current assets minus current liabilities. This gives a picture of whether the company is likely able to continue operations in the short term.
While the two ratios in the magic formula look small, they actually are computing a lot of data about the inner workings of a company, including:
Earnings
Interest
Tax rates
Equity price
Debt
Depreciation of assets
Current assets
Current liabilities
Overvalued/Undervalued OverlayThis indicator will tell you whether the security you are looking at is overvalued or undervalued using a company's total assets and their market cap. In theory, a company's total assets is everything that they own, which then should technically be how much the company is worth. Therefore, if the company's market cap is higher than their total assets, the indicator will read "Overvalued by X%". However, if the company's market cap is lower than their total assets, the indicator will read "Undervalued by X%". If you have any questions, feel free to let me know. Keep in mind that this indicator should be only used for long-term investing.
Gold Value RainbowThis indicator can only be used with 'GOLD' ticker. It is used to estimate Gold valuation based on major countries base money supply M0 such as US, EU, JP and CN. These 4 countries represent nearly 75% of total global money supply in the world. The chart will compare how gold value will move alongside with base money supply for comparison study. The chart presented here is just a relative comparison with some scaling and shifting so it doesn't refers to any real measurement. However it can be used to track gold price whether it's too cheap or too expensive in relative to money supply available in the market.
- The gray line represent major countries money supply M0
- The rainbow above the gray line represent the multiplication factors from 1x, 2x, ..., 10x
- The rainbow below the gray line represent the division factors from 0.8x, 0.6x, ..., 0.2x
Check other script to value stock and index:
- Stock Value Rainbow: script to value stock based on book value, earning, dividend and cash flow
- Index Value Rainbow: script to value index based on fed balance sheet and base money supply
- Gold Value Rainbow: script to value gold based on global money supply
- Stock Value US: script to check US stock value
- Stock Value EU: script to check EU stock value
- Stock Value JP: script to check JP stock value
- Stock Value CN: script to check CN stock value
Index Value RainbowThis indicator is used to estimate Index valuation based on each countries base money supply M0. The chart will compare how the index value will move alongside with base money supply for comparison study. The chart presented here is just a relative comparison with some scaling and shifting so it doesn't refers to any real measurement. However it can be used to track the index whether it's too cheap or too expensive in relative to money supply available in the market.
- The gray line represent the money supply M0
- The rainbow above the gray line represent the multiplication factors from 1x, 2x, ..., 10x
- The rainbow below the gray line represent the division factors from 0.8x, 0.6x, ..., 0.2x
This indicator can only be used with specific indices mentioned below. Currently can be used to estimate the value of largest indices by market cap:
- US Index - based on Fed Balance Sheet (SPX, NDX, DJI, RUI, RUT, RUA, ES1!, NQ1!, YM1!, RTY1!)
- EU Index - based on M1 Money Supply (N100, EU500)
- JP Index - based on M0 Money Supply (NI225, NKY)
- CN Index - based on M0 Money Supply (000001, 399001)
- HK Index - based on M0 Money Supply (HSI)
- SG Index - based on M0 Money Supply (STI)
- CA Index - based on M0 Money Supply (TSX)
- AU Index - based on M0 Money Supply (ASX200, AUS200)
- ID Index - based on M0 Money Supply (COMPOSITE)
Check other script to value stock and index:
- Stock Value Rainbow: script to value stock based on book value, earning, dividend and cash flow
- Index Value Rainbow: script to value index based on fed balance sheet and base money supply
- Gold Value Rainbow: script to value gold based on global money supply
- Stock Value US: script to check US stock value
- Stock Value EU: script to check EU stock value
- Stock Value JP: script to check JP stock value
- Stock Value CN: script to check CN stock value
Bitcoin Correlation MapHello everyone,
This indicator shows the correlation coefficients of altcoins with bitcoin in a table.
What is the correlation coefficient?
The correlation coefficient is a value that takes a value between 0 and 1 when a parity makes similar movements with the reference parity, and takes a value between 0 and -1 when it makes opposite movements.
In order to obtain more meaningful and real-time results in this indicator, the weighted average of the correlation values of the last 200bar was used. You can change the bar length as you wish. With the correlation value, you can see the parities that have similar movements with bitcoin and integrate them into your strategy.
You can change the coin list as you wish, and you can also calculate their correlation with etherium instead of bitcoin .
The indicator shows the correlation value of 36 altcoins at the moment.
The indicator indicates the color of the correlated parities as green and the color of the inversely correlated parities as red.
Cheers
Dark Energy Divergence OscillatorThe Dark Energy Divergence Oscillator (DEDO)
What makes The Universe grow at an accelerating pace?
Dark Energy.
What makes The Economy grow at an accelerating pace?
Debt.
Debt is the Dark Energy of The Economy.
I pronounce DEDO "Deed-oh", but variations are fine with me.
Note: The Pine Script version of DEDO is improved from the original formula, which used a constant all-time high calculation in the normalization factor. This was technically not as accurate for calculating liquidity pressure in historical data because it meant that historical prices were being tested against future liquidity factors. Now using Pine, the functions can be normalized for the bar at the time of calculation, so the liquidity factors are normalized per candle, not across the entire series, which feels like an improvement to me.
Thought Process:
It's all about the liquidity. What I started with is a correlation between major stock indices such as SPX and WRESBAL , a balance sheet metric on FRED
After September 2008, when QE was initiated, many asset valuations started to follow more closely with liquidity factors. This led me to create a function that could combine asset prices and liquidity in WRESBAL , in order to calculate their divergence and chart the signal in TradingView.
The original formula:
First, we don't want "non-QE" data. we only want data for the market affected by QE .
So, find SPX on the day of pre-QE: 1255.08 and subtract that from the 2022 top 4818.62 = 3563.54
With this post-QE SPX range, now you can normalize the price level simply by dividing by the range = ( SPX -1255.08)/3563.54)
Normalization produces values from 0 to 1 so that they can be compared with other normalized figures.
In order to test the 0 to 1 normalized SPX range measure against the liquidity number, WRESBAL , it's the same idea: normalize it using the max as the denominator and you get a 0 to 1 liquidity index:
( WRESBAL /4276000000000)
Subtract one from the other to get the divergence:
(( WRESBAL /4276000000000)-(( SPX -1255.08)/3563.54))*10
x10 to reduce decimal places, but this option is configurable in DEDO's input settings tab.
Positive values indicate there's ample liquidity to hold up price or even create bullish momentum in some cases. Negative values mean price levels are potentially extended beyond what liquidity levels can support.
Note: many viewers of the charts on social media wanted the values to go down in alignment with price moving down, so inverting the chart is what I do with Option + I. I like the fact that negative values represent a deficit in liquidity to hold up price but that's just me.
Now with Pine Script and some help from other liquidity focused accounts on TradingView , I was able to derive a script that includes central bank liquidity and Reverse Repo liquidity drain, all in one algorithm, with adjustable settings.
Central bank assets included in this version:
-JPY (Japan)
-CNY (China)
-UK (British Pound)
-SNB (Swiss National Bank)
-ECB (European Central Bank )
Central Bank assets can be adjusted to an allocation % so that the formula is adjusted for the market cap of the asset.
A handy table in the lower right corner displays useful information about the asset market cap, and percentage it represents in the liquidity pool.
Reverse repo soak is also an optional addition in the Input settings using the RRPONTSYD value from FRED. This value is subtracted from global liquidity used to determine divergence since it is swept away from markets when residing in the Fed's reverse repo facility.
There is an option to draw a line at the Zero bound. This provides a convenience so that the line doesn't keep having to be redrawn on every chart. The normalized equation produces a value that should oscillate around zero, as price/valuation grows past liquidity support, falls under it, and repeats in cycles.
Global Net LiquidityShows the value of Global Net Liquidity.
Currently defined as:
Fed + Japan + China + UK + ECB - RRP - TGA
where the first five components are central bank assets.
Global Net Liquidity - Dow Jones Global Fair ValueThis is similar to Global Net Liquidity - SPX Fair Value except it's for Dow Jones Global (symbol: W1DOW here on TradingView).
This is experimental and may change at any time.
Global Net Liquidity - SPX Fair ValueThis is similar to the SPX Fair Value Bands indicator.
It currently only displays the fair value.
The original SPX Fair Value formula only includes the Fed balance sheet data.
This indicator incorporates the following central bank assets:
Fed
Japan
China
UK
ECB
This is currently experimental. Feel free to explore using different formula constants.