OPEN-SOURCE SCRIPT

Trendicator

Diupdate
This is a very simple crossover script that looks at a exponential moving average with a standard length set at 20, which may be redefined by the user. A (Uptrend) buy signal is given once a candle closes above the moving average, coloring the exponential average green, and a sell signal is given once a candle closes below the moving average, coloring the exponential average red.

The goal of this indicator is to provide the user with a rather robust idea of whether the market is trending upwards or downwards, more so than providing definitive buy or sell signals. It works with symbols that do not change drastically in shorter time periods (I only trade XAU/USD).XAUUSD
Catatan Rilis
A name change was done, to give an indication as to what is expected from the indicator: Trends!

The EMA source can now be selected, with the uptrend signal now only being triggered once the entire candle closes above the selected EMA, and similarly for downtrends - Only triggered when the entire candle closes below the EMA.

Finally, the fill colors have been corrected such as not to overlap.
Catatan Rilis
Description of Changes:

  • Improved the buy and sell signal logic to ensure only one alert and label per crossover event.
  • Added flags to track buy and sell crossovers, preventing repeated signals on consecutive bars.
  • Refined the conditions to ensure that buy signals trigger only when both buy conditions are met and similarly for sell signals.
  • The script now correctly displays buy and sell labels on the chart and sends notifications only once per respective crossover, enhancing the accuracy and usability of the indicator.
crossoverdowntrendingExponential Moving Average (EMA)uptrendingXAUUSD

Skrip open-source

Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menerbitkannya sebagai sumber terbuka, sehingga para trader dapat memahami dan memverifikasinya. Hormat untuk penulisnya! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Inggin menggunakan skrip ini pada chart?

Pernyataan Penyangkalan