# Trade Setup

> Build a strategy without code – triggers, filters and exits from indicator lines, market or limit entries, stop and target from price lines, cooldown and minimum R – and turn it into a WickScript strategy.

Updated: 2026-10-25T01:50:47.000Z · https://chartrider.com/docs/strategies/trade-setup/

The Trade Setup turns indicator lines into trades. **Gates** decide when to enter and when to exit; the **Execution** card decides how to enter and where the stop and target are. Open it with **Setup** in the Strategies panel (`F6`) or the **Trade Setup** tab of the [Strategy Lab](https://chartrider.com/docs/strategies/strategy-lab/). Every change is saved with the active strategy.

## Prepare the indicators

The Trade Setup can only use lines of indicators that belong to the strategy. Make the strategy active in the Strategies panel, then add indicators with `F3`. Each indicator gets a technical name such as `EMA1`, `EMA2` or `RSI1` (Settings of the indicator → **Tech Name**), and the lines show up as `EMA1` for the main line or `RSI1 · signal` for a named output. The outputs of every indicator are listed on its page under [Indicators](https://chartrider.com/docs/indicators/).

## Gates

The left card, **Signals · triggers, filters, exits**, lists the gates. **+ Gate** adds one; the first gate becomes a trigger, later ones become filters. Each gate has:

- **Role** – **Trigger** starts an entry when its rule becomes true, **Filter** must agree, **Exit** closes the open position when its rule becomes true.
- **Line** – the indicator line it reads.
- **Rule** – see the table below, with its values.
- **Side** – **Both**, **Long** or **Short**: which entries a trigger may start, which entries a filter checks (the other side passes), which positions an exit closes.
- A checkbox to switch it off and **×** to remove it.

| Rule | Long | Short |
|---|---|---|
| **Against** | line ≤ center + x | line ≥ center − x |
| **With** | line ≥ center + x | line ≤ center − x |
| **Price vs line** | close ≥ line + x % | close ≤ line − x % |
| **Range** | min ≤ line ≤ max | min ≤ line ≤ max |
| **Compare** | line `>` `≥` `<` `≤` `=` `≠` a **Value**, **Price (close)** or another line | same as long |

**Against** suits oscillators you fade (long when RSI is low), **With** follows them (long when momentum is high). **Compare** works like a sentence: `EMA1 > EMA2`, `RSI1 < 30`, `REL kill = 1`.

### When gates are checked

Everything is decided at the close of a candle:

- A **trigger** fires on the candle where its rule becomes true – true now, false on the candle before. A **Compare** trigger `EMA1 > EMA2` therefore fires on the candle where EMA1 crosses above EMA2, not on every candle while it stays above.
- **Filters** are checked at the trigger candle. All active filters must pass. While a line has no value yet (for example at the start of the data), a filter lets entries through, and a trigger or exit doesn't fire.
- An **exit** closes the position at the close of the candle where its rule becomes true for the position's side.
- Lines of indicators on higher timeframes only count once their candle has closed.

If long and short triggers fire on the same candle, ChartRider takes no entry.

### What the gates report

After a Backtest (`F5`) each gate shows how often it fired (**fired**) or how many entries it blocked (**blocks**), and the card shows **Last F5**: triggers → entries, plus the reasons for skipped triggers, for example `blocked by filters`, `position or order open, or cooldown`, `SL/TP on the wrong side of the entry`, `target below min R` or `limit not filled in time`. A gate marked **⚠ repaints** reads a line that uses later candles for its values – in a backtest it would look into the future, so don't rely on it.

## Execution

The right card, **Execution**, sets how trades are placed.

**Entry**

- **Market (close of the trigger candle)** – the position opens at the close of the candle on which the trigger fired.
- **Limit (at a price line)** – a limit order at an indicator line, active from the next candle on. A long limit must lie below the close, a short limit above it.

**Long / Short lines** – for each side choose an indicator price line:

- **SL** – the stop: below the entry for a long, above for a short. Required; without it the side takes no trades.
- **TP** – the target: above the entry for a long, below for a short. Optional if an exit gate covers that side (**— none (exit gate) —**).
- **Limit** – the limit price (limit entries only).

Only lines on the price chart are offered – oscillators such as RSI can't be stops or targets. Lines are read at the trigger candle, so the stop and target stay fixed for the trade.

**Values**

| Field | Default | Meaning |
|---|---|---|
| **SL buffer %** | 0 | Stop this far beyond its line, away from the entry, in % of the price |
| **TP front %** | 0 | Target this far before its line, towards the entry |
| **Min R** | 0 (off) | Skip entries whose target is less than this many R away |
| **Cooldown** | 0 | Candles after an exit without new triggers |
| **Limit off. %** | 0 | Limit price this far from its line towards the current price |
| **Valid bars** | 10 | Candles after the trigger in which the limit order may fill |

R is the distance from entry to stop. A target 2 R away earns twice what the stop would lose.

The card warns when a side can't trade, for example **Long: set an SL line – otherwise no entries on that side**. Without any indicator that has price lines, it suggests adding one (for example [REH / REL](https://chartrider.com/docs/indicators/reh-rel/)) with `F3`.

## Risk and position size

Every Trade Setup trade risks 1 % of the simulated account between entry and stop. The leverage is the one set in the trading panel for the chart's market, or the **Leverage** step if you vary it; without either, ChartRider uses the smallest leverage that allows the 1 % risk. Only one position is open at a time. Details: [Backtest engine](https://chartrider.com/docs/strategies/backtest-engine/).

## Example

A trend long with two EMAs, an RSI and the [REH / REL](https://chartrider.com/docs/indicators/reh-rel/) indicator. Add them with `F3` and give `EMA2` a longer length than `EMA1`; they get the names `EMA1`, `EMA2`, `RSI1` and `REHREL1`.

1. Trigger: `EMA1` **Compare** `>` the line `EMA2`, side **Long** – fires on the candle where EMA1 crosses above EMA2.
2. Filter: `RSI1` **With**, center `50`, x `0` – only while the RSI is at least 50.
3. Execution: **Market**, Long **SL** `REHREL1 · REL` (the nearest equal lows below the close) with **SL buffer %** `0.1`, Long **TP** `REHREL1 · REH` (the nearest equal highs above), **Min R** `1.5`.

Press `F5` to see the trades on the chart, then vary a value with Step 1 and use [Run strategy](https://chartrider.com/docs/strategies/run-strategy/).

## Steps

Gate values (center, x, min, max, and the value of a **Compare** against a value) and every numeric indicator setting can be chosen as **Step 1** or **Step 2** in the Strategies panel. **Run strategy** then tests each value, and the heatmap shows the results side by side. The Execution values above are not stepped.

## Open as WickScript

With WickScript unlocked, **Open as WickScript** writes the setup as a WickScript strategy with the same triggers, filters, exits, stops and targets, and opens it in the **Scripts** tab. From then on the strategy trades with the script; **the setup stays as it is**. A banner at the top of the Trade Setup tab shows which one trades and switches back with **Trade with this Trade Setup**. The conversion only goes one way: edits to the script don't change the setup. See [Writing strategies in WickScript](https://chartrider.com/docs/wickscript/strategies/).
