# Ribbon Multi-Timeframe

> Ribbon Multi-Timeframe is a strategy that trades GBPUSD on 15-minute bars.

Source: https://algobarsx.com/docs/ex-03-ribbon-multi-timeframe/

```algobarsx
strategy "Ribbon Multi-Timeframe"
    market: GBPUSD
    bars: 15m

use indicator "Trend Ribbon" v3 as ribbon (fast: 10, slow: 30)

ribbon_4h = ribbon.on(bars: 4h)

when ribbon_4h.up and crosses_above(close, ribbon.fast) and ribbon.strength > 0.5:
    buy risk: 1%, stop: atr(14) * 1.5, target: 2R

when ends(ribbon.up):
    close_all side: long
```
What this script says

Ribbon Multi-Timeframe is a strategy that trades GBPUSD on 15-minute bars.

It uses the indicator "Trend Ribbon" (version 3) as `ribbon`, with `fast` set to 10 and `slow` set to 30.

It calculates `ribbon_4h` as `ribbon.on(bars: 4h)`.

When `ribbon_4h.up` and the close crosses above `ribbon.fast` and `ribbon.strength` is above 0.5, it buys at market, risking 1% of the balance, with a stop 1.5 × the 14-bar ATR from the entry and with a target 2R from the entry.

When `ribbon.up` stops being true, it closes all long trades.

This description may be incomplete because the script has errors.
