Market Breadth EMAs V2Second version of Market Breadth EMAs for $SPY. Getting a little more complicated than V1 but removed noise.
Key:
Green line = % of stocks above their 20-period moving average, the "twitch line"
Red line = % of stocks above their 200-period moving average, the "long term trend"
White line = weighted average of the % of stocks above the 20/50/100/200 averages, the "general trend." Captures bursts that the 200 misses, and is more trustworthy than the 20.
Background colors = limits of the red/green/white where reversals have happened historically. The darker the color, the stronger the signal.
Histogram = the change in the white line over time, for different time periods: 1/4/10/20, the "trend strength/confidence." i.e. If the white line "General Trend" has been drifting lower for a month but started increasing the past 2 days, you might have 3 red histograms and 1 green one.
Techniques:
If the green, red, or white line is above 50%, then more than half the stocks are above that average. So, if they're in the top half, bullish market. Bottom half, bearish market.
If the green line is above the red, market has rising/bullish momentum. If red is above green, market has falling/bearish momentum.
If the white line is rising, bullish momentum. If it's falling, bearish momentum.
If the histograms are all green, there is strong momentum in that direction. The % of stocks above their important averages has been increasing each day for both the short term and long term.
If the histograms go from all green to a mix of green and red, be on the lookout for a reversal from one of the background levels. Usually initiates from the 20 (green line) first.
If price dips without the histogram changing, HODL.
Pesquisar nos scripts por "spy"
Dip BuyerThis was created for a friend and only has SPY in mind.
This indicator gives signals based on the previous All-Time High
Default values are
Watch Signal: 4% from ATH
Buy Signal: 5% from ATH
Stop Loss: 13% from ATH
All values are configurable
Triple CSWhat this indicator does:
This indicator will be scanning for ranges of extremity.
It measures multiple underlying factors in the financial markets like measuring levels of strength using RSI, momentum using Stochastics and extreme ranges using Bollinger Bands.
What is "extreme range" criteria: ranges above 70 or below 30 on RSI and Stoch are considered extreme, as well as moments of extreme volatility exceeding overbought and oversold levels on BBs.
All monitored data is to be plotted in a horizontal row, providing information about oversold, overbought and mid-range market conditions. This data will either meet the criteria simultaneously and plot a Red or Green indication or it will miss one or more requirements, plotting Gray indications.
This indicator is a real-time indicator, meaning it's updating live and due to this tracking in real-time, indications not yet 'printed' can give false readings. For performance purposes, it is best practice to allow all indication plots to 'print', meaning if a plot ever changes in color, it's best to allow that candle to fully close , ticking to 0:00 before confirming the accuracy of the indicator's findings.
How it works:
This indicator scans multiple sources of data simultaneously. When appropriate conditions within a trading range are met, the indicator will update it's color.
The indicator will plot Gray , Green , and Red indications which can be explained below.
-
Grey plots : No indication of full extremity, meaning one or more conditions being tracked has not met requirements, suggesting price is likely in mid-range.
-
Green plots : Extremity level lows have been simultaneously met, data indicates extreme oversold conditions are likely present.
-
Red plots : Extremity level highs have been simultaneously met, data indicates extreme overbought conditions are likely present.
What market will this indicator work on?
Stocks > Forex > Crypto
All the above are supported by this indicator.
Charts with more history have more data for the indicator to utilize. (Lack of data can result in poor performance.)
- This indicator performs best on 4H, 12H, D, and W timeframes, although you can use this indicator on any timeframe TradingView supports.
This indicator was created to find ranges of extreme trade which can help traders be more confident in their timing with the market.
Trading can be difficult, let an algorithm scan the market and monitor for early signs of volatility changes.
Past performance does not guarantee future results. Please do your due diligence when placing trades.
Market Breadth EMAsThis is the combined market breadth tickers: S5TW, S5FI, S5OH, and S5TH representing the percentage of S&P 500 stocks above their 20, 50, 100, and 200 EMA respectively. The colors go from green (20) to red (200) because if 20 crosses above the 200, the market's bullish, and if the 20 crosses below the 200, the market is bearish. So if green is on top = bull market. If red is on top = bear market. In general the market sentiment is whichever color is highest up.
The background is colored in depending on a few historical extremes in the 200. The darker the color the more significant the buy/sell signal. These can be adjusted by changing the hline's in the code.
Stock vs Index vs Vix (Adjusted)
Usually stocks move with Indexes and against Vix, so with this script you can compare and see how strong is the price movement of an asset.
Try to find what Index (e.g. SPY, QQQ, IWM) and Vix (e.g. VIX, VXN, RVX) fits better for selected symbol.
If price moving in the upper channel = price movement is strong.
If price moving in the lower channel = price movement is weak.
If price is stronger than Index and Vix = good sign.
If price is weaker than Index and Vix = bad sign.
Strong support and resistance lines are at 66.6 and 33.3
Disclaimer:
Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
The script is for informational and educational purposes only. Use of the script does not constitute professional and/or financial advice. You alone have the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
VIX Implied Move Bands for ES/Emini futuresThis script uses the close of the VIX on a daily resolution to provide the 'implied move' for the E-mini SP500 futures. While it can be applied to any equity index, it's crucial to know that the VIX is calculated using SPX options, and may not reflect the implied volatility of other indices. The user can adjust the length of the moving average used to calculate the bands, the window of days used to calculate the implied move, and the multiplier that effects the width of the bands.
8,21,40 EMA by gmubirdBest used with 1 min time frame. On a solid trend usually the candles with stay above the 8 ema while retesting it every 5-15 bars. If it breaks the 8 ema then look for it to test the 21 ema . The 21 is useful on the 5 min as well because a trending stock with sometimes test the 21 for support and bounce off. However if it breaks the 5min 21 ema it's probably going to break it's short term trend and maybe go side ways or reverse. The 40 ema is mainly useful in the 1min because it helps visualize the 5min 8 ema . This is the main tell for a solidly trending stock/ spy because they love to test this over and over through a trend. Just watch for a break of it because it means a kinda good chance of the end of a trend and a good time to sell.
SROC Crypto Index [upslidedown]The idea for this indicator is simple: Without a crypto index we want to somehow understand ROC across many assets. This will average out data across the top 5 (current) cryptos and provide a benchmark index.
I've recently been looking into momentum strategies more and how to utilize ROC as part of crypto trading. This indicator was born to fill a void as there is no great index like SPY for the crypto world.
Why would you do this? This gives a picture of overall market sentiment and allows you to move stock strategies that use an index to do things like tighten SL, take positions, move to cash, etc. into the cryptocurrency market.
The plotted line is super fat so you can plot individual lines and tell the index from the individual ticker apart. My suggestion is to pair this with a ROC or SROC for individual assets and to develop strategies from there.
Confluence CandlesThis indicator looks for confluence among three indicators (RSI, Stochastic, and MACD), a strategy popularized by Markus Heitkoetter in his book, “The PowerX Strategy: How to Trade Stocks and Options in Only 15 Minutes a Day”, and expands it to look for agreement on up to four symbols.
Each indicator is configurable in the settings, as well as the ability to choose which of the indicators are used.
Default Logic
Green Candles
RSI > 50
Stochastic > 50
MACD Histogram > 0
Red Candles
RSI < 50
Stochastic < 50
MACD Histogram < 0
When multiple symbols are selected, the above needs to be true for all selected symbols.
Example Use Cases
- Setting the indicator to the Nasdaq 100 (QQQ or NQ1!) while trading a stock that is part of that index such as AAPL or TSLA
- Setting the indicator to multiple indexes that tend to move together in order to trade one of them since they tend to make stronger moves when moving together (ex. SPY & QQQ, or ES1! & NQ1!)
- Setting the indicator to Bitcoin while trading a smaller crypto pair that moves as a sympathy play.
Tip
If you have trouble finding the full name for a specific instrument from an exchange such as BTCUSD from Coinbase, you can bring up TradingView’s “Symbol Search” pop-up modal, enter your search term, use the down arrow key on your keyboard to move the focus to the symbol you want, and you will see the full name in the search field such as “COINBASE:BTCUSD”.
Day Trading SPYThis script can be used to see a potential trend change, ride a trend and to scalp following the current trend.
Indicators:
- ATR (bright green/maroon) – is a longer term trend ATR line
- MA (green/red) - is a shorter term MA, where the fast MA is dotted and the long MA is a line
- Support and Resistance (white bold line) – long-term support and resistance areas
- Scalping signals (red/green) – small triangles above/below the candles bouncing off fast MA
- Black candles - oversized huge candles, which must be addressed carefully, especially when these candles change the trend per ATR, as with such huge candle – it is hard to determine where to place the stop-loss (if it is above/below the candle, since the candle is so big - it becomes a big risk). Also such candles may point to an unusual market moves. The size can be adjusted from 0.1 and up, it’s set to 1.4 by default, but it can be changed as needed. With such candles, it is best to wait and see what market does. If the black candle is following the ATR trend or changing the trend per ATR – wait for next 1-3 candles or so, usually those re-bounce in the opposite direction of the ATR trend, which allows you to open the position with a tighter stop-loss.
- Olive and Maroon candles – overbought and oversold candles per RSI (80/15 default) levels. At this levels just watch out for a potential soon reversal. Keep in mind, price may continue going oversold/overbought for a while, so look for additional confirmations.
1) ATR (long-term trend): The flag “Buy” and “Sell” signals (can set Alerts), which happens when the price is crossing through ATR line, marking a potential trend change. If ATR matches MA and ideally there is a breakout - open position in the direction of the signal and use the ATR line as your initial hard stop-loss until you reach the first price target / take first profit. It is best to use the most recent high/low pivot or a Fibonacci extension for the first price target. Once you take it – move SL to entry to secure the profits. If the trend continues and you take the next price target, you can use the fastMA (dotted line) as your dynamic stop-loss to ride the trend. Use the bold white line (long-term support and resistance) where price may certainly reverse where you can close your position completely if you day-trading Options.
2) MA (scalping): The small green and red triangles below/above the bars (can set Alerts), which appear when the price “touches” the fast MA (dotted line) and re-bounces from it with the candle matching the direction (bullish/bearish). Make sure ATR and MA are both going in the same direction for best results. This can be used to scalp for small profits or to jump into the trend. To minimize the risk, since you are jumping into the trend, I suggest placing your stop-loss slightly above/below the candle (the one which bounced off the fast MA). Price targets are similar – most recent high/low pivot or a Fibonacci extension. Same way, once you take the first profit/reach the first price target, move SL to entry and on the next price target – use the fast MA as your dynamic stop-loss.
If you don’t know how to divide up your position - here is an example on how I take profits between the price targets:
- Open position with buying a multiple of x4 contracts
- Sell ½ of the position at first price target and move my SL to entry
- Sell ½ of the remaining position at a second price target
- Sell the rest of the position at the third price target or sell ½ of it and use the fast MA as my dynamic stop-loss for the remaining of the position
Also, keep an eye on the breakouts, especially if they go along the ATR and MA trend and keep an eye on the volume, which may help confirming the direction of the price.
Relative Strength (IBD Style)This script is meant to give you a Relative Strength indication of the stock. The goal is to use a similar calculation as used by IBD.
It calculates the performance of the current stock for the last year (most recent quarter is weighted double) and compares it to the performance of a reference index or ticker (default is "SPY").
IBD would give you a value between 0 and 100 because this value is the percentile within all stocks. This is not possible with Pine Script at the moment.
So here you get a Relative Strength value that is >0 if the stock is stronger than the index and <0 if it is weaker than the index.
You can still compare the Relative Strength values between stocks (bigger is better) but you won't know which percentile it is right off the bat.
Relative StrengthPowerful tool to calculate and display the strength of a security compared to another security.
Some Main purposes are:
- finding new leadership in a market correction
- comparing a market leader with a top competitor
- tracking rotation in the market
.. and so much more!
This tool is highly configurable, you can especially change:
- The reference symbol (SPY, QQQ, BTCUSD, ...)
- The time span to indicate a new High or Low in a certain time-frame
- Factorize your RS-Chart to make it fit to the original chart. (Moves the chart up or down)
- Option to repaint your candles / bars when a new RS High occurs in the given timeframe.
Enjoy and have a great day!
Powerful_Trading
Sector PerformanceThis indicator shows real-time current day performance for 11 ETFs that divide the S&P 500 into eleven sector index funds. The list of different sector ETFs this indicator tracks is as follows -
1. SPY - S&P 500 Index
2. XLC - Communication Services
3. XLY - Consumer Discretionary
4. XLP - Consumer Staples
5. XLE - Energy
6. XLF - Financials
7. XLV - Health Care
8. XLI - Industrials
9. XLB - Materials
10. XLRE - Real Estate
11. XLF - Technology
12. XLU - Utilities
Acknowledgment - This indicator is adapted using the source code from another excellent performance indicator (). Thanks to BeeHolder (www.tradingview.com) for generously sharing the source code.
MarketLeadersSomeone asked me to script this for them and I was surprised at how well it worked
The idea is to check if the top 22 largest cap companies are above or below their MA
By default, the system uses a 20 MA, but you can set it how you want
It checks if the companies including, QQQ (NASDAQ) and SPY are above their MA's and updates the histogram
I've drawn in simple green price break lines to highlight areas of interest
I like this system because it's SO SIMPLE and it uses more data than just look at one stock, it reads the underlying market for the heavy movers.
If the big stocks are doing well, then the market should be doing well too, unless small caps are heavily stalling.
I've also created a strategy based around this and will be posting it soon
Relative Strength ComparisonThis indicator compares the difference in percentage change between two symbols
over a user-specified number of bars.
Default settings will show the difference between the current symbol and the
S&P 500 ETF (SPY) over 10 bars. It can be used to determine if the stock is
showing relative strength or weakness compared to the overall market.
Vix Jump for Selling Puts or Buying CallsThis script aims to identify optimal times when to write Puts for premium, for example using the SPX Weeklies model or simply buying Calls. Not perfect but provides some additional confidence when playing Puts on SPX or the Wheel on SPY.
What it does:
We compare current VIX with a lookback VIX for X% delta. If there is a jump of say 20% over a defined period then that would indicate an opportunity to sell Puts, run a straddle or buy Calls. We use VVIX as a check to stop to many false positives ie VVIX falls of faster than VIX.
You can also use this loosely as a bottom finder.
VixFix Bridge BandsThis is an implementation of the Bridge Bands applied to the VixFix . Idea would be that when VixFix is above trend you'd want to be risk off, below trend you'd want to be risk on.
I just threw it together real quickly, but at first glance it appears to be a nice complement to the Bridge Bands.
On SPY and AAPL it handles the September drawdown quite nicely. (February as well for AAPL)
SPX Options Days Drop By DeltaSimple script that uses the percentage drop for a particular options delta and DTE to show how often you would be assigned on selling cash secured Puts (or naked Puts). Calculate the estimated percentage drop by finding your desired delta in the options chain and divide that price by the current price. For example a Delta of 10% could be $4055 with a current price of $4161 on a given day. The price differential is 2.5%. We test for how many times a 2.5% drop is encountered for our days to expiry (DTE) as this will be the number of times you would be assigned for that position. The lower the Delta the more the price has to drop ie a Delta of 7% would require a 4% drop etc. Objective is to NEVER be "assigned" and make "fee money" selling premium ie Puts.
SPX options expire 3 times a week as do SPY options
SPX options use the European model
SPX options settle in cash ie you are not assigned
NOTE: If you change your DTE you change your Delta and therefore your percentage differential.
Spread AnalyzerThis script plots the relative performance of the viewed security with respect to a selected benchmark. It can be used to identify assets higher than market average potential.
- The plot above is the relative volume.
- The plot below is the relative performance.
Computation is done by applying stochastic to the spread of the asset's current price/obv value to the benchmark defined by the Part1, 2 and 3.
The benchmark can be a portfolio as well:
Part1 = 4*SPY+2*QQQ
Part2 = XAUUSD+EURUSD
-PS: Each part may contain up to 10 symbols.
- The spread is calculated with the following formula
close / (Part1 + Part2 + Part3)
- Color code is based on the stochastic of macd of the spread.
The inputs:
length : lookback length for the stochastic
lenk : Smoothing factor(K) for stochastic
lend : EMA length(D)
MACD Fast / Slow / Smooth : MACD parameters used to determine the color code
MS CRB/SPYThis indicator tracks the GSCI Commodity Index over the course of the S&P 500. This is used for the fundamental evaluation of ratios of asset classes to each other. The thesis is based on Ray Dalio's quadrant theory: in periods without inflation and with good growth, stock prices rise and commodity prices fall. Conversely, in periods of good growth in an inflationary environment, commodities rise and the rise in equities slows. In particular, there is a change of favorites towards companies that produce cash (i.e. away from growth fantasies). This indicator shows the change in valuations between asset classes and thus allows conclusions to be drawn. This still goes far beyond what has been written, I recommend reading Ray Dalio's works on this.
Max GainThis indicator is meant to be used for coming up with price targets based on past performances of rallies/selloffs.
It shows how much a trade could have made over a 30-day period (or other length of time) in terms of percentage gain.
It also show how much could have been lost in terms of percentage loss
The green plot shows percentage gain from current high to the low of the previous 30 days.
The red plot shows adjusted percentage loss from current low to the high of the previous 30 days.
The 30 can be adjusted and the chart can be used on any time interval.
Note on max loss adjustment:
Max loss percentage is adjusted to be higher to account for the fact that a percentage loss corresponds to a percentage
gain of a greater amount. For instance, a loss of 25% can only be recovered with a percentage gain of 33%.
A 25% loss looking at the chart from left to right would be a 33% gain looking at the same price
action from right to left. In order to compare apples to apples visually and performance wise, max loss percent needs to be adjusted.
The actual max loss percent is calculated and plottable but is not plotted by default because it is less useful and adds clutter.
There is not a great difference between actual max loss and adjusted max loss under everyday market conditions, but
major selloffs (SPY 2020), short squeezes (GME 2021), or other unusually directional moves will display percentage losses
that, in absolute terms, should be considered to be fairly incorrect. The adjusted percentages are good indicators of
relative performance when comparing the magnitudes to the magnitudes of the max gain percentages and
are more visually meaningful than the actual max loss percentages in every situation, so they are plotted despite having incorrect values.
Note on bear markets:
This indicator was designed for bull markets but should it be used in bear markets the indicators that are and aren't
plotted should be swapped using the plot check boxes in the settings dialogue if there is interest in using the loss percentages
for actual loss amount calculations while maintaining visual/performance adjustment
As can been seen in the example chart a gain of 16.3% to 17.1% appears to be a resistance level. This level was recently broken through and the next resistance is 24.5%.
The target is a 24.5% gain from the anticipated 30-day low at the time when the price can be expected to reach a 25.4% gain at the gain rate observed in recent rallies.
Previous rallies are shown for reference with their 30-day periods and corresponding gain percentages which are plotted below.
A selloff is shown in red for reference as well. It was drawn backward to trick the tool into thinking it was a gain, so as to demonstrate logic behind the adjustment.
In reality, this was closer to a 9.5% loss, not 10.55%.
I am still experimenting with this indicator to see how to best use it. Ultimately, it helps me do what I was already doing with the percentage gain tools
but now I can do those analyses in a more systematic manner and with charting. Please feel free to ask questions.
Volatility barometerIt is the indicator that analyzes the behaviour of VIX against CBOE volaility indices (VIX3M, VIX6M and VIX1Y) and VIX futures (next contract to the front one - VX!2). Because VIX is a derivate of SPX, the indicator shall be used on the SPX chart (or equivalent like SPY).
When the readings get above 90 / below 10, it means the market is overbought / oversold in terms of implied volatility. However, it does not mean it will reverse - if the price go higher along with the indicator readings then everything is fine. There is an alarming situation when the SPX is diverging - e.g. the price go higher, the readings lower. It means the SPX does not play in the same team as IVOL anymore and might reverse.
You can use it in conjunction with other implied volatility indicators for stronger signals: the Correlation overlay ( - the indicator that measures the correlation between VVIX and VIX) and VVIX/VIX ratio (it generates a signal the ratio makes 50wk high).
Relative Strength 52 WeeksRelative strength plot that compare strength to SPY (changeable to whatever you want)-
Small orange suns marks the 52 week high on the strength line
Color coded EMA 22 line shows the overall trend of the strength
Momentum Rotation Indicator [CC]I have developed this custom indicator very loosely based on the Sector Rotation Model (Giorgos E. Siligardos. Technical Analysis of Stocks & Commodities, August 2012) and I called it the MRI because this is essentially a brain scan of any particular stock. This will not only tell you when a stock is breaking out over the market at large but also how the stock is doing compared to its own history. Buy when the line turns green and sell when the line turns red.
Let me know if there are any other indicators you would like to see me publish!