OPEN-SOURCE SCRIPT

Renko ATR Trend + SMA Indicator by YCGH Capital

76
🧭 Overview

The Renko ATR Trend + SMA Indicator is a trend-following tool designed for chart trading.
It combines Renko-style price movement logic (based on ATR) with a Simple Moving Average (SMA) filter to identify sustained bullish or bearish phases on any timeframe.

It plots a color-coded trend line directly on the price chart — green for bullish trends, red for bearish — and maintains a single active state (no repeated buy/sell signals) until the opposite condition appears.

⚙️ How It Works
1️⃣ Renko ATR Engine

Instead of using fixed box sizes like classic Renko charts, this indicator builds synthetic Renko movement based on ATR (Average True Range) of a chosen timeframe.

It pulls OHLC data from your selected Renko Source Timeframe (for example, 60-minute candles).

It calculates an ATR brick size — representing the minimum price move needed for a new Renko brick.

When price moves by at least one ATR in the opposite direction, it flips the trend.

This filters out small fluctuations and captures the underlying directional bias.

2️⃣ SMA Filter

A Simple Moving Average (SMA) acts as a trend confirmation filter.
Only when Renko direction aligns with the price relative to the SMA, a trend signal activates.

BUY → Renko uptrend + price above SMA

SELL → Renko downtrend + price below SMA

3️⃣ Stateful Signal Logic

Unlike typical indicators that spam multiple buy/sell shapes:

This version holds one persistent signal (Buy or Sell)

The state continues until an opposite signal is confirmed

No “continuation” arrows — clean and minimal trend visualization

🎨 Visuals
Element Meaning
🟩 Green Renko Line Active Bullish Trend
🟥 Red Renko Line Active Bearish Trend
⚪ Gray Line Neutral / Waiting phase
🟡 Yellow Line SMA (trend filter)
📍 Label (Buy Active / Sell Active) Displays the current market bias
🔧 Inputs
Input Description
Renko Source Timeframe The timeframe from which Renko data is calculated (e.g., 60 = 1h candles).
ATR Period Determines brick size sensitivity (lower = more responsive, higher = smoother).
SMA Length Moving Average length used as a directional filter.
💡 How Traders Use It

Trend Confirmation:
Use green/red Renko line to stay aligned with the dominant market move.

Entry Timing:
Enter trades when a new Renko direction is confirmed along with SMA alignment.

Exit or Reverse:
Exit long when a red line (Sell Active) appears, and vice versa.

Combine with Price Action:
Add support/resistance or volume analysis for confirmation.

Отказ от ответственности

Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.