Wormhole007

SMA Cross with a Price Filter

Wormhole007 Mis à jour   
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.
Notes de version:
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 open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?