Renko Donchian Channel Strategy by readCrypto
By readCrypto
Performance Metrics
- Author: readCrypto
- Symbol: BINANCE:BTCUSDT
- Timeframe: 1 day
Description
Renko Donchian Channel StrategyWHAT IT ISA breakout strategy that applies a Donchian channel to Renko bricks instead of time-based candles. It enters long when the Renko close breaks above the channel and exits when it breaks below. An optional RC Renko overlay draws the bricks and the next brick levels directly on your candle chart.HOW IT WORKS1) Renko dataThe script builds a Renko series with TradingView's built-in ticker.renko() and reads its High, Low and Close with request.security() using barmerge.gaps_off and barmerge.lookahead_off (no look-ahead).- Renko Style: "ATR" (box size from ATR) or "Traditional" (fixed box size)- Renko Box Size / ATR Length: default 142) Donchian channel on Renko- Upper band = highest Renko High over N bricks (default 20)- Lower band = lowest Renko Low over N bricks- Basis = average of the two bandsThe bands and the filled channel are plotted on the chart.3) Entries and exits- Long entry: the Renko close crosses above the previous bar's upper band.- Exit: the Renko close crosses below the previous bar's lower band closes the long.- Optional short trades ("Enable Short Trades", off by default): the same lower-band cross opens a short instead of only closing the long.Orders are processed once per bar, on the bar's close (calc_on_every_tick is not used).RC RENKO OVERLAY (DISPLAY ONLY)The script also draws the bricks of "RC Renko" (readCrypto's own brick calculation) on the chart. This part does not affect the strategy's orders.- Bricks are drawn from the candle on which each brick formed, up to the last candle (last 220 bricks).- Where candles pierced the area of the next up/down brick without closing a full brick, that next brick is drawn as a dashed box.- The next up brick and the next down brick are always shown as dashed boxes to the right of the last candle.- Lines, price labels and status-line values for: Up brick (next up brick price), Down brick (next down brick price), Renko Open and Renko Close (open/close of the latest brick).- One brick size is used for the whole history. Brick size method: TradingView ATR(14) rounded to 2 significant digits and kept until the ATR moves by a set percentage (default 20%), or the RC median range formula, or a manual size.- The overlay is calculated on the last bar and works on standard candle charts only.SETTINGSRenko Settings: Renko Style, Renko Box Size / ATR Length, Donchian Channel LengthStrategy Options: Enable Short TradesRC Renko: Manual brick size, Brick size method, ATR resize threshold (%), show bricks / next bricks / price lines and labels / status line, colors, brick transparencyBACKTEST SETTINGS USED BY DEFAULTInitial capital 10,000, order size 100% of equity, no commission and no slippage (TradingView's defaults). These defaults are NOT realistic. Please set a commission, slippage and a smaller position size that match your own trading before judging any result. Results depend heavily on the symbol, timeframe and Renko settings.IMPORTANT NOTES- Renko bricks from ticker.renko() are built from the chart's data, so the history can differ from other Renko tools or from a Renko chart type. The last brick can still change while the candle is open; orders are evaluated at the bar close.- The strategy is long-only by default. A breakout system tends to have many small losses in sideways markets.- Past results do not guarantee future results.- This script is for educational and informational purposes only and is not financial advice. Use at your own risk.==============================================Renko Donchian Channel Strategy (렌코 돈치안 채널 전략)개요시간 기반 캔들 대신 렌코 브릭에 돈치안 채널을 적용한 돌파 전략입니다. 렌코 종가가 채널 상단을 돌파하면 롱에 진입하고, 하단을 이탈하면 청산합니다. 선택 기능인 RC Renko 오버레이는 브릭과 다음 브릭 레벨을 캔들 차트 위에 바로 그려 줍니다.작동 방식1) 렌코 데이터TradingView 내장 ticker.renko()로 렌코 시리즈를 만들고, request.security()에 barmerge.gaps_off와 barmerge.lookahead_off를 사용해 High, Low, Close를 가져옵니다(미래 데이터 참조 없음).- Renko Style: "ATR"(ATR 기반 브릭 크기) 또는 "Traditional"(고정 브릭 크기)- Renko Box Size / ATR Length: 기본값 142) 렌코 기준 돈치안 채널- 상단 밴드 = 최근 N개 브릭의 렌코 고가 중 최고값(기본 20)- 하단 밴드 = 최근 N개 브릭의 렌코 저가 중 최저값- 중심선(Basis) = 두 밴드의 평균밴드와 채널 채우기가 차트에 표시됩니다.3) 진입과 청산- 롱 진입: 렌코 종가가 이전 봉의 상단 밴드를 상향 돌파할 때.- 청산: 렌코 종가가 이전 봉의 하단 밴드를 하향 이탈하면 롱을 청산합니다.- 숏 거래(선택, "Enable Short Trades", 기본값 꺼짐): 같은 하단 이탈 시 롱 청산만 하는 대신 숏에 진입합니다.주문은 봉이 마감될 때 봉당 한 번 처리합니다(calc_on_every_tick 미사용).RC RENKO 오버레이 (표시 전용)이 스크립트는 readCrypto의 자체 브릭 계산인 "RC Renko"의 브릭도 차트에 그립니다. 이 부분은 전략의 주문에 영향을 주지 않습니다.- 각 브릭이 형성된 캔들부터 마지막 캔들까지 브릭을 그립니다(최근 220개 브릭).- 캔들이 다음 상승/하락 브릭 영역에 들어갔지만 완전한 브릭을 마감하지 못한 곳은 그 다음 브릭을 점선 박스로 표시합니다.- 다음 상승 브릭과 다음 하락 브릭은 마지막 캔들 오른쪽에 항상 점선 박스로 표시합니다.- 다음 항목의 선, 가격 라벨, 상태줄 값을 표시합니다: Up brick(다음 상승 브릭 가격), Down brick(다음 하락 브릭 가격), Renko Open과 Renko Close(최신 브릭의 시가와 종가).- 전체 히스토리에 하나의 브릭 크기를 사용합니다. 브릭 크기 방식: TradingView ATR(14)을 유효숫자 2자리로 반올림해, ATR이 설정한 비율(기본 20%) 이상 움직일 때까지 유지하는 방식, RC 중간값 공식, 또는 수동 크기 중에서 고릅니다.- 오버레이는 마지막 봉에서 계산하며 일반 캔들 차트에서만 동작합니다.설정Renko Settings: Renko Style, Renko Box Size / ATR Length, Donchian Channel LengthStrategy Options: Enable Short TradesRC Renko: 수동 브릭 크기, 브릭 크기 방식, ATR 재설정 임계값(%), 브릭·다음 브릭·가격 선과 라벨·상태줄 표시, 색상, 브릭 투명도기본 백테스트 설정초기 자본 10,000, 주문 크기 자본의 100%, 수수료와 슬리피지 없음(TradingView 기본값)입니다. 이 기본값은 현실적이지 않습니다. 결과를 판단하기 전에 본인의 거래 조건에 맞는 수수료, 슬리피지, 더 작은 포지션 크기를 설정해 주세요. 결과는 종목, 시간봉, 렌코 설정에 따라 크게 달라집니다.유의사항- ticker.renko()의 렌코 브릭은 차트 데이터로 만들어서, 과거 구간이 다른 렌코 도구나 렌코 차트 유형과 다를 수 있습니다. 캔들이 진행 중일 때는 마지막 브릭이 바뀔 수 있고, 주문은 봉 마감 시 평가합니다.- 기본적으로 롱 전용 전략입니다. 돌파 전략은 횡보장에서 작은 손실이 여러 번 나는 경향이 있습니다.- 과거 결과가 미래 결과를 보장하지 않습니다.- 이 스크립트는 교육 및 정보 제공용이며 투자 조언이 아닙니다. 사용에 따른 책임은 사용자에게 있습니다.Release Notes(2026-11-13)Update: forming-candle bandsNEW- Dotted bands for the candle that is still forming. The Renko Upper Band, Lower Band and Basis are now drawn as dotted lines from the last closed value to the current value. When the candle closes, the dotted lines disappear and the closed candle is drawn solid.- New setting "Show the forming candle bands (dotted)" (Strategy Options, on by default) to turn the dotted lines on or off.- The script now runs on every tick (calc_on_every_tick = true) so the forming candle can be drawn.UNCHANGED- Orders are still sent only after a candle has closed (barstate.isconfirmed). A signal that appears and disappears inside a candle never sends an order.- Entry and exit rules and the Strategy Tester results are not affected. The Strategy Tester uses historical bars only, so the dotted bands do not appear in a backtest.FIXED- Duplicate display: after switching to every-tick calculation, the RC Renko bricks, levels and labels could be drawn twice with an offset of one brick. All previous drawings are now cleared and redrawn on each update.NOTE- Because the script now recalculates on every tick, long histories can feel slightly heavier on the chart.===============================업데이트: 진행 중인 캔들 밴드추가- 아직 진행 중인 캔들의 Renko Upper Band, Lower Band, Basis를 점선으로 표시합니다. 마지막 마감 값에서 현재 값까지 점선으로 그리고, 캔들이 마감되면 점선은 사라지고 마감된 캔들이 실선으로 그려집니다.- 점선 표시를 켜고 끄는 설정 "Show the forming candle bands (dotted)"를 추가했습니다(Strategy Options, 기본값 켜짐).- 진행 중인 캔들을 그리기 위해 스크립트가 틱마다 실행됩니다(calc_on_every_tick = true).변경 없음- 주문은 이전과 같이 캔들이 마감된 뒤에만 보냅니다(barstate.isconfirmed). 캔들 안에서 나타났다 사라지는 신호로는 주문이 나가지 않습니다.- 진입·청산 규칙과 전략 테스터 결과는 그대로입니다. 전략 테스터는 과거 봉만 사용하므로 점선 밴드는 백테스트에 나타나지 않습니다.수정- 이중 표시: 틱 단위 계산으로 바꾼 뒤 RC Renko 브릭, 레벨, 라벨이 브릭 한 칸씩 어긋나 두 번 그려질 수 있었습니다. 이제 갱신할 때마다 이전 그림을 모두 지우고 다시 그립니다.참고- 틱마다 다시 계산하므로 히스토리가 길면 차트가 약간 무겁게 느껴질 수 있습니다.