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
SPX (S&P 500 Index)
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 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.
Balance of Power Heikin Ashi Investing Strategy Balance of Power Heikin Ashi Investing Strategy
This is a swing strategy designed for investment help.
Its made around the Balace of Power indicator, but has been adapted on using the Monthly Heikin Ashi candle from the SPY asset in order to be used with correlation for US Stock/ETF/Index Markets.
The BOP acts as an oscilallator showing the power of a bull trend when its positive and a bearish trend when its in negative. At the same time we can spot reversals, based on the percentiles ( 99/1)
The rules for entry :
For long : The 99 percentile is ascending, and we are either in a positive value (>0), or we crossed the bottom place ( -0.35)
For short : the 99 and 1 percentile are descending, and we are either in a negative value(<0), or we crossed down the top place ( 0.6)
If you have any questions please let me know !
Stock Gaps SPY Correlation StrategyThis is daytrade stock strategy, designed to take the best out of the daily gaps that are forming between the close of previous day and opening of present day.
At the same time its logic has been adapted for SPY chart, in order to use correlation with the other stocks/assets/ etf which are linked with SP500 movement.
Lastly it has been added 2 new confirmation logics, based on the USI: advance/decline chart and percentage above vwap among all US stocks.
The rules for entry are simple :
We are at the opening daily candle, we have a long/short gap based on where the opening is happening and at the same time we are checking to see that the current different between the current difference between low and previous high (or viceversa) is higher than an established parameter(minimal deviation )
For exit, we exit based on time/clock parameter, in this case by default I selected 1h and half before close of the US session.
For testing purposes I have used 10% of the available capital, with a 0.0035$ comission per each share bought ( IBKR comissions)
If there are any questions, please let me know either here or in private !
VWAP Push StrategyThis strategy is unfortunately not finished yet.
A pretty simple strategy. If price broke through VWAP and had three consecutive candles following the breakthroughs trend, the high of the third candle will be drawn. If this happened after a crossover of the vwap and price breaks through the high of the third candle, strategy will go long. Short will be the same after crossing under the vwap. A long or short will be closed after crossing the vwap in the opposite direction, so the vwap is kind of a trailing stop.
Unfortunately, I could not manage to stop the script from entering multiple times into one drawn high or low. Of course, if a high was crossed the script should wait for a new formed high before entering a new long. If someone would find a solution to this, it would be great, because I think it is a nice strategy .
Should work great scalping 5min charts (when scripting, I used the SPX for reference).
[Pt] TICK Supertrend Strategy, 5 minBackground:
It is well known that the indices such as SPY and QQQ follow/represent market sentiment. The TICK index literally represents the market sentiment as it compares the number of stocks that are rising and falling on the NYSE. By default, the TICK index is a short term indicator. Therefore it isn't reliable for swing trading or long term strategies. However, it is perfect for scalping.
Although TICK is well known, many does not know how to use it effectively. As part of the background mechanism of this script, I’ve divided TICK into 5 major zones based on the close of each candle: Overbought (neutral with bearish bias), Bullish, Neutral, Bearish, and Oversold (neutral with bullish bias). Along with the use of Heikin Ashi technique, RSI, moving averages and candle analysis, this strategy aims to provide accurate representation of market sentiment and profitable entry and exit points. *** At the time of publication, this strategy has proved to be consistently profitable. HOWEVER, this DOES NOT guarantee future profitability. So use at your own risk! ***
What is it showing?
This strategy is an intraday scalping strategy that uses TICK data to predict market directions for optimal entry and exit points. It is displayed similarly to the famous Supertrend indicator, which is one of the most common ATR based trailing stop indicators, so visually it is easy to read. This strategy is suitable for trading indices such as SPX , SPY , SPX500USD , QQQ , DJI and any other tickers that have high positive correlation with TICK.
Script is proprietary, but as mentioned it incorporates the following elements with additional candlestick analysis, pattern recognition, stop-loss and profit taking strategy:
- NYSE TICK data
- Heikin Ashi candle technique
- ATR
- RSI
- Moving Averages
Bullish trend is determined by a confluence of said indicators and analyses, and is displayed as a green line under the price action. The distance is defined by an adjustable value that is based on a percentage of the previous daily ATR value. When a long order is in play, that line also acts as the stop-loss level. Bearish trend is the opposite and is displayed in red, by default.
What's unique?
Detecting a ranging market structure and avoiding overtrading in a choppy market has always proven to be difficult, even for the most professional traders. This strategy has built-in “choppiness” and volatility filtering scripts that attempts to help reduce the number of false entries. These elements are what makes this strategy unique and different from other indictors mashup strategies.
In addition, this strategy takes previous trades into account and “learn” from past trades when determining the optimal stop-loss level to maximize profitability. This allows this strategy to better adapts to changing and evolving market conditions.
Strategy statistics
All parameters are designed for 5min time frame.
At the time of publication, this strategy has proved to be consistently profitable through limited back testing data.
Initial capital = $10000
Pyramiding = 1
Slippage = 3 ticks to account for spread
Default leverage shown = 9x
Quantity per trade = 100% of account
Back testing period at time of publication = Apr 11, 2022 - July 22, 2022
Trading Session = 1000 - 1530 Mon-Fri
Timeframe = 5 min
Gain = 1338.48%
Total trades = 253
% Profitable = 45.85%
Profit Factor = 2.506
Max Drawdown = 19.36%
Extras
This release includes default AutoView alerts for trading SPX500USD on Oanda. It includes both long and short order entry alerts, and trailing stop-loss alerts.
Please DM for free trial.