TradingView
EightBallDuVal
18 sty 2021 19:10

Price Outpaces Moving Average 

Alphabet Inc.NASDAQ

Opis

With inputs for the moving average, Bullish overshoot percentage, and bearish overshoot percentage, this indicator is attempting to show market tops based on the difference between the current price of an asset and how far away it is from its moving average.

If you have the bullish overshoot percentage set to 1.5:

let's say price is currently at 20,000 and the moving average is around 6500.

The script calculates 20,000/6500 = 3.07

Then, there is a boolean comparison asking if 3.07 > 1.5.

Since it is, the script will create a "SHORT" flag above that candlestick.

A similar process happens for the "LONG" flags.

Komentarze
bernylr1984
EightBallDuVal
On line 20 there is a mistake.

The title should be "Bearish Overshoot Percentage (x100)", not "Bullish Overshoot Percentage (x100)".
Więcej