SP500 RatiosThe "SP500 Ratios" indicator is a powerful tool developed for the TradingView platform, allowing users to access a variety of financial ratios and inflation-adjusted data related to the S&P 500 index. This indicator integrates with Nasdaq Data Link (formerly known as Quandl) to retrieve historical data, providing a comprehensive overview of key financial metrics associated with the S&P 500.
Key Features
Price to Sales Ratio: Quarterly ratio of price to sales (revenue) for the S&P 500.
Dividend Yield: Monthly dividend yield based on 12-month dividend per share.
Price Earnings Ratio (PE Ratio): Monthly price-to-earnings ratio based on trailing twelve-month reported earnings.
CAPE Ratio (Shiller PE Ratio): Monthly cyclically adjusted PE ratio, based on average inflation-adjusted earnings over the past ten years.
Earnings Yield: Monthly earnings yield, the inverse of the PE ratio.
Price to Book Ratio: Quarterly ratio of price to book value.
Inflation Adjusted S&P 500: Monthly S&P 500 level adjusted for inflation.
Revenue Per Share: Quarterly trailing twelve-month sales per share, not adjusted for inflation.
Earnings Per Share: Monthly real earnings per share, adjusted for inflation.
User Configuration
The indicator offers flexibility through user-configurable options. You can choose to display or hide each metric according to your analysis needs. Users can also adjust the line width for better visibility on the chart.
Visualization
The selected data is plotted on the chart with distinct colors for each metric, facilitating visual analysis. A dynamic legend table is also generated in the top-right corner of the chart, listing the currently displayed metrics with their associated colors.
This indicator is ideal for traders and analysts seeking detailed insights into the financial performance and valuations of the S&P 500, while benefiting from the customization flexibility offered by TradingView.
SPX (S&P 500 Index)
Normalized SP100/SP400 Ratio with Shiller PE Ratio (CAPE Ratio)This indicator is designed to observe market concentration and overall valuation by combining the Shiller CAPE Ratio with the SP100/SP400 ratio.
Blue Line: Represents the Shiller CAPE Ratio, which reflects the overall market valuation.
Yellow Line: Represents the SP100/SP400 ratio, which indicates market concentration.
The combination of these two metrics provides insight into market dynamics. Historically, on the SPX monthly chart, when the yellow line (SP100/SP400 ratio) crosses below the blue line (CAPE Ratio), it has been followed by a period of stock market gains.
Justification for Combination:
The Shiller CAPE Ratio is a widely recognized indicator of market valuation, providing a long-term perspective on whether the market is overvalued or undervalued. The SP100/SP400 ratio, on the other hand, measures the concentration of the market by comparing the largest 100 companies to the next 400 mid-sized companies.
By normalizing both metrics and analyzing their relationship, this script provides a unique perspective on market movements. The crossunder of the SP100/SP400 ratio below the CAPE Ratio may signal a shift in market sentiment or concentration, often leading to potential market rallies. This combination is not just a simple merger of indicators but rather a thoughtful integration that adds value by highlighting periods where market concentration and valuation dynamics align.
Market Inner Strength IndexThe "Market Inner Strength Index" is an indicator designed to visually represent the market strength by analyzing the six major sectors: XLK, XLV, XLF, XLY, XLC and XLI. These sectors represent more than 80% of the SPX index, making their performance crucial for understanding overall market conditions. The indicator calculates the individual strengths of these sectors and combines them to provide an overall market strength index, helping to identify scenarios of sector rotation, euphoria, or panic.
Rationale:
The six major sectors (XLK, XLV, XLF, XLY, XLC, XLI) are essential as they encompass a significant portion of the SPX index. Typically, money rotates among these sectors, meaning some sectors grow while others decline. Rare occasions where all sectors move in the same direction can indicate market-wide euphoria (upwards) or panic (downwards). The Market Inner Strength Index helps track sector performance and identify these scenarios.
Methodology:
Script requests current timeframe data for each of the sectors and assigns scores, based on its performance. It will work best on the daily and higher timeframes but can also be used on the lower timeframes.
Score assignment:
If the sector is green (positive performance) for the given timeframe, it receives positive points.
If the sector is red (negative performance), it receives negative points.
If the current close price is above the previous period high, additional positive points are assigned.
If the current close price is below the previous period low, additional negative points are assigned.
The scores for the six sectors are averaged to compute a total score, which is plotted on the chart. A table displays the performance of each sector, color-coded based on their scores for the last period.
Parameters:
Neutral Zone : Define the neutral zone threshold.
Heikin Ashi : Option to use Heikin Ashi candles instead of normal ones.
Show Divergency : Option to show divergences on the chart. Divergence occurs when the SPY is bullish, but the sector score is bearish, or vice versa. This option will only work on SPY chart.
Sector selections : Enable/disable specific sectors in score calculation.
Breadth Indicators NYSE Percent Above Moving AverageBreadth Indicators NYSE - transmits the processed data from the Barchart provider
NYSE - Breadth Indicators
S&P 500 - Breadth Indicators
DOW - Breadth Indicators
RUSSEL 1000 - Breadth Indicators
RUSSEL 2000 - Breadth Indicators
RUSSEL 3000 - Breadth Indicators
Moving Average - 5, 20, 50, 100, 150, 200
The "Percentage above 50-day SMA" indicator measures the percentage of stocks in the index trading above their 50-day moving average. It is a useful tool for assessing the general state of the market and identifying overbought and oversold conditions.
One way to use the "Percentage above 50-day SMA" indicator in a trading strategy is to combine it with a long-term moving average to determine whether the trend is bullish or bearish. Another way to use it is to combine it with a short-term moving average to identify pullbacks and rebounds within the overall trend.
The purpose of using the "Percentage above 50-day SMA" indicator is to participate in a larger trend with a better risk-reward ratio. By using this indicator to identify pullbacks and bounces, you can reduce the risk of entering trades at the wrong time.
Bull Signal Recap:
150-day EMA of $SPXA50R crosses above 52.5 and remains above 47.50 to set the bullish tone.
5-day EMA of $SPXA50R moves below 40 to signal a pullback
5-day EMA of $SPXA50R moves above 50 to signal an upturn
Bear Signal Recap:
150-day EMA of $SPXA50R crosses below 47.50 and remains below 52.50 to set the bearish tone.
5-day EMA of $SPXA50R moves above 60 to signal a bounce
5-day EMA of $SPXA50R moves below 50 to signal a downturn
Tweaking
There are numerous ways to tweak a trading system, but chartists should avoid over-optimizing the indicator settings. In other words, don't attempt to find the perfect moving average period or crossover level. Perfection is unattainable when developing a system or trading the markets. It is important to keep the system logical and focus tweaks on other aspects, such as the actual price chart of the underlying security.
What do levels above and below 50% signify in the long-term moving average?
A move above 52.5% is deemed bullish, and below 47.5% is deemed bearish. These levels help to reduce whipsaws by using buffers for bullish and bearish thresholds.
How does the short-term moving average work to identify pullbacks or bounces?
When using a 5-day EMA, a move below 40 signals a pullback, and a move above 60 signals a bounce.
How is the reversal of pullback or bounce identified?
A move back above 50 after a pullback or below 50 after a bounce signals that the respective trend may be resuming.
How can you ensure that the uptrend has resumed?
It’s important to wait for the surge above 50 to ensure the uptrend has resumed, signaling improved breadth.
Can the system be tweaked to optimize indicator settings?
While there are various ways to tweak the system, seeking perfection through over-optimizing settings is advised against. It's crucial to keep the system logical and focus tweaks on the price chart of the underlying security.
RUSSIAN \ Русская версия.
Индикатор "Процент выше 50-дневной скользящей средней" измеряет процент акций, торгующихся в индексе выше их 50-дневной скользящей средней. Это полезный инструмент для оценки общего состояния рынка и выявления условий перекупленности и перепроданности.
Один из способов использования индикатора "Процент выше 50-дневной скользящей средней" в торговой стратегии - это объединить его с долгосрочной скользящей средней, чтобы определить, является ли тренд бычьим или медвежьим. Другой способ использовать его - объединить с краткосрочной скользящей средней, чтобы выявить откаты и отскоки в рамках общего тренда.
Цель использования индикатора "Процент выше 50-дневной скользящей средней" - участвовать в более широком тренде с лучшим соотношением риска и прибыли. Используя этот индикатор для выявления откатов и отскоков, вы можете снизить риск входа в сделки в неподходящее время.
Краткое описание бычьего сигнала:
150-дневная ЕМА на уровне $SPXA50R пересекает отметку 52,5 и остается выше 47,50, что задает бычий настрой.
5-дневная ЕМА на уровне $SPXA50R опускается ниже 40, сигнализируя об откате
5-дневная ЕМА на уровне $SPXA50R поднимается выше 50, сигнализируя о росте
Обзор медвежьих сигналов:
150-дневная ЕМА на уровне $SPXA50R пересекает уровень ниже 47,50 и остается ниже 52,50, что указывает на медвежий настрой.
5-дневная ЕМА на уровне $SPXA50R поднимается выше 60, сигнализируя о отскоке
5-дневная ЕМА на уровне $SPXA50 опускается ниже 50, что сигнализирует о спаде
Корректировка
Существует множество способов настроить торговую систему, но графологам следует избегать чрезмерной оптимизации настроек индикатора. Другими словами, не пытайтесь найти идеальный период скользящей средней или уровень пересечения. Совершенство недостижимо при разработке системы или торговле на рынках. Важно поддерживать логику системы и уделять особое внимание другим аспектам, таким как график фактической цены базовой ценной бумаги.
Что означают уровни выше и ниже 50% в долгосрочной скользящей средней?
Движение выше 52,5% считается бычьим, а ниже 47,5% - медвежьим. Эти уровни помогают снизить риски, используя буферы для бычьих и медвежьих порогов.
Как краткосрочная скользящая средняя помогает идентифицировать откаты или отскоки?
При использовании 5-дневной ЕМА движение ниже 40 указывает на откат, а движение выше 60 указывает на отскок.
Как определяется разворот отката или отскока?
Движение выше 50 после отката или ниже 50 после отскока сигнализирует о возможном возобновлении соответствующего тренда.
Как вы можете гарантировать, что восходящий тренд возобновился?
Важно дождаться скачка выше 50, чтобы убедиться в возобновлении восходящего тренда, сигнализирующего о расширении диапазона.
Можно ли настроить систему для оптимизации настроек индикатора?
Хотя существуют различные способы настройки системы, не рекомендуется стремиться к совершенству с помощью чрезмерной оптимизации настроек. Крайне важно сохранить логичность системы и сфокусировать изменения на ценовом графике базовой ценной бумаги.
Buffett IndicatorThis is an open-source version of the Buffett indicator. The old version was code-protected and broken, so I created another version.
It's computed simply as the entire SPX 500 capitalization divided by the US GDP. Since TradingView does not have data for the SPX 500 capitalization, I used quarterly values of SPX devisors as a proxy.
I tried to create another version of the Buffett indicator for other countries/indexes, but I can't find the data. If you can help me find data for index divisors, I can add more choices to this indicator.
It's interesting to see how this indicator's behavior has changed in the last few years. Levels that looked crazy are not so crazy anymore.
Disclaimer
Please remember that past performance may not be indicative of 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.
SPX IB Intraday Real TimeThis indicator was designed for traders doing Iron Butterflies intradays with the SPX.
Draw and assemble the picture of an IB with the call and put wings chosen according to the selected configuration. Additionally, it shows both breakevens according to the credit obtained.
The indicator shows the distance, in real time, between the current price of the SPX and the breakevens (calls and puts) that have been selected. This result is shown in percentages and points. In the upper right corner (for calls) and lower right (for puts). The label will change color as the price moves closer or further away from the breakevens.
Setting:
Open Time (Hour): IB opening time.
Open Time (Minute): IB opening minutes.
Open Price: Strike to which the center or body of the IB was opened.
Auto Price Open: If enabled, it will take the strike at the price closest to the SPX.
Wings Width: width of the IB wings.
Credit: Refers to the credit obtained according to the IB that was opened.
Shows Breakeven: Shows breakeven points at expiration based on credit earned.
Add SMAs: Adds the SMAs 8, 20 and 50 to the chart.
Note 1: It is recommended to use TradingView's Dark Theme Color.
Note 2: this indicator will only work in intraday times of less than 30 minutes (1m,2m,5m,10m,15m,30m) and will only show results while the market is open, that is, in real time.
************************************
Spanish Version:
Este indicador fue diseñado para los traders que hacen intradías de Iron Butterflies con el SPX.
Dibuja y arma el cuadro de un IB con las alas call y puts elegidas de acuerdo a la configuración seleccionada. Además, muestra ambos breakevens según el crédito obtenido.
El indicador muestra la distancia, en tiempo real, entre el actual precio del SPX y los breakevens (calls y puts) que se hayan seleccionado. Este resultado se muestra en porcentajes y en puntos. En la esquina superior derecha (para los calls) e inferior derecha (para los puts). El label cambiará de color a medida que el precio se acerque o aleje de los breakevens.
Configuración:
Open Time (Hour): Hora de apertura del IB.
Open Time (Minute): Minutos de apertura del IB.
Open Price: Strike al que se abrió el centro o cuerpo del IB.
Auto Price Open: Si se encuentra habilitado tomará el strike al precio más cercano al SPX.
Wings Width: ancho de las alas del IB.
Credit: Se refiere al crédito obtenido según el IB que se abrió.
Shows Breakeven: Muestra los puntos de breakeven en la expiración según el crédito obtenido.
Add SMAs: Agrega al cuadro las SMA 8, 20 y 50.
Nota 1: se recomienda usar el Dark Theme Color de TradingView.
Nota 2: este indicador solo funcionará en temporalidades intradías menores a 30 minutos (1m,2m,5m,10m,15m,30m) y solo mostrará resultados mientras el mercado esté abierto, o sea en tiempo real.
Market Average TrendThis indicator aims to be complimentary to SPDR Tracker , but I've adjusted the name as I've been able to utilize the "INDEX" data provider to support essentially every US market.
This is a breadth market internal indicator that allows quick review of strength given the 5, 20, 50, 100, 150 and 200 simple moving averages. Each can be toggled to build whatever combinations are desired, I recommend reviewing classic combinations such as 5 & 20 as well as 50 & 200.
It's entirely possible that I've missed some markets that "INDEX" provides data for, if you find any feel free to drop a comment and I'll add support for them in an update.
Markets currently supported:
S&P 100
S&P 500
S&P ENERGIES
S&P INFO TECH
S&P MATERIALS
S&P UTILITIES
S&P FINANCIALS
S&P REAL ESTATE
S&P CON STAPLES
S&P HEALTH CARE
S&P INDUSTRIALS
S&P TELECOM SRVS
S&P CONSUMER DISC
S&P GROWTH
NAS 100
NAS COMP
DOW INDUSTRIAL
DOW COMP
DOW UTILITIES
DOW TRANSPORTATION
RUSSELL 1000
RUSSELL 2000
RUSSELL 3000
You can utilize this to watch stocks for dip buys or potential trend continuation entries, short entries, swing exits or numerous other portfolio management strategies.
If using it with stocks, it's advisable to ensure the stock often follows the index, otherwise obviously it's great to use with major indexes and determine holdings sentiment.
Important!
The "INDEX" data provider only supplies updates to all of the various data feeds at the end of day, I've noticed quite some delays even after market close and not taken time to review their actual update schedule (if even published). Therefore, it's strongly recommended to mostly ignore the last value in the series until it's the day after.
Only works on daily timeframes and above, please don't comment that it's not working if on other timeframes lower than daily :)
Feedback and suggestions are always welcome, enjoy!
Bull Flag DetectionThe FuturesGod bull flag indicator aims to identify the occurrence of bull flags.
Bull flags are a popular trading pattern that allows users to gauge long entries into a given market. Flags consist of a pole that is followed by either a downward or sideways consolidation period.
This script can be used on any market but was intended for futures (NQ, ES) trading on the intraday timeframe.
The script does the following:
1. Identifies the occurrence of a flag pole. This is based on a lookback period and percentage threshold decided by the user.
2. Marks the consolidation area after the pole occurrence using swing highs and swing lows.
3. Visually the above is represented by a shaded green area.
4. When a pole is detected, it is marked by a downward off-white triangle. Note that if the percentage threshold is reached several times on the same upward climb, the script will continue to identify points where the threshold for pole detection is met.
5. Also visualized are the 20, 50 and 200 period exponential moving averages. The area between the 20 and 50 EMAs are shaded to provide traders a visual of a possible support area.
True Range/Expected MoveThis indicator plots the ratio of True Range/Expected Move of SPX. True Range is simple the high-low range of any period. Expected move is the amount that SPX is predicted to increase or decrease from its current price based on the current level of implied volatility. There are several choices of volatility indexes to choose from. The shift in color from red to green is set by default to 1 but can be adjusted in the settings.
Red bars indicate the true range was below the expected move and green bars indicate it was above. Because markets tend to overprice volatility it is expected that there would be more red bars than green. If you sell SPX or SPY option premium red days tend to be successful while green days tend to get stopped out. On a 1D chart it is interesting to look at the clusters of bar colors.
Global Liquidity IndexThe Global Liquidity Index offers a consolidated view of all major central bank balance sheets from around the world. For consistency and ease of comparison, all values are converted to USD using their relevant forex rates and are expressed in trillions. The indicator incorporates specific US accounts such as the Treasury General Account (TGA) and Reverse Repurchase Agreements (RRP), both of which are subtracted from the Federal Reserve's balance sheet to give a more nuanced view of US liquidity. Users have the flexibility to enable or disable specific central banks and special accounts based on their preference. Only central banks that both don’t engage in currency pegging and have reliable data available from late 2007 onwards are included in this aggregated liquidity model.
Global Liquidity Index = Federal Reserve System (FED) - Treasury General Account (TGA) - Reverse Repurchase Agreements (RRP) + European Central Bank (ECB) + People's Bank of China (PBC) + Bank of Japan (BOJ) + Bank of England (BOE) + Bank of Canada (BOC) + Reserve Bank of Australia (RBA) + Reserve Bank of India (RBI) + Swiss National Bank (SNB) + Central Bank of the Russian Federation (CBR) + Central Bank of Brazil (BCB) + Bank of Korea (BOK) + Reserve Bank of New Zealand (RBNZ) + Sweden's Central Bank (Riksbank) + Central Bank of Malaysia (BNM).
This tool is beneficial for anyone seeking to get a snapshot of global liquidity to interpret macroeconomic trends. By examining these balance sheets, users can deduce policy trajectories and evaluate the global economic climate. It also offers insights into asset pricing and assists investors in making informed capital allocation decisions. Historically, riskier assets, such as small caps and cryptocurrencies, have typically performed well during periods of rising liquidity. Thus, it may be prudent for investors to avoid additional risk unless there's a consistent upward trend in global liquidity.
CE - Market Performance TableThe 𝓜𝓪𝓻𝓴𝓮𝓽 𝓟𝓮𝓻𝓯𝓸𝓻𝓶𝓪𝓷𝓬𝓮 𝓣𝓪𝓫𝓵𝓮 is a sophisticated market tool designed to provide valuable insights into the current market trends and the approximate current position in the Macroeconomic Regime.
Furthermore the 𝓜𝓪𝓻𝓴𝓮𝓽 𝓟𝓮𝓻𝓯𝓸𝓻𝓶𝓪𝓷𝓬𝓮 𝓣𝓪𝓫𝓵𝓮 provides the Correlation Implied Trend for the Asset on the Chart. Lastly it provides information about current "RISK ON" or "RISK OFF" periods.
Methodology:
𝓜𝓪𝓻𝓴𝓮𝓽 𝓟𝓮𝓻𝓯𝓸𝓻𝓶𝓪𝓷𝓬𝓮 𝓣𝓪𝓫𝓵𝓮 tracks the 15 underlying Stock ETF's to identify their performance and puts the combined performances together to visualize 42MACRO's GRID Equity Model.
For this it uses the below ETF's:
Dividends (SPHD)
Low Beta (SPLV)
Quality (QUAL)
Defensives (DEF)
Growth (IWF)
High Beta (SPHB)
Cyclicals (IYT, IWN)
Value (IWD)
Small Caps (IWM)
Mid Caps (IWR)
Mega Cap Growth (MGK)
Size (OEF)
Momentum (MTUM)
Large Caps (IWB)
Overall Settings:
The main time values you want to change are:
Correlation Length
- Defines the time horizon for the Correlation Table
ROC Period
- Defines the time horizon for the Performance Table
Normalization lookback
- Defines the time horizon for the Trend calculation of the ETF's
- For longer term Trends over weeks or months a length of 50 is usually pretty accurate
Visuals:
There is a variety of options to change the visual settings of what is being plotted and the two table positions and additional considerations.
Everything that is relevant in the underlying logic that can help comprehension can be visualized with these options.
Market Correlation:
The Market Correlation Table takes the Correlation of the above ETF's to the Asset on the Chart, it furthermore uses the Normalized KAMA Oscillator by IkkeOmar to analyse the current trend of every single ETF.
It then Implies a Correlation based on the Trend and the Correlation to give a probabilistically adjusted expectation for the future Chart Asset Movement. This is strengthened by taking the average of all Implied Trends.
With this the Correlation Table provides valuable insights about probabilistically likely Movement of the Asset, for Traders and Investors alike, over the defined time duration.
Market Performance:
𝓜𝓪𝓻𝓴𝓮𝓽 𝓟𝓮𝓻𝓯𝓸𝓻𝓶𝓪𝓷𝓬𝓮 𝓣𝓪𝓫𝓵𝓮 is the actual valuable part of this Indicator.
It provides valuable information about the current market environment (whether it's risk on or risk off), the rough GRID models from 42MACRO and the actual market performance.
This allows you to obtain a deeper understanding of how the market works and makes it simple to identify the actual market direction.
Utility:
The 𝓜𝓪𝓻𝓴𝓮𝓽 𝓟𝓮𝓻𝓯𝓸𝓻𝓶𝓪𝓷𝓬𝓮 𝓣𝓪𝓫𝓵𝓮 is divided in 4 Sections which are the GRID regimes:
Economic Growth:
Goldilocks
Reflation
Economic Contraction:
Inflation
Deflation
Top 5 Equity Style Factors:
Are the values green for a specific Column? If so then the market reflects the corresponding GRID behavior.
Bottom 5 Equity Style Factors:
Are the values red for a specific Column? If so then the market reflects the corresponding GRID behavior.
So if we have Goldilocks as current regime we would see green values in the Top 5 Goldilocks Cells and red values in the Bottom 5 Goldilocks Cells.
You will find that Reflation will look similar, as it is also a sign of Economic Growth.
Same is the case for the two Contraction regimes.
SPX ES SpreadA very simple indicator to display the spread between ES and SPX. The table by default displays in the upper right corner of the chart. If you are on the chart for SPX, it will show the current price of ES, as well as the difference in points between the two. Similarly, if on the chart for ES, it will show the price for SPX as well as the difference in points between the two. The table does not appear at all if the chart symbol is anything other than ES or SPX. The specific symbols used can be defined by the user.
[TT] Sectors Dist % From MA- The script shows the distance in percentages from the 200 MA (or any other MA period) , for the 11 SP500 sectors.
- It works based on the current time frames.
Could be useful when working with mean reversion strategies to detect extremes zones and overbought/oversold conditions in the given sectors compared others.
SPY SPX ES Price Converter [Pt]A must have tool for SPY SPX ES traders~!!!
Description
The SPY SPX ES Price Converter is a powerful and easy-to-use tool that allows traders to view corresponding price levels for linked instruments in real-time. This includes SPY, SPX, ES, and SPX500USD. Although these instruments often move in sync, differences in price movements, volume, and trading hours can create unique key levels and support/resistance areas for each. By mapping these levels on the same chart, traders can more easily spot trading opportunities and improve their chances of success.
Customizable features
- multiplier from the closest whole number price level
- line color
- line style
- label position / size
- # of levels to display
- toggle current price display table
Market Relative Candle Ratio ComparatorIntroducing the Market Relative Candle Ratio Comparator, a visually captivating script that eases the way you compare two financial assets, such as cryptocurrencies and market indices. Leveraging a distinctive calculation method based on percentage changes and their averages, this tool presents a crystal-clear view of how your chosen assets perform in relation to each other, both for individual candles and over a range of previous candles.
Tailoring the script to your preferences is a walk in the park, as it allows you to easily adjust input symbols, moving average lengths, and other parameters to match your analytical approach. The visually arresting column chart it creates employs vivid red and green colors to underscore the differences between the two assets on each candle. Simultaneously, the lower-opacity columns depict the accumulated differences over a specified lookback period. This vibrant blend of colors and opacities results in a dynamic visual experience, enabling you to better grasp market trends relative to each other.
The reverse bool input is a handy feature that lets you invert the effect of the input symbol (DXY by default) in the comparison. When you set the reverse input to true, the script multiplies the calculated DXY percentage change by -1, effectively reversing the comparison. This is particularly useful when examining assets with an inverse relationship or when you'd like to analyze the input symbol's impact in the opposite direction.
For instance, if the input symbol represents a market index that generally moves in the opposite direction of the selected cryptocurrency, enabling the reverse input will help you better visualize and understand the relationship between the two assets by inverting the input symbol's effect on the comparison.
In the accompanying chart, you can observe the comparison of Bitcoin's movement relative to the Dollar, Gold, Bonds, and the S&P 500. The indicator reveals that in the last day, Bitcoin outperformed Bonds, Gold, and the Dollar but not the S&P 500!
KST-Based MACDAs a follow-up to my previous script:
I am posting a stand-alone KST-based MACD.
Note that this indicator is highly laggy. Specific care must be taken when using it.
The MACD-Signal crossing is quite delayed but it is a definite confirmation.
For earlier signs, the Histogram must be analyzed. A shift from Green-White signals the 1st Bear Signal.
A MACD-Signal crossing signals the 2nd Bear SIgnal.
The same applies for bull-signs.
This indicator is useful for long-term charts on which one might want to pinpoint clear, longterm divergences.
Standard RSI, Stochastic RSI and MACD are notoriously problematic when trying to pinpoint long-term divergences.
Finally, this indicator is not meant for pinpointing entry-exit positions. I find it useful for macro analysis. In my experience, the decreased sensitivity of this indicator can show very strong signs, that can be quite laggy.
Inside the indicator there is a setting for "exotic calculations". This is an attempt to make this chart work in both linear/ negative charts (T10Y2Y) and log charts (SPX)
Tread lightly, for this is hallowed ground.
-Father Grigori
SPX Fair Value Bands WSHOSHOThis is a variation of the SPX Fair Value Bands indicator which uses WSHOSHO instead of WALCL.
WSHOSHO only includes the 'Securities Held Outright' portion of the Fed balance sheet. This effectively eliminates the portions related to BTFP (Bank Term Funding Program).
4C Options Expected Move (Weekly + 0DTE)This indicator plots the calculated Expected Move for BOTH Weekly and Zero Dated Expiration (0DTE) Daily options, for a quick visual reference.
Please Note: This indicator is different from our original "4C Expected Move (Weekly Options)" indicator, as it now packages the ability to ALSO plot 0DTE options expected moves along with Weekly expected moves. Many other newer features have also been implemented.
Background Information
The Expected Move (EM) is the amount that a stock is predicted to increase or decrease from its current price, based on the current level of options pricing and implied volatility.
This range can be viewed as possible support and resistance, or, once price gets outside of the range, institutional hedging actions can accelerate the move in that direction.
It can be useful to know what the weekly EM range is for a stock to understand the probabilities of the overall distance, direction and volatility for the week.
About the Indicator
This indicator plots the calculated Expected Move for BOTH Weekly and Zero Dated Expiration (0DTE) options, for a quick visual reference.
For the weekly EM, the range is based on the Weekly close of the prior week.
For the Daily EM based on 0DTE options, the range is based on the Daily close of the prior day.
The indicator will automatically start a new weekly EM plot at the beginning of the week, and a new daily EM at the beginning of each day.
The EM values must be updated weekly and/or daily.
Features
Plots the EM for the week
Plots the EM for the day, for symbols that offer daily expiration options
Plots the 2 Standard Deviation EM for both the weekly and daily EM
Labels with calculated values are plotted near the levels for quick visual aid
Settings
Can toggle weekly EM on/off
Can toggle Daily EM on/off
Can toggle 2 Standard Deviation lines on/off
Can toggle labels for all EM on/off
Robust line settings
Can adjust label location left/right based on personal preference
Can enter symbol into settings as a reference
Handy instructions in the settings
How To Set Up The Indicator
To use this indicator you must have access to a broker with options data (not available on Tradingview).
Usually, you can look at the stock's option chain to find the weekly expected move.
You will have to do your own research to find where this information is displayed depending on your broker. You may also need to find the information elsewhere if your broker does not have this information.
You can also do your calculation of the EM using the following formula (please do your own research):
Expected Move = Option Price x Implied Volatility x Square Root of Time
See screenshot example below
This is the Thinkorswim platform's option chain, and the Implied Volatility % and the calculated EM are on the right side of the option chain.
The Expected Move is circled in blue. Use the +- number in parentheses, NOT the % value.
For the weekly EM, input the number that corresponds to the weekly option into the indicator. This must be done on a weekly basis, and It is typically best to use the EM for the next week expiration that is generated AFTER the Friday close and/or before the Monday open of the upcoming week.
For the daily EM, input the number that corresponds to the daily 0DTE option into the indicator. This must be done on a daily basis, and it is typically best to use the EM value for the 0DTE option that is generated the night before (after market close), or before the market opens for that 0DTE. .
Pin Candle DetectionPin candles are a variation of hammer candles that are useful in technical analysis . In particular, when combined with volume profile studies, they can be a powerful set up for long entries or other decision making.
For example, when looking at volume profiles, a long entry would be a fair value area (i.e. 40%) below the close of a pin candle. When combined with a support level , the set up is stronger.
While most scripts look for hammer candles, pin candles are somewhat different in that the length of the wick is significant.
This script and its parameters was built for ES futures 15 min chart in mind.
This script is unique in that it allows for the below parameters to be adjusted to suit other instruments and timeframes:
1. Fib level: Candle must close within a certain retracement level). My preference is 0.55. Some traders like 0.5, while others prefer 0.33
2. Wick length: Pin candles differ from pure hammers in that the length of the wick must be significant. My preference is 7 points on ES (as in $ and not ticks)
Add this script to your alerts to no longer miss these set ups.
Failed Breakdown Detection'Failed Breakdowns' are a popular set up for long entries.
In short, the set up requires:
1) A significant low is made ('initial low')
2) Initial low is undercut with a new low
3) Price action then 'reclaims' the initial low by moving +8-10 points from the initial low
This script aims at detecting such set ups. It was coded with the ES Futures 15 minute chart in mind but may be useful on other instruments and time frames.
Business Logic:
1) Uses pivot lows to detect 'significant' initial lows
2) Uses amplitude threshold to detect a new low beneath the initial low; used /u/ben_zen script for this
3) Looks for a valid reclaim - a green candle that occurs within 10 bars of the new low
4) Price must reclaim at least 8 points for the set up to be valid
5) If a signal is detected, the initial low value (pivot low) is stored in array that prevents duplicate signals from being generated.
6) FBD Signal is plotted on the chart with "X"
7) Pivot low detection is plotted on the chart with "P" and a label
8) New lows are plotted on the chart with a blue triangle
Notes:
User input
- My preference is to use the defaults as is, but as always feel free to experiment
- Can modify pivot length but in my experience 10/10 work best for pivot lows
- New low detection - 55 bars and 0.05 amplitude work well based on visual checks of signals
- Can modify the number of points needed to reclaim a low, and the # of bars limit under which this must occur.
Alerts:
- Alerts are available for detection of new lows and detection of failed breakdowns
- Alerts are also available for these signals but only during 7:30PM-4PM EST - 'prime time' US trading hours
Limitations:
- Current version of the script only compares new lows to the most recent pivot low, does not look at anything prior to that
- Best used as a discretionary signal
Visit /u/ben_zen's Profile:
www.tradingview.com
Profile Link www.tradingview.com
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.
Price Distance RatioThis study plots the ratio between current price and the price N days ago.
With N input that is configurable, users can find optimal long/short entries when price is in an established trend and price has diverge far from a given local peak or all time high.
With many years of stock trading the analysis indicates a connection between the distance of price and subsequent returns.
Portfolios of stocks with lower price to local highes ratios generally underperformed portfolios of stocks with higher prices to peaks reached similar N days ago.
The highest returns to previous peak are recorded when buying at the biggest dip.
For example, the purchase at 20% drawdown could generate 25% when price returns to the peak. The purchase at 50% drawdown could generate bigger, i.e. 100% return, when price returns to the peak. And the purchase at 90% drawdown could generate much bigger, i.e. 900% return, in a case the price returns to the peak.
However, buying very far below local peaks on almost all holding periods produces lower CAGR returns because of "timing adjustment". In simple words, typically the drawdown takes less time vs. further recovery.
For example:
👉 The largest BTC drawdown in 2013-2015 took 410 days (Peak-to-Valley) . And the recovery of BTC to new highs took 771 days (Valley-to-Peak) after that.
👉 The 3rd longest drawdown in BTC took 363 days (observed from December 17, 2017 to December 15, 2018). And further recovery in BTC to its new high took almost two years - 716 days .
👉The 4th longest drawdown in BTC took 162 days (observed from June 08, 2011 to November 17, 2011). And further recovery in BTC to its new high took more than a year - 469 days .
The concept of this study could recognizes at least 4 different modes of action.
👉 In a clearly established upward trend traders should be buying (following the trend) when Ratio is above 100% and reducing the size when Ratio turns below 100%.
👉 Conversely, in a clearly established downward trend traders should be shorted when Ratio is below 100% and covering when the Ratio turns back to 100%.
👉 In a sideways movement traders are advised to wait carefully if the Ratio near 100% for a long time, and take a position the trend is clear.
👉 Chartists can analyze the dynamic of the indicator - both in terms of trends and overall level. For example as it shown at the chart.
The understading of the study and rules of "timing adjustments" could genarate the awesome opportunities for stock options traders also, with strategies of selling uncovered call options and vertical call spreads.
// Many thanks to @HPotter and @Wheeelman wizards for their continious support and assistance.
SPX Expected MoveThis indicator plots the "expected move" of SPX for today's trading session. Expected move is the amount that SPX is predicted to increase or decrease from its current price, based on the current level of implied volatility. The implied volatility in this indicator is computed from the current value of the VIX (or one of several volatility symbols available on Trading view). The computation is done using standard formula. The resulting plots are labeled as 1 and 2 standard deviations. The default values are to use VIX as well as 252 trading days in the years.
Use the square root of (days to expiration, or in this case a fraction of the day remaining) divided but the square root of (252, or number of trading days in a year).
timeRemaining = math.sqrt(DTE) / math.sqrt(252)
Standard deviation move = SPX bar closing price * (VIX/100) * timeRemaining