OPEN-SOURCE SCRIPT

EMA Grid

由mertenes3提供
The EMA Grid indicator is a powerful tool that calculates the overall market sentiment by comparing the order of 20 different Exponential Moving Averages (EMAs) over various lengths. The indicator assigns a rating based on how well-ordered the EMAs are relative to each other, representing the strength and direction of the market trend. It also smooths out the macro movements using cumulative calculations and visually represents the market sentiment through color-coded bands.


EMA Calculation:

The indicator uses a series of EMAs with different lengths, starting from 5 and going up to 100. Each EMA is calculated either using the exponential moving averages.
The EMAs form the grid that the indicator uses to measure the order and distance between them.
Rating Calculation:

The indicator computes the relative distance between consecutive EMAs and sums these differences.
The cumulative sum is further smoothed using multiple EMAs with different lengths (from 3 to 21). This smooths out short-term fluctuations and helps identify broader trends.
Market Sentiment Rating:

The overall sentiment is calculated by comparing the values of these smoothing EMAs. If the shorter-term EMA is above the longer-term EMA, it contributes positively to the sentiment; otherwise, it contributes negatively.
The final rating is a normalized value based on the relationship between these EMAs, producing a sentiment score between 1 (bullish) and -1 (bearish).
Color Coding and Bands:

The indicator uses the sentiment rating to color the space between the 100 EMA and 200 EMA, representing the strength of the trend.
If the sentiment is bullish (rating > 0), the band is shaded green. If the sentiment is bearish (rating < 0), the band is shaded red.
The intensity of the color is based on the strength of the sentiment, with stronger trends resulting in more saturated colors.
Utility for Traders:
The EMA Grid is ideal for traders looking to gauge the broader market trend by analyzing the structure and alignment of multiple EMAs. The color-coded band between the 100 and 200 EMAs provides an at-a-glance view of market momentum, helping traders make informed decisions based on the trend's strength and direction.

This indicator can be used to identify bullish or bearish conditions and offers a smoothed perspective on market trends, reducing noise and highlighting significant trend shifts.
Bands and ChannelsExponential Moving Average (EMA)

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明