OPEN-SOURCE SCRIPT

McCrayTrend

Traders often rely on price breaking above or below the 50-day moving average (50D-MA) as a buy/sell signal. However, this approach frequently results in false breakouts, especially during low-volatility periods when price compression precedes major moves. To address this issue, we use an 8-day exponential moving average (8D-EMA) to represent price and focus on the crossovers between the 8D-EMA and the 48D-EMA as entry/exit signals. This method reduces noise in low-volatility conditions, enables earlier trend entries, and helps traders stay in trends longer.

The indicator incorporates a 111-day EMA (111D-EMA) to define market bias:
• Above the 111D-EMA: Bias is long, favoring buying and selling into cash.
• Below the 111D-EMA: Bias is short, favoring selling and buying into cash.

An exception to this rule occurs when a bullish cross happens within 40% of the 200-week moving average (200W-MA), as these conditions historically signal optimal times to acquire BTC.

Signals:
Buy signals:
• A bullish cross while price is above the 111D-EMA.
• A bullish cross near the 200W-MA threshold (optional setting).
Sell signals:
• A bearish cross while price is below the 111D-EMA.
Exit signals:
• Both EMAs turn red (for long trades) or green (for short trades).
• The shading between the 111D-EMA and 200W-MA turns red (for longs) or green (for shorts), if enabled.
Reversal opportunities:
• A buy or sell label during an exit signal may indicate a reversal point, allowing traders to take profit and reopen positions in the opposite direction.

The methodology behind this indicator has generated 132% alpha since October 6, 2015. Special thanks to Anurag Parashar for refining the stylistic elements of the indicator.
crossoversupertrendswingtradeTrend Analysistrendtrading

开源脚本

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

想在图表上使用此脚本?


更多:

免责声明