Rollover LTE

Theory:
In order to solve for the price of the current bar that will cause the moving average to roll up, the slope from the previous bar’s average to the current bar’s average must be set equal to zero which is to say that the averages must be the same.
For the 20-sma, the equation simply stated in words is as follows:
Current MA as a function of current price and previous 19 values = previous MA which is fixed based on previous 20 values
The denominators which are both 20 cancel and the previous 19 values cancel. What’s left is current price on the left side and the value from 20 bars ago on the right.
Current price = value from 20 bars ago
and since the equation was set up for solving for the price of the current bar that will cause the MA to roll over
Rollover price = value from 20 bars ago
This makes plotting rollover price, both current and forecasted, fairly simple, as it’s merely the closing price plotted with an offset to the right the same distance as the moving average length.
Application:
The 20-sma and 50-sma rollover prices are plotted because they are considered to be the two most important moving averages for rollover analysis. Moving average lengths can be modified in the indicator settings. The 20-sma and 20-sma rollover price are both plotted in white and the 50-sma and 50-sma rollover price are both plotted in blue. There are two rollover prices because the 20-sma rollover price is the price that will cause the 20-sma to roll over and the 50-sma rollover price is the price that will cause the 50-sma to roll over. The one that's vertically furthest away from the current price is the one that will cause both to rollover, as should become clearer upon reading the explanation below.
The distance between the current price and the 20-sma rollover price is referred to as the “rollover strength” of the price relative to the 20-sma. A large disparity between the current price and the rollover price suggests bearishness (negative rollover strength) if the rollover price is overhead because price would need to travel all that distance in order to cause the moving average to roll up. If the rollover price and price are converging, as is often the case, a change in moving average and price direction becomes more plausible. The rollover strengths of the 20-sma and 50-sma are added together to calculate the Rollover Strength and if a negative number is the result then the background color of the plot cloud turns red. If the result is positive, it turns green. Rollover Strength is plotted below price as a separate indicator in this publication for reference only and it's not part of this indicator. It does not look much different from momentum indicators. The code is below if anybody wants to try to use it. The important thing is that the distances between the rollover prices and the price action are kept in mind as having shrinking, growing, or neutral bearish and bullish effects on current and forecasted price direction. Trades should not be entered based on cloud colorization changes alone.
If you are about to crash into a wall of the 20-sma rollover price, as is indicated on the chart by the green arrow, you might consider going long so long as the rollover strength, both current and forecasted, of the 50-sma isn’t questionably bearish. This is subject to analysis and interpretation. There was a 20-sma rollover wall as indicated with yellow arrow, but the bearish rollover strength of the 50-sma was growing and forecasted to remain strong for a while at that time so a long entry would have not been suggested by both rollover prices. If you are about to crash into both the 20-sma and 50-sma rollover prices at the same time (not shown on this chart), that’s a good time to place a trade in anticipation of both slopes changing direction. You may, in the case of this chart, see that a 20-sma rollover wall precedes a 50-sma rollover convergence with price and anticipate a cascade which turned out to be the case with this recent NQ rally.
Price exiting the cloud entirely to either the upside or downside has strong implications. When exiting to the downside, the 20-sma and 50-sma have both rolled over and price is below both of them. The same is true for upside exits. Re-entering the cloud after a rally may indicate a reversal is near, especially if the forecasted rollover prices, particularly the 50-sma, agree.
This indicator should be used in conjunction with other technical analysis tools.
Additional Notes:
The original version of this script which will not be published was much heavier, cluttered, and is not as useful. This is the light version, hence the “LTE” suffix.
LTE stands for “long-term evolution” in telecommunications, not “light.”
Bar colorization (red, yellow, and green bars) was added using the MACD Hybrid BSH script which is another script I’ve published.
If you’re not sure what a bar is, it’s the same thing as a candle or a data point on a line chart. Every vertical line showing price action on the chart above is a bar and it is a bar chart.
sma = simple moving average
Rollover Strength Script:
// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org/MPL/2.0/
// © Skipper86
//version=5
indicator(title="Rollover Strength", shorttitle="Rollover Strength", overlay=false)
source = input.source(close)
length1 = input.int(20, "Length 1", minval=1)
length2 = input.int(50, "Length 2", minval=1)
RolloverPrice1 = source[length1]
RolloverPrice2 = source[length2]
RolloverStrength1 = source-RolloverPrice1
RolloverStrength2 = source-RolloverPrice2
RolloverStrength = RolloverStrength1 + RolloverStrength2
Color1 = color.rgb(155, 155, 155, 0)
Color2 = color.rgb(0, 0, 200, 0)
Color3 = color.rgb(0, 200, 0, 0)
plot(RolloverStrength, title="Rollover Strength", color=Color3)
hline(0, "Middle Band", color=Color1)
//End of Rollover Strength Script
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.
Declinazione di responsabilità
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.