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.
Chande Kroll Trend Strategy (SPX, 1H) | PINEINDICATORSThe "Chande Kroll Stop Strategy" is designed to optimize trading on the SPX using a 1-hour timeframe. This strategy effectively combines the Chande Kroll Stop indicator with a Simple Moving Average (SMA) to create a robust method for identifying long entry and exit points. This detailed description will explain the components, rationale, and usage to ensure compliance with TradingView's guidelines and help traders understand the strategy's utility and application.
Objective
The primary goal of this strategy is to identify potential long trading opportunities in the SPX by leveraging volatility-adjusted stop levels and trend-following principles. It aims to capture upward price movements while managing risk through dynamically calculated stops.
Chande Kroll Stop Parameters:
Calculation Mode: Offers "Linear" and "Exponential" options for position size calculation. The default mode is "Exponential."
Risk Multiplier: An adjustable multiplier for risk management and position sizing, defaulting to 5.
ATR Period: Defines the period for calculating the Average True Range (ATR), with a default of 10.
ATR Multiplier: A multiplier applied to the ATR to set stop levels, defaulting to 3.
Stop Length: Period used to determine the highest high and lowest low for stop calculation, defaulting to 21.
SMA Length: Period for the Simple Moving Average, defaulting to 21.
Calculation Details:
ATR Calculation: ATR is calculated over the specified period to measure market volatility.
Chande Kroll Stop Calculation:
High Stop: The highest high over the stop length minus the ATR multiplied by the ATR multiplier.
Low Stop: The lowest low over the stop length plus the ATR multiplied by the ATR multiplier.
SMA Calculation: The 21-period SMA of the closing price is used as a trend filter.
Entry and Exit Conditions:
Long Entry: A long position is initiated when the closing price crosses over the low stop and is above the 21-period SMA. This condition ensures that the market is trending upward and that the entry is made in the direction of the prevailing trend.
Exit Long: The long position is exited when the closing price falls below the high stop, indicating potential downward movement and protecting against significant drawdowns.
Position Sizing:
The quantity of shares to trade is calculated based on the selected calculation mode (linear or exponential) and the risk multiplier. This ensures position size is adjusted dynamically based on current market conditions and user-defined risk tolerance.
Exponential Mode: Quantity is calculated using the formula: riskMultiplier / lowestClose * 1000 * strategy.equity / strategy.initial_capital.
Linear Mode: Quantity is calculated using the formula: riskMultiplier / lowestClose * 1000.
Execution:
When the long entry condition is met, the strategy triggers a buy signal, and a long position is entered with the calculated quantity. An alert is generated to notify the trader.
When the exit condition is met, the strategy closes the position and triggers a sell signal, accompanied by an alert.
Plotting:
Buy Signals: Indicated with an upward triangle below the bar.
Sell Signals: Indicated with a downward triangle above the bar.
Application
This strategy is particularly effective for trading the SPX on a 1-hour timeframe, capitalizing on price movements by adjusting stop levels dynamically based on market volatility and trend direction.
Default Setup
Initial Capital: $1,000
Risk Multiplier: 5
ATR Period: 10
ATR Multiplier: 3
Stop Length: 21
SMA Length: 21
Commission: 0.01
Slippage: 3 Ticks
Backtesting Results
Backtesting indicates that the "Chande Kroll Stop Strategy" performs optimally on the SPX when applied to the 1-hour timeframe. The strategy's dynamic adjustment of stop levels helps manage risk effectively while capturing significant upward price movements. Backtesting was conducted with a realistic initial capital of $1,000, and commissions and slippage were included to ensure the results are not misleading.
Risk Management
The strategy incorporates risk management through dynamically calculated stop levels based on the ATR and a user-defined risk multiplier. This approach ensures that position sizes are adjusted according to market volatility, helping to mitigate potential losses. Trades are sized to risk a sustainable amount of equity, adhering to the guideline of risking no more than 5-10% per trade.
Usage Notes
Customization: Users can adjust the ATR period, ATR multiplier, stop length, and SMA length to better suit their trading style and risk tolerance.
Alerts: The strategy includes alerts for buy and sell signals to keep traders informed of potential entry and exit points.
Pyramiding: Although possible, the strategy yields the best results without pyramiding.
Justification of Components
The Chande Kroll Stop indicator and the 21-period SMA are combined to provide a robust framework for identifying long trading opportunities in trending markets. Here is why they work well together:
Chande Kroll Stop Indicator: This indicator provides dynamic stop levels that adapt to market volatility, allowing traders to set logical stop-loss levels that account for current price movements. It is particularly useful in volatile markets where fixed stops can be easily hit by random price fluctuations. By using the ATR, the stop levels adjust based on recent market activity, ensuring they remain relevant in varying market conditions.
21-Period SMA: The 21-period SMA acts as a trend filter to ensure trades are taken in the direction of the prevailing market trend. By requiring the closing price to be above the SMA for long entries, the strategy aligns itself with the broader market trend, reducing the risk of entering trades against the overall market direction. This helps to avoid false signals and ensures that the trades are in line with the dominant market movement.
Combining these two components creates a balanced approach that captures trending price movements while protecting against significant drawdowns through adaptive stop levels. The Chande Kroll Stop ensures that the stops are placed at levels that reflect current volatility, while the SMA filter ensures that trades are only taken when the market is trending in the desired direction.
Concepts Underlying Calculations
ATR (Average True Range): Used to measure market volatility, which informs the stop levels.
SMA (Simple Moving Average): Used to filter trades, ensuring positions are taken in the direction of the trend.
Chande Kroll Stop: Combines high and low price levels with ATR to create dynamic stop levels that adapt to market conditions.
Risk Disclaimer
Trading involves substantial risk, and most day traders incur losses. The "Chande Kroll Stop Strategy" is provided for informational and educational purposes only. Past performance is not indicative of future results. Users are advised to adjust and personalize this trading strategy to better match their individual trading preferences and risk tolerance.
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.
Investments/swing trading strategy for different assetsStop worrying about catching the lowest price, it's almost impossible!: with this trend-following strategy and protection from bearish phases, you will know how to enter the market properly to obtain benefits in the long term.
Backtesting context: 1899-11-01 to 2023-02-16 of SPX by Tvc. Commissions: 0.05% for each entry, 0.05% for each exit. Risk per trade: 2.5% of the total account
For this strategy, 5 indicators are used:
One Ema of 200 periods
Atr Stop loss indicator from Gatherio
Squeeze momentum indicator from LazyBear
Moving average convergence/divergence or Macd
Relative strength index or Rsi
Trade conditions:
There are three type of entries, one of them depends if we want to trade against a bearish trend or not.
---If we keep Against trend option deactivated, the rules for two type of entries are:---
First type of entry:
With the next rules, we will be able to entry in a pull back situation:
Squeeze momentum is under 0 line (red)
Close is above 200 Ema and close is higher than the past close
Histogram from macd is under 0 line and is higher than the past one
Once these rules are met, we enter into a buy position. Stop loss will be determined by atr stop loss (white point) and break even(blue point) by a risk/reward ratio of 1:1.
For closing this position: Squeeze momentum crosses over 0 and, until squeeze momentum crosses under 0, we close the position. Otherwise, we would have closed the position due to break even or stop loss.
Second type of entry:
With the next rules, we will not lose a possible bullish movement:
Close is above 200 Ema
Squeeze momentum crosses under 0 line
Once these rules are met, we enter into a buy position. Stop loss will be determined by atr stop loss (white point) and break even(blue point) by a risk/reward ratio of 1:1.
Like in the past type of entry, for closing this position: Squeeze momentum crosses over 0 and, until squeeze momentum crosses under 0, we close the position. Otherwise, we would have closed the position due to break even or stop loss.
---If we keep Against trend option activated, the rules are the same as the ones above, but with one more type of entry. This is more useful in weekly timeframes, but could also be used in daily time frame:---
Third type of entry:
Close is under 200 Ema
Squeeze momentum crosses under 0 line
Once these rules are met, we enter into a buy position. Stop loss will be determined by atr stop loss (white point) and break even(blue point) by a risk/reward ratio of 1:1.
Like in the past type of entries, for closing this position: Squeeze momentum crosses over 0 and, until squeeze momentum crosses under 0, we close the position. Otherwise, we would have closed the position due to break even or stop loss.
Risk management
For calculating the amount of the position you will use just a small percent of your initial capital for the strategy and you will use the atr stop loss for this.
Example: You have 1000 usd and you just want to risk 2,5% of your account, there is a buy signal at price of 4,000 usd. The stop loss price from atr stop loss is 3,900. You calculate the distance in percent between 4,000 and 3,900. In this case, that distance would be of 2.50%. Then, you calculate your position by this way: (initial or current capital * risk per trade of your account) / (stop loss distance).
Using these values on the formula: (1000*2,5%)/(2,5%) = 1000usd. It means, you have to use 1000 usd for risking 2.5% of your account.
We will use this risk management for applying compound interest.
In settings, with position amount calculator, you can enter the amount in usd of your account and the amount in percentage for risking per trade of the account. You will see this value in green color in the upper left corner that shows the amount in usd to use for risking the specific percentage of your account.
Script functions
Inside of settings, you will find some utilities for display atr stop loss, break evens, positions, signals, indicators, etc.
You will find the settings for risk management at the end of the script if you want to change something. But rebember, do not change values from indicators, the idea is to not over optimize the strategy.
If you want to change the initial capital for backtest the strategy, go to properties, and also enter the commisions of your exchange and slippage for more realistic results.
If you activate break even using rsi, when rsi crosses under overbought zone break even will be activated. This can work in some assets.
---Important: In risk managment you can find an option called "Use leverage ?", activate this if you want to backtest using leverage, which means that in case of not having enough money for risking the % determined by you of your account using your initial capital, you will use leverage for using the enough amount for risking that % of your acount in a buy position. Otherwise, the amount will be limited by your initial/current capital---
Some things to consider
USE UNDER YOUR OWN RISK. PAST RESULTS DO NOT REPRESENT THE FUTURE.
DEPENDING OF % ACCOUNT RISK PER TRADE, YOU COULD REQUIRE LEVERAGE FOR OPEN SOME POSITIONS, SO PLEASE, BE CAREFULL AND USE CORRECTLY THE RISK MANAGEMENT
Do not forget to change commissions and other parameters related with back testing results!
Some assets and timeframes where the strategy has also worked:
BTCUSD : 4H, 1D, W
SPX (US500) : 4H, 1D, W
GOLD : 1D, W
SILVER : 1D, W
ETHUSD : 4H, 1D
DXY : 1D
AAPL : 4H, 1D, W
AMZN : 4H, 1D, W
META : 4H, 1D, W
(and others stocks)
BANKNIFTY : 4H, 1D, W
DAX : 1D, W
RUT : 1D, W
HSI : 1D, W
NI225 : 1D, W
USDCOP : 1D, W
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.