Wormhole007

SMA Cross with a Price Filter

Wormhole007 Atualizado   
A moving average strategy generates an entry (buy) signal when the price goes above the moving average, and an exit (sell) signal when the price goes below the moving average. But it gives lots of whipsaws and noise depends on the moving average we use. A fast moving average gives more whipsaws and a slow moving average gives less whipsaws. To reduce the noise/whipsaws, we can add a filter on a fast/slow moving average. It will improve entry/exit performance significantly specially for those who don't want to watch the market actively.

I created this indicator with a price filter. This means the price of an underlying asset must be at least a specific percentage above its moving average to generate a buy signal and a specific percentage below its moving average to generate a sell signal. This price filter can also be a confirmation after the price crosses above/below its SMA. I couldn't find any indicator yet based on this idea. So I wrote this indicator and publishing it so it helps those who are interested.

I use 200 SMA and 3% price filter as default and using SPY as an example. So,

ENTRY signal when the closing price of SPY is 3% above its 200 SMA.
EXIT signal when the closing price of SPY is 3% below its 200 SMA.

Enjoy and let me know if it works.

** This chart only generates entry (buy) and exit (sell) signals. Please, do your own diligence to make any investment or trading decisions.
Notas de Lançamento:
A moving average strategy generates a buy signal when the price rises above the moving average and a sell signal when the price falls below it. However, this approach often results in numerous whipsaws and noise, depending on the selected moving average. Faster moving averages tend to produce more whipsaws, while slower ones generate fewer. To mitigate these issues, a filter can be applied to both fast and slow moving averages, significantly improving entry and exit performance, particularly for those who prefer a less active market monitoring approach.

I have developed an indicator that incorporates a price filter. This means a buy signal is generated only when the price of an underlying asset is at least a specific percentage above its moving average, and a sell signal is generated when it is a specific percentage below the moving average. This price filter can also serve as a confirmation after the price crosses above or below its Simple Moving Average (SMA). Notably, I have not found any existing indicators based on this concept, so I have created and published this indicator in the hopes that it proves beneficial to those interested.

As a default setting, I have used a 200 SMA with a 3% price filter, employing SPY as an example. Therefore,

An entry signal occurs when the closing price of SPY is 3% above its 200 SMA.
An exit signal occurs when the closing price of SPY is 3% below its 200 SMA.
Feel free to explore and let me know about your experience with its functionality.

Please be aware that this chart exclusively generates entry and exit signals. It is crucial to conduct your own due diligence before making any investment or trading decisions.
Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?