# Ribbon and TSI agreement

> Ribbon and TSI agreement is an alert that checks every 15 minutes and fires at most once per bar.

Source: https://algobarsx.com/docs/ex-56-ribbon-tsi-alert/

```algobarsx
alert "Ribbon and TSI agreement"
    check: every 15m
    repeat: once per bar

use indicator "Trend Ribbon" v3 as ribbon (fast: 8, slow: 21)

t = tsi(close, long: 25, short: 13, signal: 7)
p = ppo(close)

when ribbon.up and crosses_above(t.tsi, t.signal) and p.histogram > 0:
    notify "Trend Ribbon up with TSI and PPO momentum on {market.symbol}"
```
What this script says

Ribbon and TSI agreement is an alert that checks every 15 minutes and fires at most once per bar.

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

It calculates `t` as the true strength index (source the close, long 25, short 13, signal 7) and `p` as the percentage price oscillator (source the close).

When `ribbon.up` and `t.tsi` crosses above `t.signal` and `p.histogram` is above 0, it sends the notification "Trend Ribbon up with TSI and PPO momentum on {market.symbol}".

This description may be incomplete because the script has errors.
