# Renko Pullback

> Renko Pullback is a strategy that trades US500 on 5-point renko bars. It holds at most 1 open trade.

Source: https://algobarsx.com/docs/ex-21-renko-pullback/

```algobarsx
strategy "Renko Pullback"
    market: US500
    bars: renko(5)
    max_open: 1

sequence pullback within 12 bars:
    step impulse: close > open and close[1] > open[1] and close[2] > open[2]
    step dip: close < open
    step resume: close > open and close > dip.high
    reset_if: close < impulse.low

when pullback.completed:
    buy risk: 1%, stop: pullback.dip.low - 2 points, target: 2R
```
What this script says

Renko Pullback is a strategy that trades US500 on 5-point renko bars. It holds at most 1 open trade.

`pullback` completes when these steps happen in order within 12 bars: `impulse`, when the close is above the open and the previous bar's close is above the previous bar's open and the close 2 bars ago is above the open 2 bars ago; then `dip`, when the close is below the open; then `resume`, when the close is above the open and the close is above `dip.high`. It starts over if the close is below `impulse.low`.

When `pullback` completes, it buys at market, risking 1% of the balance, with a stop at the low of the `dip` step minus 2 points and with a target 2R from the entry.
