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.
J-SPX
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 IC Intraday & StatsThis indicator was designed for traders who make intraday Iron Condors with the SPX.
It basically has 2 main parts:
Part 1:
The indicator shows the distance, in real time, between the current SPX price and the IC selling wings (calls and puts wings) that have been selected. This result is displayed in percentages and in points. In the upper right corner (for calls) and lower right corner (for puts). The label will change color as the price moves closer to or further away from the sell strike. Darker red color as it approaches the wings, lighter green color as the price approaches the center of the Iron Condor.
Part 2:
Statistical dashboard showing the number of times in the past that from a certain hour (the current time) to the market close (4pm US East Time) the SPX moved outside or inside the width of the selected wings. The position of the table is configurable. By default, it's in the upper right corner.
Dashboard:
First Date: the first day of the sample (this varies depending on the timeframe, the higher the timeframe the larger the sample is, as TradingView counts more bars backwards, by default TV offers 10000 bars for the PRO version). Recommended 5 minutes.
Range Time: refers to the time range of the sample. From the current time to 4pm (US East Time).
Deviation Wing (%): It's the deviation (in percentage) based on the current time, from the current SPX price to the wing strikes. It takes the smaller value, either call or put wing.
Total Days: the number of days in the sample.
In range Days: the number of days that the price remained in that range from the current time to the market close.
Out of Range Days: the number of days the price ended outside that range from the current time to the market close.
Configuration:
Open Time (Hour): IC opening hour.
Open time (Minute): IC opening minutes.
Width Wings: width of the wings from the SPX price at the configured time.
Mini Rectangles: Refers to include within the IC 4 deviations (mini rectangles) to better visualize where the SPX price is with reference to the wings. Darker red color as it gets closer to the wings, lighter green color as the price gets closer to the center of the Iron Condor.
Add SMAs: Add SMAs 8, 20 and 50 to the IC chart.
Include Fundamental Days: Include or not in the sample important news days. They are considered: FED Meetings, CPI Reports, Unemployment Reports, Powell Speech.
Include Days: (Monday, Tuesday, Wednesday, Thursday, Friday). Include (or not) in the sample the chosen days.
Apply Filters Since: Sampling start date. Per default: False.
Table Position: Dashboard position.
Note 1: It's recommended to use the Dark Theme Color of TradingView.
Note 2: this indicator will only work in intraday timeframes less than 30 minutes (1m, 2m, 5m, 10m, 15m, 30m) and will only show results while the market is open.
************************************
Spanish Version:
Este indicador fue diseñado para los traders que hacen intradías de Iron Condors con el SPX.
Básicamente cuenta con 2 partes principales:
Parte 1:
El indicador muestra la distancia, en tiempo real, entre el actual precio del SPX y las alas vendedoras (alas 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 del precio de las alas. Color rojo más oscuro a medida que se acerque a las alas, color verde claro cuando el precio se acerque al centro del Iron Condor.
Parte 2:
Dashboard estadístico que muestra la cantidad de veces que desde una determinada hora (el tiempo actual) hasta el cierre del mercado (4pm US East Time) el SPX se movió fuera o dentro del ancho de las alas seleccionadas. La posición de la tabla es configurable. Por defecto esta en la esquina superior derecha.
Dashboard:
First Date: el primer día de la muestra (esto varía dependiendo el timeframe, a mayor timeframe la muestra es mayor, ya que TradingView contará más barras para atrás (por default TV ofrece 10000 barras para la versión PRO). Recomendado 5 minutos.
Range Time: se refiere al rango horario de la muestra. Desde la hora actual hasta las 4pm (US East Time)
Deviation Wing (%): Es la desviación en porcentaje en base a la hora actual, desde el precio actual del SPX hasta el ancho de las alas. Toma el menor valor, sea al ala call o al ala put.
Total Days: la cantidad de días de la muestra.
In range Days: la cantidad de días que el precio se mantuvo en ese rango desde la hora actual hasta el cierre del mercado
Out of Range Days: la cantidad de días que el precio terminó fuera de ese rango desde la hora actual hasta el cierre del mercado.
Configuración:
Open Time (Hour): Hora de apertura del IC.
Open time (Minute): Minutos de apertura del IC.
Width Wings: ancho de las alas desde el precio del SPX a la hora configurada.
MiniRectangles: Se refiere a incluir dentro del IC 4 desviaciones (mini rectángulos) para visualizar de mejor manera donde se encuentra el precio del SPX con referencia a las alas. Color rojo más oscuro a medida que se acerque a las alas, color verde claro cuando el precio se acerque al centro del Iron Condor.
Add SMAs: Agrega al cuadro las SMA 8, 20 y 50.
Include Fundamental Days: Incluye o no en la muestra días de noticias importantes. Son considerados: FED Meetings, CPI Reports, Unemployment Reports, Powell Speech.
Include Days: (Monday, Tuesday, Wednesday, Thursday, Friday). Incluye (o no) en la muestra los días elegidos.
Apply Filters Since: Fecha de comienzo del muestreo.
Table Position: Posición del dashboard.
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.
SPX Implied Probability of closing above/belowThis is a recreation of the work done by Michael Rechenthin aka "Dr.Data" from Tastytrade back in 2016 (this indicator is for SP:SPX only)
You can watch the episode where "Dr.Data", Tom and Tony go over this concept on the following link:
www.tastytrade.com
The following are my personal additions:
- ability to choose between TVC:VIX and NASDAQ:VOLI as the IV input
- ability to choose between 252 and 365 for the number of days
Note that I’m displaying 4 decimal places (#.####) to be as accurate as possible but sometimes you will see 0% or 100% displayed which means that more decimal places are needed (0% could be 0.00005% or 100% could be 99.99995%).
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
ILM CFTC COT Legacy PlotUse this indicator on Daily Timeframe
Please refer to the below link for CFTC Disaggregated COT
www.cftc.gov
This script is very similar to COT Financial Plot indicator except that it plots the data for Futures in Legacy buckets Commercial vs. Non-Commercial
Volatility Inverse Correlation CandleThis is an educational tool that can help you find direct or inverse relations between two assets.
In this case I am using VIX and SPX .
The way it works is the next one :
So I am looking at the current open value of VIX in comparison with the previous close ( if it either above or below) and after on the SPX I am looking into the history and see for example which type of candle we had in respect with the opening value from VIX .
So for example, lets imagine that today is monday, and the weekly open value from VIX was higher than previous friday close value. Now I am going to see with the inverse correlation , if based on this idea, the current weekly candle from SPX finished in a bear candle.
The same can be applied for the bearish situation, so if we had an open from VIX lower than previous close, we are looking to check the SPX bull candle accuracy.
At the same time, for a different type of calculation I have added an internal lookup into heikin ashi values.
If you have any questions please let me know !
Top 40 constituents of S&P 500 IndexDisplays real-time candles of top 40 constituents of S&P 500 Index ( TVC:SPX ) for a given time frame, side-by-side. This gives an overall idea of breadth and depth of market movements in the time-frame.
Please note that, this is not a standard chart rendered bar-wise and may take time to load as it requests multiple securities. You could modify the contents, from settings, to include stocks from your portfolio or indices of different sectors.
ILM COT Financial Table - CFTCUse this indicator on Daily Timeframe
Please refer to the below link for CFTC Financials
www.cftc.gov
This script shows the Financial COT for the respective instrument by deriving the CFTC code.
Option is provided to override the CFTC code
User can also configure the historical CFTC data view
The script calculates the Long% vs Short% for various categories (Dealers/Asset Managers/Leveraged Funds/Other Reportables) and color codes the column appropriately.
The goal of this script is to show all the financial CFTC data on a single page to digest the data better in a tabular form
Fixed the default TradingView Library which has some errors with CFTC code mapping.
For example, SPX CFTC Code #13874+ which is the most important one where big players take positions is not there in the default Library.
Seasonality - Session Performance - Morning Afternoon EveningUse this indicator on Intraday Timeframe. Higher the timeframe, more the data
This script calculates the performance of an instrument for different sessions.
Session inputs can be updated to study performance of
- Morning vs Afternoon vs Evening
- Pre-Market vs Market vs Post-Market (provided the data feed supports pre and post market)
- Overnight vs Intraday
Three session inputs are provided to tweak the session range
Performance is calculated as session close / session open - 1
Session timeframes can be set for various countries. Make sure the session timeframe aligns with the Candle open/close for the timeframe you choose. Some examples below
US Markets: 0930-1130 1130-1430 1430-1630 Timeframe 1 hour
India Markets: 0915-1030 1030-1415 1415-15:30 Timeframe 75min
Seasonality Overnight Gaps - Tabular Form Use this indicator on Daily Timeframe
This script calculates the overnight gaps above a specific threshold (that can be set through input parameters) and displays the data in a tabular form with Year in the rows and the day of the week in the columns.
Also a summary row is displayed at the bottom for day of the week.
Detailed Gap info is displayed as tooltip for the cell data
Gap - Open should be outside the previous day's Open and Close
Gap % - open/prev. close - 1 if Gap is there
ILM Overnight vs Intraday Performance - Tabular FormUse this indicator on Daily Timeframe
This script compares Overnight vs Intraday Performance based on the Day of the Week (DOW) - Sun - Sat of index/stock/currency/commodity symbols.
ON column indicates Overnight performance = open/close -1
ID column indicates Intraday performance = close-open/1
The calculations are detailed in the tooltips of the individual table cells.
Seasonality DOW - Day Of the Week - Tabular FormUse this indicator on Daily Timeframe
This indicator displays the seasonality data for any instrument (index/stock/ futures /currency) in a tabular data by day of the week - DOW ( Sun - Mon - Tue - Wed - Thu - Fri - Sat ).
User can change the start of the year for analysis from the inputs.
Year is represented in rows and Day of the week (DOW) is represented in cols.
This indicator uses Daily Data feed to calculate the % change
Summary data for DOW displayed as the last row
MINI SPXThis is the XSP version of SPX, basically it's just the price of SPX divided by 10 and shown using labels.
Should only be used on SPX to watch the price of XSP since XSP doesn't have real-time data ATM.
Can be used on any time frames.
This script allows you to view the Daily (O, H, L, C) and Yesterday's (O, H, L, C) with a non intrusive price line.
Allows for extra customization of the price lines and labels.
NYSE Market Sentiment Oscillator - Intraday w/ alertsThe ULTIMATE market sentiment indicator that combines the sentiments from the MARKET INTERNALS : $ADD ( NYSE $ADV minus $DECL ), $VOLD ( NYSE $UVOL minus $DVOL ) and $TICK ( NYSE Cumulative tick ). Sentiment is based on calculating the crossovers of moving average pairs for each of the market internals. As a result, 3 corresponding signal lines are generated + 1 combined Market Sentiment Oscillator (aka MSO) signal line.
**Important** This indicator is only meant to be used for intraday 1min-5 min timeframe only *** It may not function at higher timeframes without updating some moving average periods.
WHAT IS IT SHOWING?
Each signal lines represents the trend of the 3 market internals (TICK, ADD, VOLD). If signal line is above zero, it is in a bullish trend; below zero, bearish. The oscillating frequency of these lines are dependent on the length of moving average pairs of your choosing. A combined MSO signal line shows the combined trends of those 3 market internals, hence it represents real time market sentiment of the NYSE.
FEATURES
There are 2 display modes for this indicator:
1) On a separate pane
- in this mode, the signal lines can be toggled to oscillate along the zero line
2) On the price chart
- in this mode, the signal lines can be toggled to oscillate along the OHLC line of the price chart
- comes with Nadaraya-Watson Envelope and ATR bands
BUY/SELL SIGNALS AND STRATEGIES
By default, this indicator comes with two day trading strategies and offers long and short signals with alerts. These strategies attempts to leverage on the oscillating nature of market price movement on major NYSE indices, such as SPY, SPX, QQQ, NAS, all of which have high correlation with the market internals. However, please note that these signals offers no guarantee to profitability, so use at your own risk.
BACKGROUND COLORS SIGNIFYING TRENDS
There are options to display the background colors in 2 colors and shades.
1) Short-term sentiment
- Bright green = ADD / VOLD / TICK all in up trend
- Dimmed green = ADD / VOLD in up trend, but not TICK
- Bright red = ADD / VOLD / TICK all in down trend
- Dimmed red = ADD / VOLD in down trend, but not TICK
2) Trend Convergence
- Green = ADD / VOLD / TICK all bullish
- Red = ADD / VOLD / TICK all bearish
3) MSO
- Green = MSO bullish ( MSO signal line > 0 )
- Red = MSO bearish ( MSO signal line < 0 )
MARKET INTERNALS REAL-TIME DATA TABLE
A data table can be toggled on / off that shows the real-time sentiment and values of the three market internals. It may be useful in making quick trading decisions. The table cells are colored according to their corresponding trends.
Dealar VIX Implied Range + Retracement LevelsThis Implied range Is derived by the VIX(1 sd annual +/- Implied move.)
This Indicator plots the daily Implied range, A lot of quantitative trading firms/ MM firms hedge their delta & gamma exposure around the Implied range(prop calc). I have added retracement levels as well, so you have more pivot levels.
Enjoy!
Hussarya compare DJI SPX BTCScript shows relations between DJI downJones SPX and BTC:USD.
DJI chart must be set from candlestick to line
Red line is price (close). x 8
Green line ist te price BTCUSD from Binance price (close) x 1.5
SPX Fair Value BandsThese are based on Darius Dale and Max Anderson's Net Liquidity model.
This is intended for use with the $SPX chart.
Compare ticker against SPX - yoyo This script is built on a request of one of the best trader yoyo. The script compares the performance of a tickers against SPX.
The script gives user option to override default SPX ticker to a ticker of their choice using settings.
The script does a % change comparison against base stock which is SPX by default for same timeframes and you can see relativity of stock to the other.
It also does plot a line that shows any divergence.
PuetzUWS [time, price] multiFractal mirrors, SPX 1872-2020This script is simply provided because a few rare people may actually be able to use one or two coding ideas. It is not possible to provide useful (description, explanation)s here. Maybe you can find those with a webSearch. If anybody is interested in the basic concept, just copy the code and run with it.
As the original was in violation of PineScript rules, I've removed many links, including :
- documentation of my code
- external sources of code
- blog solutions to Pine script programming
- math, science references, people
Hopefully it will won't be rejected this time, if so, too bad. I only made it through 10% of the conceptual objectives, and I do not believe any of the rest of the concepts are do-able in Pine Script. The current coding is (incomplete, unstable) but does give a faint idea of my "first step" intents. I have stopped all work, as I have to get back to my real projects (nothing to do with markets).
Volatility Calculator for Daily Top and Bottom RangeWith the usage of ATR, applied on the close of the daily candle, I am calculated the volatility channels for the TOP and BOTTOM
Based on this logic, we can estimate, with a huge confidence factor, where the prices are going to be compressed for the trading day.
Having said that, lets take a look at the data gathered among the most important financial markets:
SPX
TOP CROSSES : 2116
BOT CROSSES : 1954
Total Daily Candles : 18908
Occurance ratio = 0.215
NDX
TOP CROSSES : 1212
BOT CROSSES : 1183
Total Daily Candles : 9386
Occurance ratio = 0.255
DIA
TOP CROSSES : 759
BOT CROSSES : 769
Total Daily Candles : 6109
Occurance ratio = 0.25
DXY
TOP CROSSES : 1597
BOT CROSSES : 1598
Total Daily Candles : 13156
Occurance ratio = 0.243
DAX
TOP CROSSES : 1878
BOT CROSSES : 1848
Total Daily Candles : 13155
Occurance ratio = 0.283
BTC USD
TOP CROSSES : 416
BOT CROSSES : 417
Total Daily Candles : 4290
Occurance ratio = 0.194
ETH USD
TOP CROSSES : 247
BOT CROSSES : 268
Total Daily Candles : 2452
Occurance ratio = 0.21
EUR USD
TOP CROSSES : 820
BOT CROSSES : 805
Total Daily Candles : 7489
Occurance ratio = 0.217
GOLD
TOP CROSSES : 1722
BOT CROSSES : 1569
Total Daily Candles : 13747
Occurance ratio = 0.239
USOIL
TOP CROSSES : 1077
BOT CROSSES : 1089
Total Daily Candles : 10231
Occurance ratio = 0.212
US 10Y
TOP CROSSES : 1302
BOT CROSSES : 1365
Total Daily Candles : 9075
Occurance ratio = 0.294
Based on this, we can assume with a very high confidence ( 70-80%) that the market is going to stay, within the range created from the BOT and TOP ATR points.
PClose Levels 2.0This script plots the levels generated via a combination of SPX 2Y Quartiles for everyday, red days, and green days. It is intended for use solely with SPX.
These quartiles are also sorted by VIX averages into bands that expand and contract with VIX.
It gives us an idea of what levels to potentially expect resistance/support fairly well, but is designed to be used in conjunction with other indicators and macroeconomic information.
Green Dashed is your Expected Max Range (EMR+) based on Green Day averages.
Green Dotted is your Expected Range (ER+) based on full dataset averages.
Green solid lines are POS2 and POS1, based on Green Day averages.
White Dotted is your Expected Move (EM), based on full dataset averages.
Red solid lines are NEG1 and NEG2, based on Red Day averages.
Red Dotted is your Expected Range (ER-) based on full dataset averages.
Red Dashed is your Expected Max Range (EMR-) based on Red Day averages.
S&P Sector Advance/Decline Weighted -Tom1traderEnjoy, enhance your trading (I hope), copy or adapt to your needs and keep smiling!
Thanks to @MartinShkreli. The sector variables and the "repaint" option (approx lines 20 through 32 of this script) are used directly from your script "Sectors"
RECOMMENDATION: Update the sector weightings -inputs are provided. They change as often as monthly and the
annual changes are certainly significant. When updating weighting percentages use the decimal value. I.E. 29% is .29
Good on any time frame. Especially SPY, SPX and ES scalpers and 0DTE options traders may like this a lot.
This gives good signals on S & P and related (ES, SPY) and indicates / plots differently than the AD line or ratio.
Each sector's entire % weight is added or subtracted depending of whether that sector advanced or declined.
Example: Information Tech weight at 29% so that % of 500 (145) is added if InfoTech is up a penny and subtracted if it is
down a penny. All sectors processed the same way so that for a given bar/candle the value will be between +500 (all
sectors up) and -500 (all sectors down). This weighted AD line of sectors is scaled to +/- 350 and plotted as a red/green line
along with aqua/fuchsia columns of its 5 period ema. The line is actual sector behavior and the columns seem to make a
good signal with column zero crosses standing out.
The columns aqua / fuchsia are a 5 period ema of the Sector AD line and give pretty good signals at
zero cross for SPX. I colored the AD red green line also to emphasize the times it opposes the ema
for example the histo/colums zero cross signal is NOT true when the AD line is showing all or most sectors
going the other way.
For readability, the AD line itself is scaled to 350. This lets the columns of the ema stand out better. The hlines at
350 and at 175 give an idea for the AD green red line how much of the sector's weight is up or down.
350 is all sectors up (advancing) and -350 is all sectors down (declining). The hlines at +/- 175 seem to outline
a more or less "neutral" zone. For example in an uptrend with most of the AD level positive and the columns positive;
a negative spike that does not pass the -175 line and returns positive does not seem to impact the price as much as
a deeper negative spike.