OPEN-SOURCE SCRIPT

Tandem EMA Trends

This indicator helps to identify trends using 2 (tandem) EMAs: a fast EMA and a slow EMA. Set the lengths of the EMAs in the inputs (fast EMA should be a smaller number than the slow EMA).

The trend is bullish if the current value of the fast EMA > current value of the slow EMA AND the current value of the fast EMA > the prior bar's value of the fast EMA.

The trend is bearish if the current value of the fast EMA < current value of the slow EMA AND the current value of the fast EMA < the prior bar's value of the fast EMA.

The fast EMA is countertrend to the slow EMA if either of the following 2 conditions exist:
The current value of the fast EMA > current value of the slow EMA AND the current value of the fast EMA < the prior bar's value of the fast EMA (bullish countertrend).
-OR-
The current value of the fast EMA < current value of the slow EMA AND the current value of the fast EMA > the prior bar's value of the fast EMA (bearish countertrend).

Use this script to set custom alerts based off of the current trend like sending webhooks when specific conditions exist.

Customize the colors of the plots.
Exponential Moving Average (EMA)Trend Analysis

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明