OPEN-SOURCE SCRIPT

3 Moving Averages Crossover (High, Low, Close)

Moving Averages:

We calculate the 60-period simple moving averages (SMA) for the high, low, and close prices.
These moving averages are plotted on the chart:
Red for the high price.
Blue for the low price.
Green for the close price.
Trading Logic:

A long position is entered when the moving average of the close price crosses above both the high and low moving averages.
A short position is entered when the moving average of the close price crosses below both the high and low moving averages.
Moving AveragesPine utilitiesTrend Analysis

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer