BUY/SELL + ADVANCE DECLINEThis script is a custom trading view indicator that helps to identify potential buy and sell signals based on the RSI (Relative Strength Index) and SMA (Simple Moving Average) indicators. The script also identifies potential reversals using a combination of RSI and price action. It plots buy, sell, and reversal signals on the chart along with an SMA line. Additionally, it provides alerts based on the buy, sell, and reversal conditions.
Changes made to the original script:
Fixed the undeclared identifier 'c' error by calculating the difference between the current closing price and the previous closing price: c = close - close .
Added an "ADD Value Floating Label" to the chart. The label shows the difference between the current and previous closing prices (ADD value) along with a "Bullish" or "Bearish" indicator based on the value of 'c'. The label is positioned at the top right of the visible chart area and remains static.
Here's a summary of the major components of the script:
Input settings: Define the input parameters for RSI and SMA.
Calculation of RSI and SMA: Compute the RSI and SMA values based on the input parameters.
Color definitions: Define colors for different conditions and levels.
Condition definitions: Define various conditions for buy, sell, reversal, and other criteria.
Buy and sell conditions: Determine buy and sell signals based on RSI, SMA, and price action.
Reversal conditions: Identify potential reversals using RSI and price action.
Plot signals: Display buy, sell, and reversal signals on the chart.
Bar colors: Color the bars based on the identified signals.
Plot SMA: Display the SMA line on the chart.
Alert conditions: Set up alerts for buy, sell, and reversal conditions.
ADD Value Floating Label: Add a label to the chart showing the ADD value and a "Bullish" or "Bearish" indicator.
ADD
ADD 2This is a modification to the original ADD script by Tom1trader
I added the option to choose the timeframe, moving average type and length.
Note from the original script:
"This is the NYSE Advancers - decliners which the SPX pretty much follows. You can chart it like any index (ADD -NYSE $ADV MINUS $DECL) but I find it more useful in a separate panel with colors for direction.
The level gives an idea of days move (example: plus or minus 500 is not much movement through the session) but I follow the direction as when more stocks advance (green) or decline (red) the index tends to track it pretty closely.
On SPX , SPY and correlates - very useful for intra-day trading (Scalping or 0DTE option trades) but not for higher time frames at all. If you chart the ADD in a chart and compare 5 minute to daily you will see what I mean."
4C NYSE Market Breadth RatioThe NYSE Market Breadth Ratio is considered by some to be the “king” of market internals. It lets you know instantly how strong current buying or selling pressure is in the broad market, to eliminate guessing or opinion.
This indicator plots the Market Breadth Ratio values for the NYSE and the NASD exchanges in real time.
It also plots the NYSE Market Breadth Ratio in a histogram plot for visual reference.
The indicator dynamically changes colors between green and red depending on whether breadth is currently positive or negative.
This indicator divides the 'Up-Volume' ("UVOL") by 'Down-Volume' ("DVOL"), for each exchange.
It can be added to any chart, but is incredibly useful when added to other sources of market internals like the NYSE Advancers/Decliners Difference (ticker ADD) or with the NYSE UVOL / DVOL Difference (ticker VOLD ).
Credit goes to author=@auron9000 as the bulk of this code was from their Breadth Ratio Bubbles indicator.
---> The changes made to their indicator include: bug fixes where the values werent properly updating; fixed indicator to be a separate plot (not chart overlay), and added the histogram plot.
ADD for SPX intraday (NYSE Adv-Decl) -Tom1traderThis is the NYSE Advancers - decliners which the SPX pretty much follows. You can chart it like any index (ADD -NYSE $ADV MINUS $DECL) but I find it more useful in a separate panel with colors for direction.
The level gives an idea of days move (example: plus or minus 500 is not much movement through the session) but I follow the direction as when more stocks advance (green) or decline (red) the index tends to track it pretty closely.
On SPX, SPY and correlateds - very useful for intra-day trading (Scalping or 0DTE option trades) but not for higher time frames at all. If you chart the ADD in a chart and compare 5 minute to daily you will see what I mean.
I left it at 5 minutes timeframe which displays well on any intraday chart. You can change it by changing the "5" in the security function on line 13 to what you want ("1" 1 minute, "15" 15 minutes) or change it to timeframe.period (no quotes) so that it will follow the timeframe of the current chart. I like 5 min as it displays better on higher timeframes i.e. 15 min. or hour.
A simple moving average with a length of 10 is added to help gauge momemtum.
Hope this helps with trading or scripting ideas, questions or feed back welcome. Keep Smiling.
Market Internals [Makit0] MARKET INTERNALS INDICATOR v0.5beta
Market Internals are suitable for day trade equity indices, named SPY or /ES, please do your own research about what they are and how to use them
This scripts plots the NYSE market internals charts as an indicator for an easy and full visualization of market internal structure all in one chart, useful for SPY and /ES trading
Description of the Market Internals
- TICK: NYSE stocks ticking up vs stocks ticking down, extreme values may point to trend continuation on trending days or reversal in non trending days, example of extreme values can be 800 and 1000
- ADD: NYSE stocks going up vs stocks going down, if price auctions around the zero line may be a non trend day, otherwise may be a trend day
- VOLD: NYSE volume of stocks up vs volume of stocks going down, identify clearly where the volume is going, as example if volume is flowing down may be a good idea no to place longs
- TRIN: NYSE up stocks vs down stocks ratio divided by up volume vs down volume ratio. A value of 1 indicates parity, below that the strength is on the long side, above the strength is in the short side.
A basic use of market internals may be looking for divergences, for example:
- /ES is trading in a range but ADD and VOLD are trending up nonstop, may /ES will break the range to the upside
- /ES is trading in a range and ADD and VOLD are trading around the zero line but got an extreme reading on TICK, may be a non trending day and the TICK extreme reading is at one of the extremes of the /ES range, may be a good probability trade to fade that move
- /ES is trading in a trend to the downside, ADD and VOLD too, you catch a good portion of the move but are fearful to flat and miss more gains, you see in the TICK a lot of extreme values below -800 so your're confident in the continuation of the downtrend, until the TICK goes beyond -1000 and you use that signal to go flat
Market internals give you context and confirmation, price in /ES may be trending but if market internals do not confirm the move may a reversal is on its way
Price is an advertise, you can see the real move in the structure below, in the behavior of the individual components of the market, those are the real questions:
- How many stocks are going up/down (ADD)
- How many volume is flowing up/down (VOLD)
- How many stocks are ticking up/down (TICK)
- What is the overall volume breath of the market (TRIN)
FEATURES:
- Plot one of the four basic market internal indices: TICK, ADD, VOLD and TRIN
- Show labels with values beyond an user defined threshold
- Show ZERO line
- Show user defined Dotted and Dashed lines
- Show user defined moving average
SETTINGS:
- Market internal: ticker to plot in the indicator, four options to choose from (TICK, ADD, VOLD and TRIN)
- Labels threshold: all values beyond this will be ploted as labels
- Dot lines at: two dotted lines will be plotted at this value above and below the zero line
- Dash lines at: two dashed lines will be plotted at this value above and below the zero line
- MA type: two options avaiable SMA (Simple Moving Average) or EMA (Exponential Moving Average)
- MA length: number of bars to calculate the moving average
- Show zero line: show or hide zero line
- Show dot line: show or hide dotted lines
- Show dash line: show or hide dashed lines
- Show labels: show or hide labels
GOOD LUCK AND HAPPY TRADING