# SIGNALS_INVALID

compute() returned signals Forge cannot use.

## What happened

`compute()` returned something Forge cannot use as signals. The message says what, and points at the line where `compute` is defined.

### Common causes

- `compute()` did not return `fg.Signals(...)`.
- An array in `fg.Signals` does not have one value per bar. This is checked for the entries and exits, for `plots`, for `record` and for each filter.
- `long_entry` and `short_entry` are both true on the same bar.
- A region in `plots` ends after the last bar of the data.

## What to do

Return `fg.Signals(...)` from `compute()`, with every array as long as the data, and one side at most on each bar.

### Related

- [Signals](https://oathra.dev//reference/forge/signals/Signals)
- [Warm-up](https://oathra.dev//docs/concepts/warm-up)

## Example

```text
strategy.py, line 9, in compute: compute() must return fg.Signals(...), got tuple. [SIGNALS_INVALID]
strategy.py, line 9, in compute: long_entry has 499 values, but the data has 500 bars. Every array in fg.Signals has one value per bar. [SIGNALS_INVALID]
strategy.py, line 9, in compute: long_entry and short_entry are both true on 3 bars, first at bar 41. Choose one side per bar. [SIGNALS_INVALID]
```

The wording of the message depends on your file, and the code does not.
