XPloRR S&P500 Stock Market Crash Detection Strategy v2XPloRR S&P500 Stock Market Crash Detection Strategy v2
Long-Term Trailing-Stop strategy detecting S&P500 Stock Market Crashes/Corrections and showing Volatility as warning signal for upcoming crashes
Detecting or avoiding stock market crashes seems to be the 'Holy Grail' of strategies.
Since none of the strategies that I tested can beat the long term Buy&Hold strategy, the purpose was to detect a stock market crash on the S&P500 and step out in time to minimize losses and beat the Buy&Hold strategy. So beat the Buy&Hold strategy with around 10 trades. 100% capitalize sold trade into new trade.
With the default parameters the strategy generates 10262% profit (starting at 01/01/1962 until release date), with 10 closed trades, 100% profitable, while the Buy&Hold strategy only generates 3633% profit, so this strategy beats the Buy&Hold strategy by 2.82 times !
Also the strategy detects all major S&P500 stock market crashes and corrections since 1962 depending on the Trailing Stop Smoothness parameter, and steps out in time to cut losses and steps in again after the bottom has been reached. The 5 major crashes/corrections of 1987, 1990, 2001, 2008 and 2010 were successfully detected with the default parameters.
The script was first released on November 03 2019 and detected the Corona Crash on March 04 2020 with a Volatility crash-alert and a Sell crash-alert.
I have also created an Alerter Study Script based on the engine of this script, which generates Buy, Sell and Volatility signals.
If you are interested in this Alerter version script, please drop me a mail.
The script shows a lot of graphical information:
the Close value is shown in light-green. When the Close value is temporarily lower than the Buy value, the Close value is shown in light-red. This way it is possible to evaluate the virtual losses during the current trade.
the Trailing Stop value is shown in dark-green. When the Sell value is lower than the Buy value, the last color of the trade will be red (best viewed when zoomed)
the EMA and SMA values for both Buy and Sell signals are shown as colored graphs
the Buy signals are labeled in blue and the Sell signals are labeled in purple
the Volatility is shown below in green and red. The Alert Threshold (red) is default set to 2 (see Volatility Threshold parameter below)
How to use this Strategy?
Select the SPX (S&P500) graph and add this script to the graph.
Look in the strategy tester overview to optimize the values Percent Profitable and Net Profit (using the strategy settings icon, you can increase/decrease the parameters), then keep using these parameters for future Buy/Sell signals on the S&P500.
More trades don't necessarily generate more overall profit. It is important to detect only the major crashes and avoid closing trades on the smaller corrections. Bearing the smaller corrections generates a higher profit.
Watch out for the Volatility Alerts generated at the bottom (red). The Threshold can by changed by the Volatility Threshold parameter (default=2% ATR). In almost all crashes/corrections there is an alert ahead of the crash.
Although the signal doesn't predict the exact timing of the crash/correction, it is a clear warning signal that bearish times are ahead!
The correction in December 2018 was not a major crash but there was already a red Volatility warning alert. If the Volatility Alert repeats the next weeks/months, chances are higher that a bigger crash or correction is near. As can be seen in the graphic, the deeper the crash is, the higher and wider the red Volatility signal goes. So keep an eye on the red flag!
Here are the parameters:
Fast MA Buy: buy trigger when Fast MA Buy crosses over the Slow MA Buy value (use values between 10-20)
Slow MA Buy: buy trigger when Fast MA Buy crosses over the Slow MA Buy value (use values between 21-50)
Minimum Buy Strength: minimum upward trend value of the Fast MA Buy value (directional coefficient)(use values between 10-100)
Fast MA Sell: sell trigger when Fast MA Sell crosses under the Slow MA Sell value (use values between 10-20)
Slow MA Sell: sell trigger when Fast MA Sell crosses under the Slow MA Sell value (use values between 21-50)
Minimum Sell Strength: minimum downward trend value of the Fast MA Sell value (directional coefficient)(use values between 10-100)
Trailing Stop ATR: trailing stop % distance from the smoothed Close value (use values between 2-20)
Trailing Stop Smoothness: MA value for smoothing out the Trailing Stop close value
Buy On Start Date: force Buy on start date even without Buy signal (default: true)
Sell On End Date: force Sell on end date even without Sell signal (default: true)
Volatility EMA Period: MA value of the Volatility value (default 15)
Volatility Threshold: Threshold value to change volatility graph to red (default 2)
Volatility Graph Scaler: Scaling of the volatility graph (default 5)
Important : optimizing and using these parameters is no guarantee for future winning trades!
Strength
ComptonHelps to sort through different intervals to find matching price vs indicator patterns. Works well on ALTs and STOCKS too. You will find that the level on Compton will signal strength of the asset in a different way than RSI. Patterns and momentum are very important.
RPI (Relative Price Index)This is a free indicator created by Stormpike Group that displays the relative price of an underlying for the given period.
Bias And Sentiment Strength (BASS) Indicator by mattzabBias And Sentiment Strength (BASS) Indicator is designed to be a quick visualization as to the market strength.
Pair with Alligator, MACD, or Moving Average lines on your chart for good results.
How to use this indicator:
Blue above 0 is positive sentiment, red below 0 is negative sentiment.
If you have blue above and red below, be cautious! The Bass is telling you that we have a battle between the Bulls and the Bears!
The purple bars are your volume bias. Volume bias can be positive or negative, despite the direction of the overall trend. Positive Volume Bias along with Bullish Blue Sentiment is a great sign! Go Long! If you have Bullish Sentiment and have a negative Volume Bias, be cautious! Price may not be moving with much conviction, and may be subject to reversal!
This is basically several different histograms overlaying one another, and they are blue above 0 and red below 0.
MACD Histogram - Standard MACD Histogram here.
RSI Histogram - This is a standard RSI. It has been adjusted to "oscillate" above and below zero, which would be the 50 line on a normal RSI chart.
Slow Stochastic Histogram - This is a slow stochastic with a 21 Period K, 14 Period D, and 14 Smoothing K. The "oscillator" histogram is formed by subtracting K from D.
Awesome Oscillator - This is a standard Awesome Oscillator
Alligator Oscillator - This is formed by adding (lips + teeth) + (teeth - jaw)
Volume Bias - The Volume Bias is displayed as purple bars, and is calculated by a highly sophisticated and complex algorithmic function called subtraction. It's just the 30 Period Volume-Weighted Moving Average Minus the 30 Simple Moving Average.
Enjoy!
Growing or Waning Patterns [Alerts]Example how to color patterns of 3 bodies growing or waning by percentage with or without trend. Also included option for alert triggers. The yellow triangles on the chart denote where the alert triggers will fire.
• Choose Pattern Of Filter: shows bodies growing or waning or both.
• Sample Lengths Of AvgBar: number of recent bars to use for average size.
• BigBar Is Min% Of AvgBar: the minimum percent of average the big bar must be.
• MedBar Is Max% Of BigBar: the maximum percent of big bar the medium bar can be.
• SmlBar Is Max% Of MedBar: the maximum percent of medium bar the small bar can be.
• Repeat Pattern If n Bars: the number of bars to ignore repeat patterns, 1 allows all.
• Trending: on requires the growing or waning patterns to also be trending.
• GrayBars: colors non pattern bodies gray.
NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
CryptocurrencyImpulse v11// TTPro CryptocurrencyImpulse is a crypto strength meter that shows us which currencies are
// strong or weak on any chosen timeframe. Buying into strength and selling into weakness is the key.
// We have an advantage with this indicator in seeing strength and weakness at a glance and also
// in being able to spot reversal opportunities when the lines cross over.
Uber ASH - Absolute Strength Histogram [UTS]The Absolute Strength Histogram is an indicator that measures the current strength in market.
If the red line crosses the green line the bears are in control. If the green line crosses the red the market is in favor of the bulls.
General Usage
Signals are created on line cross. They that can be used to EXIT or LONG/SHORT a trade.
It is worth investing the time and fine-tune the settings: e.g. SuperSmoothed 16 and HMA 40 provides decent results.
The colored histogram visualizes if any "strength" is existent and if a trend reversal can become more likely.
Alerts
Traders can easily use the reversal signal to trigger alerts from:
Cross Up
Cross Down
Those values are > zero if a condition is triggered.
Alert condition example: "Cross Up" - "Greater Than" - "0"
Calculation methods
The market “strength” can be calculated in three different ways:
ADX
RSI
STOCHASTIC (default)
Moving Averages
16 different Moving Averages are available:
ALMA (Arnaud Legoux Moving Average)
DEMA (Double Exponential Moving Average)
EMA (Exponential Moving Average)
FRAMA (Fractal Adaptive Moving Average)
HMA (Hull Moving Average)
JURIK (Jurik Moving Average)
KAMA (Kaufman Adaptive Moving Average)
Kijun (Kijun-sen / Tenkan-sen of Ichimoku)
LSMA (Least Square Moving Average)
RMA (Running Moving Average)
SMA (Simple Moving Average)
SuperSmoothed (Super Smoothed Moving Average)
TEMA (Triple Exponential Moving Average)
VWMA (Volume Weighted Moving Average)
WMA (Weighted Moving Average)
ZLEMA (Zero Lag Moving Average)
A freely determinable length allows for sensitivity adjustments that fits your own requirements.
Uber REX Oscillator [UTS]The Rex Oscillator measures market behavior based on the relationship of the close to the open, high and low values of the same bar. A big difference between the high and close on a bar indicates weakness, and wide disparity between the low and close indicates strength. The difference between open and close also indicates market performance.
When the Rex Oscillator turns positive in a bearish trend, a reversal is indicated. Likewise, Rex turning negative in a bull market indicates a reversal to the downside.
General Usage
The Rex Oscillator is mostly used as a Reversal and Exit indicator.
Signals are created when Rex is crossing the Signal line. They that can be used to EXIT or LONG/SHORT a trade.
It is worth investing the time and fine-tune the settings: e.g. SuperSmoothed 16 and HMA 40 provides decent results.
Moving Averages
16 different Moving Averages are available:
ALMA (Arnaud Legoux Moving Average)
DEMA (Double Exponential Moving Average)
EMA (Exponential Moving Average)
FRAMA (Fractal Adaptive Moving Average)
HMA (Hull Moving Average)
JURIK (Jurik Moving Average)
KAMA (Kaufman Adaptive Moving Average)
Kijun (Kijun-sen / Tenkan-sen of Ichimoku)
LSMA (Least Square Moving Average)
RMA (Running Moving Average)
SMA (Simple Moving Average)
SuperSmoothed (Super Smoothed Moving Average)
TEMA (Triple Exponential Moving Average)
VWMA (Volume Weighted Moving Average)
WMA (Weighted Moving Average)
ZLEMA (Zero Lag Moving Average)
A freely determinable length allows for sensitivity adjustments that fits your own requirements.
Alerts
Traders can easily use the reversal signal to trigger alerts from:
Cross Up
Cross Down
Those values are > zero if a condition is triggered.
Alert condition example: "Cross Up" - "Greater Than" - "0"
Trend Visualization
Optional: If the signal line trend direction is DOWN it is painted red. If the trend direction is UP the signal line is painted in green.
[GM PRO] ASH+The Absolute Strength Histogram with built in strategy tester to help you find optimum trade entries, and best parameters for your System.
Includes
- Backtest start date
- Backtest end date
- Money Managment (percent risk, stop loss and take profit distance and ratio).
- Fully Featured Absolute Strength Histogram - with many MA modes and options.
The indicator comes with default settings. It is up to you to fine tune and find the optimal settings for the market you trade.
Coming Soon - Full fledged Algorithms - including entries, exits, and volatility/volume filters to keep you out of those choppy sideways markets. Look for the GM ELITE tag.
Direction&Strength Indicator
This simple Indicator shows:
(1) The D irection of a trend
(2) The S trength of a trend
hence the name "Direction & Strength Indicator.
How to read this Indicator:
Indicator above "resistance area" => strong UP trend
Indicator above 0 .................. => weak UP trend
Indicator below 0 .................. => weak DOWN trend
Indicator below "resistance area" => strong DOWN trend
Notice that this is a time-lagging indicator. Severity of timelag depends on set period of the indicator!
You can also identify overbought and oversold areas. (Tip: Compare to RSI.)
Bar Strength Index (BSI) by CryptorhythmsBar Strength Index (BSI) by Cryptorhythms
Intro
BSI is an totaly new and original indicator derived from Internal Bar Strength. It can be classified as similar to an RSI, but its method of calculation is very different so it sometimes gives an edge where RSI does not.
In the chart I have included RSI (red line) as a comparison for you to contrast BSI with.
Description
The formula for Internal Bar Strength is:
IBS = (close - low) / (high - low) * 100
The original IBS and thus this derivitive (BSI) are meant for higher timeframe analysis. Working best on daily, weekly or monthly charts. I take that original IBS formula and create something smoother and easier to understand - The Bar Strength Index !
Options
💠There is an option for smoothing which I recommend using.
💠Also options to make the scaling adaptive, or to leave it static.
💠A normalization option is available to create a bounded oscillator (easier for alerts/algos).
💠You can choose an MA type and length to create a signal line for it as well.
💠Lastly I also included the ability to setup overbought and oversold zones for better alert creation possibilities (crossovers / crossunders).
👍 We hope you enjoyed this indicator and find it useful! We post free crypto analysis, strategies and indicators regularly. This is our 77th script on Tradingview!
Rúnar V2 - Trend Strength, Confirmation and ExhaustionHi guys,
So after a lot of feedback on the initial Runar script, I have finally completed V2 as per your feedback. The original script had some issues with repainting as this is a multi-time frame script and the periods we included on the original were far too large. This actually addresses the other issue of the script originally being quite slow or very specific around which dots/signals it would print. The new script is therefor a lot more reactive and responsive to market behavior especially crypto.
I have re-introduced the Certainty score as a result for you to modify and play with. Right now its set to its highest variable, but you can choose lower. I recommend no lower than 2 as dots prints will become meaningless to me but may be helpful to others.
How to use the indicator:
Something I get asked a lot, so lets break it down in full. The indicator comes with two primary areas and two secondary. The first two primary is the actual waves we see in the center oscillating around 0. These waves measure market direction and strength and will print a dot (its secondary) to signify a larger move. This makes some qualities of Runar predictive, but remember sudden moves will not be picked up on higher time frames.
The color of the wave will signify the color of the dot. We will not currently get a green dot printing during a red wave. This is intentional to avoid flip flopping too much during market movement and allows us to confidently follow trend instead.
The second part of the indicator consists of the top 3 lines osculating between 0 and 100. This part of the indicator measures the markets expansion and volatility allowing us to spot early exhaustion during trend. The indicator consists of three lines and when all 3 read over 95 we can begin looking for a bottom or reversal. Its secondary area are the solid lines (green/red) at the bottom of the indicator to make spotting these potential areas easier and to keep an eye on the market/orderbook/other indicators to spot the exhaustion.
A green line will print during downtrends and a red line during up trends as this is intended to align with the traditional buy/sell colours.
Finally the indicator comes with alerts for dot prints or a line print so you are free to set these up however you wish. My recommended time frames are 15m/1/2/4H with scalpers welcome to go as low as the 1min.
[STRATEGY] Jurik RSXA private strategy from the Profitable Jurik RSX preview for backtesting purposes.
(8) Closing Score VS-345Closing Score discloses to traders the sentiment of the traders in control of the current price. If we can accurately determine trader’s sentiment, we can determine where the market is heading.
Closing Score utilizes a very simple concept and formula to determine the trader's collective sentiment. The formula (((Close – Low) / (High – Low) * 100)) produces a range that is extracted from the true range of the stock’s activity. The High to the Low within the time frame / bars you have chosen. The final output of the formula produces a finite score, between 0 and 100 that indicates to the trader, what the sentiment of the traders where, at the conclusion of this bar or at the end of the trading day. This is displayed on a graph with 10 horizontal stratifications (shown below) each representing 1/10 of the indicators total range of 100. The final dots utilized to indicate the output of this indicator are then rounded to allow placement within the graphs stratification.
The closer the indicator's outputted signal comes to either extreme, zero or 100, the stronger the correlation is between the closing score and future price movements. 97 to 100 are very strong positive signals. 0 to 3 are very negative signals and both have been validated as statically significant, Three-Sigma-Signals. Additionally, we have added an interior band within the placement of the dots to indicate that their proximity is within 3% of the extreme reading of this indicator. If the volume is above the 14 day moving average it is indicated by placing a dot within the center of the indicator dots to denote a volume confirmation of this specific indicators signal. Dots that are both within the statistically relevant, extreme range and the volume for these bars were above the 14 day moving average produce a bulls-eye.
If you study or use candlestick analysis in your trading, you can think of Closing Score as an automatic candle stick analysis tool. Take a look at any candlestick pattern and compare the point of the closes in that pattern with its corresponding closing score and you will see a very strong correlation, greater than 95%, between what the Closing Score indicates and what the candlestick pattern is indicating.
There is an in-depth explanation of this indicator on our website as well as multiple resources related to understanding trader emotions and sentiment. This indicator was published in the Journal of Technical Analysis of Stock and Commodities; June, 2016 by Michael Slattery.
Access this Genie indicator for your Tradingview account, through our web site. (Links Below) This will provide you with additional educational information and reference articles, videos, input and setting options and trading strategies this indicator excels in.
Absolute Strength Index OscillatorChanged values to better match the scale.
Ported to pinescript v4.
Hashem DMI/ADXThis indicator will time Breakouts.
DMI+ (DMI Plus) = Blue = Buying Pressure.
DMI- (DMI Minus) = Pink = Selling Pressure.
ADX = Overall strength of a Trend. White = Trend is strong and gaining momentum, Gray = Trend is Weakening.
Can apply same logic for Divergences on DMI+ and DMI- lines.
MAJESTIC {EMA}The thickest blue line is the Momentum oscillator
The lime colored line is the Acceleration oscillator
The red colored line is the Jerk oscillator
This is the {EMA} implementation.
~JuniAiko
(=^~^=)v~
MAJESTIC {SMA}The thickest blue line is the Momentum oscillator
The lime colored line is the Acceleration oscillator
The red colored line is the Jerk oscillator
This is the {SMA} implementation.
~JuniAiko
(=^~^=)v~
AntiRekt Trend OscillatorWhen the indicator value is above the horizon line the trend is up, below the trend is down. Watch out for ranging markets.