Signals
A signal rule decides when to enter a trade. The engine evaluates the rule on every closed candle; if the rule returns true, a trade opens at that candle's close.
There are two types of rule: buy (open a long) and sell (open a short). You can define one, the other, or both.
Signal templates
The form offers four ready-made templates plus a manual escape hatch.
1. Crossover
Open long when a fast moving average crosses above a slow one; open short on the opposite cross.
Example — EMA(10) crossing EMA(30):
{
"buy": { "op": "cross_above", "fast": "ema_fast", "slow": "ema_slow" },
"sell": { "op": "cross_below", "fast": "ema_fast", "slow": "ema_slow" }
}
Best for trending markets.
2. RSI threshold
Open long when RSI is below an oversold level; open short when above an overbought level.
{
"buy": { "op": "lt", "left": "rsi_14", "right": 30 },
"sell": { "op": "gt", "left": "rsi_14", "right": 70 }
}
Best for ranging markets.
3. Supertrend
Trade in the direction of a Supertrend flip. Uses the indicator's built-in buy_signal / sell_signal series.
{
"buy": { "op": "ref", "id": "st_1.buy_signal" },
"sell": { "op": "ref", "id": "st_1.sell_signal" }
}
4. UT Bot
Same idea as Supertrend but using UT Bot's flip signals. More aggressive — fires more often.
{
"buy": { "op": "ref", "id": "utbot_1.buy_signal" },
"sell": { "op": "ref", "id": "utbot_1.sell_signal" }
}
5. Manual
If none of the templates fit, write the rule yourself in JSON. You can combine operators with and / or:
{
"buy": {
"and": [
{ "op": "cross_above", "fast": "ema_fast", "slow": "ema_slow" },
{ "op": "gt", "left": "adx_14", "right": 25 }
]
}
}
Operators reference
| Operator | Meaning | Example |
|---|---|---|
gt lt gte lte eq neq | Compare two values | {"op":"gt","left":"rsi_14","right":70} |
cross_above | Fast crossed up through slow on this bar | {"op":"cross_above","fast":"ema_fast","slow":"ema_slow"} |
cross_below | Fast crossed down through slow | same shape |
ref | Reference a precomputed boolean series | {"op":"ref","id":"st_1.buy_signal"} |
rising | A series is rising vs previous bar | {"op":"rising","id":"close"} |
falling | A series is falling | similar |
and or not | Boolean combinators | {"and":[A,B]} |
When does a trade actually open?
When the rule returns true for a candle, the engine opens a trade at the close price of that candle for the next bar. There's a short delay between signal and execution to mirror real markets where you can't act on a candle until it has closed.
If a trade is already open, new signals on the same bar are ignored — the V1 engine allows only one open position at a time.