0bps

Strategy vault / Mean reversion

Renko Reversal Tracking Strategy

The Renko reversal tracking strategy is a short-term trading strategy that uses Renko bricks to identify market reversals. It captures short-term reversal opportunities by monitoring color changes between adjacent…

Author
ChaoZhang
Complexity
Starter · 64 lines
Parameters
2
Backtest bar
1h · intraday
Tested on
BTC/USDT · futures

Strategy Overview

The Renko reversal tracking strategy is a short-term trading strategy that uses Renko bricks to identify market reversals. It captures short-term reversal opportunities by monitoring color changes between adjacent bricks. Trading signals are generated when the current brick color flips after consecutive same-colored bricks.

Strategy Logic

  1. Use traditional non-repainting Renko bricks.

  2. Monitor color changes between neighboring bricks.

  3. Signals emerge when current brick color flips while previous two bricks share the same color.

  4. Long signal: Bullish brick appears after two bearish bricks.

  5. Short signal: Bearish brick appears after two bullish bricks.

  6. Entry options: market order or stop order.

  7. Set stop loss/take profit at brick size multiplied by a coefficient.

The core is capitalizing on pullback opportunities caused by brick color flips. Consecutive same-colored bricks represent trend formation, and next brick flipping color indicates potential reversals.

Brick size and stop loss/take profit coefficients can be tuned for optimization.

Advantages of the Strategy

  • Bricks directly display reversal information

  • Simple and clear logic, easy to implement

  • Symmetrical long and short opportunities

  • Flexible brick size adjustment

  • Strict risk control with stop loss/take profit

Risk Warnings

  • Requires a certain number of consecutive bricks to form signals

  • Brick size directly impacts profit/drawdown

  • Hard to determine trend duration

  • Consecutive stop loss may occur

Conclusion

The Renko reversal tracking strategy innovatively applies traditional technical indicators by directly using brick color flips to identify short-term reversals. Simple and practical, this strategy can achieve steady returns through parameter tuning, and is worth backtesting, live optimization, and application.

Parameters

NameDefaultWhat it controls
v_input_1trueBrick size multiplier: use high value to avoid SL and TP
v_input_2trueUse stop orders instead of market orders

Source Pine Script

/*backtest
start: 2023-09-07 00:00:00
end: 2023-09-08 18:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
//Simple Renko strategy, very profitable. Thanks to vacalo69 for the idea.
//Rules when the strategy opens order at market as follows:
//- Buy when previous brick (-1) was bearish and previous brick (-2) was bearish too and actual brick close is bullish
//- Sell when previous brick (-1) was bullish and previous brick (-2) was bullish too and actual brick close is bearish
//Rules when the strategy send stop order are the same but this time a stop buy or stop sell is placed (better overall results).
//Note that strategy open an order only after that condition is met, at the beginning of next candle, so the actual close is not the actual price.
//Only input is the brick size multiplier for stop loss and take profit: SL and TP are placed at (brick size)x(multiplier) Or put it very high if you want startegy to close order on opposite signal.
//Adjust brick size considering: 
//- Strategy works well if there are three or more consecutive bricks of same "color"
//- Expected Profit
//- Drawdown
//- Time on trade
//
//Study with alerts, MT4 expert advisor and jforex automatic strategy are available at request.
//

strategy("Renko Strategy Open_Close", overlay=true, calc_on_every_tick=true, pyramiding=0,default_qty_type=strategy.percent_of_equity,default_qty_value=100,currency=currency.USD)

//INPUTS
Multiplier=input(1,minval=0, title='Brick size multiplier: use high value to avoid SL and TP')
UseStopOrders=input(true,title='Use stop orders instead of market orders')

//CALCULATIONS
BrickSize=abs(open[1]-close[1])
targetProfit = 0
targetSL = 0

//STRATEGY CONDITIONS
longCondition = open[1]>close[1] and close>open and open[1]<open[2]
shortCondition = open[1]<close[1] and close<open and open[1]>open[2]

//STRATEGY
if (longCondition and not UseStopOrders)
    strategy.entry("LongBrick", strategy.long)
    targetProfit=close+BrickSize*Multiplier
    targetSL=close-BrickSize
    strategy.exit("CloseLong","LongBrick", limit=targetProfit, stop=targetSL)
    
if (shortCondition and not UseStopOrders)
    strategy.entry("ShortBrick", strategy.short)
    targetProfit = close-BrickSize*Multiplier
    targetSL = close+BrickSize
    strategy.exit("CloseShort","ShortBrick", limit=targetProfit, stop=targetSL)

if (longCondition and UseStopOrders)
    strategy.entry("LongBrick_Stop", strategy.long, stop=open[2])
    targetProfit=close+BrickSize*Multiplier
    targetSL=close-BrickSize
    strategy.exit("CloseLong","LongBrick_Stop", limit=targetProfit, stop=targetSL)
    
if (shortCondition and UseStopOrders)
    strategy.entry("ShortBrick_Stop", strategy.short, stop=open[2])
    targetProfit = close-BrickSize*Multiplier
    targetSL = close+BrickSize
    strategy.exit("CloseShort","ShortBrick_Stop", limit=targetProfit, stop=targetSL)

Published by ChaoZhang on the FMZ strategy square · last modified 2023-09-15. Collected in the Quant Trading Vault. Unvalidated research: re-test with your own data and costs before trusting it.

Build this with AgenKit

A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.

in Claude Code, Cursor, Codex & 4 more
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/Renko-Reversal-Tracking-Strategy.md
  1. npx agenkit install engineering-kit in your project
  2. Paste the command into your agent and approve each phase
  3. Get tests, backtest, risk controls and a paper-trading switch

Understand it first

Before you run this, read the lesson behind the idea and how to backtest it honestly. Specs like this one are the survivors of an unknown number of trials; deflate their results accordingly.

Related specs

esc

Try , , or .

↑↓ move↵ open