OPEN-SOURCE SCRIPT

HalfTrend Strategy Basic

18
This strategy is part of our blog series titled “How to Convert a TradingView Indicator into an Algo Strategy”, where we break down popular indicators and turn them into fully functional, backtestable strategies.
📝 Read the full article here
--
🔍 What This Strategy Does
This script implements the HalfTrend indicator by everget as a TradingView strategy. It detects potential trend reversals based on recent price extremes and moving averages.
Buy when trend shifts up:
  1. SMA of lows rises above the highest high
  2. Close is above the previous high

Sell when trend shifts down:
  1. SMA of highs drops below the lowest low
  2. Close is below the previous low

⚙️ Optional Filters Included
You can toggle confirmation filters from the settings panel:
  • ✅ 200 EMA (trend context)
  • ✅ ADX (trend strength and momentum slope)
  • ✅ MACD crossover (momentum confirmation)
  • ✅ RSI above/below 50 (bias check)

These help reduce false signals in sideways markets.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.