Relative Strength Moving Average CrossoverA popular technical analysis strategy is the moving average crossover. This indicator combines a crossover with the Relative Strength Line, created by William O’Neil. The RS Line is a tool used to compare the price action of a particular stock to that of an index, with the S&P 500 being the index preferred by O'Neil.
When one moving average crosses above or below another, that may be a signal of a trend change. For example, when a shorter-term moving average (aka faster moving average) of price moves up and through a longer-term moving average (aka slower moving average), it is likely the price is trending up, this is referred to as a crossover. The opposite can also be a potential signal of a change in the trend. When a shorter-term moving average crosses under a longer-term moving average, the price may be heading down. We refer to this as a negative crossover or crossunder.
This indicator allows configuration of up to two moving averages for the RS Line. Using two moving averages you can quickly identify the direction of the trend and also pinpoint where the faster moving average crosses over or under the slower moving average.
While beta testing this indicator, we performed a study using Bitcoin. In 2021 we’ve seen an increasing correlation of BTC and the S&P 500. This is most likely due to the fact that both crypto and stocks are riskier than other financial assets such as bonds and commodities. When the market is risk-off, both the S&P 500 and Bitcoin tend to sell off together.
For the BTC test case we used two moving averages of the RS Line, 8-EMA and 50-SMA. In the chart that follows you can see a breakdown of how this played out over the last ~2 years. A positive divergence is indicated by the 8-EMA of RS crossing above the 50-SMA, and vice versa for a negative divergence.
Here's another example using TSLA:
Features
■ Configure up to two moving averages for each timeframe.
■ Optional symbols indicate moving average crossovers.
■ Configure custom alerts on crossovers, for any timeframe.
■ Optional moving average cloud makes it easy to identify if slower moving average is above/below faster moving average.
■ Configurable index, defaulting to S&P 500 (SPX).
Acknowledgement
This project is a collaborative effort with @blakedavis17 a Crypto-Equity Analyst. Based on a discussion with Blake about a moving average crossover using the RS Line, we created a simple indicator to explore the concept further. We were very encouraged with the results of backtesting and decided to publish the indicator as we believe it may be a helpful tool for both equity and crypto traders.
Canslim
Marked Highs/Lows - Support & ResistanceThis indicator mimics the functionality of marked highs/lows in MarketSmith, a charting tool available from Investor's Business Daily. Marked highs/lows, sometimes referred to as pivot highs/lows, can be used to locate areas of support and resistance. These same points can also be helpful when drawing trendlines and channels.
I've added several customization options that add to the flexibility and overall usefulness of this technical indicator.
Custom Ranges for Marked Highs/Lows
In MarketSmith, a marked high is the highest high going back nine bars and forward nine bars. The number of required bars with lower highs on each side of the high is referred to as the period. The default for the indicator is a nine bar period, however, you can configure the period to fit with your trading style.
View Marked Highs/Lows on Any Timeframe
MarketSmith only supports marked highs/lows on daily charts. With this indicator you can view marked highs/lows on any timeframe.
Suggestions
■ Draw horizontal rays from the most recent marked high and low to help visualize areas of support and resistance.
■ Create a channel to show the current trading range. Draw a trendline across marked highs and a separate trendline across marked lows.
■ Increase the marked high/low periods to find more significant highs and lows.
Relative Volume Pro - Realtime Volume FlowRelative volume compares the volume at a specific time in the trading day versus the prior volume at the same time of day over a specified range. This is an ideal way to gauge if there is significant volume driving a price move, either up or down.
What's Unique About this Relative Volume Indicator?
Many relative volume indicators simply divide the current volume by the average volume. Unfortunately, this calculation is not an accurate gauge of volume at a specific point in time and it will not account for typical spikes in volume that occur early and late in the day.
This indicator calculates relative volume on an intraday chart, looking at the volume for each bar in the current timeframe, over a range of days that is configured in Settings. For example, if the preferred lookback is set to 50 and you are on a 5-minute chart at 1:00pm, the indicator will determine the average of cumulative volume traded up to 1:00pm on each 5-minute bar, over the past 50 days. The result is an accurate representation of the "true" volume for a specific time in the day.
Relative Volume as Percentage or Ratio
Relative volume can be shown as a percentage change, a ratio or both. The calculations are the same, it's more about your preference.
For example, if a stock has traded 1M shares at 10:00am, yet the average over the past 50 days at 10:00am is 500k shares, the percentage increase is 100% and the ratio would be 2.0.
Intraday Charts
To accurately determine volume at a specific point during the trading day, as compared to the average at that same time of day, calculations need to be done on an intraday chart. This is your go-to chart to gauge realtime volume flow.
Daily, Weekly and Monthly Charts
Relative volume data is also shown on daily, weekly and monthly charts, however, it's important to note these values are based on the close of the respective timeframe.
Acknowledgement
Many thanks to @LucF and @e2e4mfck for their excellent open source indicator, Relative Volume at Time, for TradingView. If you are interested to learn more about the details of relative volume, this is the definitive resource.
Darvas Box Theory - Tracking UptrendsThe Darvas box theory is based on the work of Nicolas Darvas, author of the book "How I Made $2 Million in the Stock Market". This indicator uses his box theory to help visualize upward trends and find potential opportunities to buy or add to a position.
Darvas was a growth stock trader. After extensive study of historical stock movements, Darvas noted stocks "have a defined upward or downward trend which, once established, tended to continue. Within this trend stocks moved in a series of frames, or what I began to call boxes."
Darvas Box Theory
■ A box defines a high and low range that contains a stock's movement over a period of time.
■ Darvas preferred "lively" stocks that moved up and down within a box. In his research, Darvas noted stocks with these characteristics often had significant moves up.
■ Boxes stacked one after another often indicate a strong upward trend.
■ A potential buy signal is a stock moving past the high of the topmost box with a significant increase in volume.
■ Within the range of a box, Darvas considered movement to the bottom of the range a healthy sign. These moves down shakeout weak holders who sell thinking the downward trend may continue.
Defining a Box:
■ After price makes a new high, there must be three consecutive bars that don't exceed the high.
■ Once the top of the box is set, the same process is used, in reverse, to determine the bottom.
■ Once the high and low are established, a box is drawn over the range of bars.
■ With this indicator, there are two options to determine when a box is complete, that is, when a box is fully enclosed and a new box can be started. The default is when there is a close above or below the high or low of the box. Using the close may provide a better perspective of the overall trend by limiting noise of price movements within a bar. The second option to complete a box is when a bar's high or low goes above or below the boundaries of the box. The preferred option is configurable within the indicator Settings.
Lookback Range
■ The lookback range is used to determine if the current bar has reached a new high, which could indicate the start of a new box.
■ The value specified for the lookback determines how many bars back to compare against the current bar high.
■ You can set the lookback value for intraday, daily and weekly charts.
■ It's recommended to experiment with lookback values across various timeframes to find settings that fit with your trading style.
Suggestions from Darvas:
■ The box theory works best during a strong uptrend, where boxes stack one after another.
■ When breaking through the top of the box, ideally there will be a significant increase in volume. This may be an opportunity to buy or add to a position.
■ Try and hold stocks that are consistently moving up by raising a stop-loss along with the rise.
■ Take losses quickly.
Indicator Features:
■ Box completion can be based on a close above/below the box boundaries or a move above/below the box boundaries.
■ Configure the lookback range for intraday, daily and weekly charts.
■ Configure box borders and background colors.
■ When the last bar is within a box, show an optional breakout price indicating a move above the top of box.
3 Weeks Tight - CANSLIM Technical Indicator3 Weeks Tight - Introduction
3 weeks tight is a bullish continuation pattern discovered by IBD's founder, William O'Neil.
The pattern can used as an opportunity to add to an existing position as it often occurs after a breakout above a cup with handle or other technical pattern.
The 3 weeks tight pattern forms when a stock closes within approximately 1% to 1.5% of the prior week's close for at least two weeks. The reason for the bullishness is that it indciates that investors who moved the stock upward in price since the breakout are not taking profits, the price is holding steady.
The buy point is just above the area of resistance formed at the highs of the three weeks plus 10 cents. The ten cent addition to the price is to ensure a push through the resistance at the high of the range.
Key Points:
It's preferred that closes for each week are in the upper half of the stock's range.
Ideally, volume will increase significantly as the stocks moves past the buy point.
This pattern generally performs best when the market is in an uptrend.
Features:
A configurable horizontal bar that spans the 3 week period.
A vertical band that highlights the tightness pattern.
A label to show the buy price after 3 week tight pattern.
Optional alert when the 3 weeks tight pattern is recognized.
Multi Time Frame Moving AverageThis is a standard Moving Average indicator with options to allow different configuration of daily and week length. All other chart time frame (besides daily and weekly) will be using the default length value.
Default, daily and week length are configurable. Default value of MA source is set to closing price, configurable as well. Here are the default value, Default = 9, Daily length = 50, Weekly length = 10, Source = close.
Multi Time Frame VolumeThis is a standard Volume indicator with options to allow different configurable daily and weekly MA length. All other chart time frame (besides daily and weekly) will be using the default MA length value.
On top of the configurable daily and weekly MA length, a dot is displayed for volume x% > current MA length. This is to indicate institutional buying when volume is above certain %.
Default, daily and weekly MA length are configurable. % of increase above the MA length is also configurable. Here are the default value, Default = 20, Daily MA length = 50, Weekly MA length = 10, Institutional Purchase (blue dot) = 40%.
Relative Strength LineRelative Strength Line compares equity's price performance with S&P 500 (default). The indicator will retrieve current equity value comparing it with S&P 500 equivalent time frame.
S&P 500 is set as the default index for comparison. This value can be change to any equity available in the market, located at the format settings of the indicator.
Auto Flag Distribution DaysThis script automatically flags distribution days. Distribution days are defined as any day that is down -0.2% or greater on heavier volume than the previous day. Distribution days are counted on the major indexes (S&P 500, NASDAQ, NYSE, etc...) within the CANSLIM methodology.