Entry and exit: a strategy is a pair of rules

Caliente Signals · Updated

A strategy here is two rules. One says when you would buy, the other says when you would sell.

The strategy is only ever flat or holding. While it is flat, only the entry rule is checked. The moment that fires you are holding, and from then on only the exit rule is checked until you are out again. One position at a time, at full size, so the result you see is the rules working rather than a sizing decision layered on top of them.

What a condition looks like

A condition is a left side, an operator and a right sideleft sideoperatorright sidepricecrosses aboveSMA(200)read back to you as: price crosses above SMA(200)
Each side is a price, a number or an indicator. The operator is one of four.

Each side can be one of three things:

  • price — the closing price of the candle
  • a plain number, like 30 or 1.25
  • an indicator, like SMA(200), RSI(14) or upper Bollinger Band(20)

And the operator is one of four:

  • crosses above and crosses below — fire on the candle the crossing happens
  • is greater than and is less than — describe a state that can hold for a while

The difference between those two kinds matters more than it looks like it should.

From one condition to five

Each rule holds up to five conditions, and entry and exit are counted separately. So a strategy can carry as many as ten conditions in total, five deciding when you get in and five deciding when you get out.

Once a rule has more than one condition, you choose how they combine: match all, where every condition has to be true at the same time, or match any, where one is enough. Entry and exit each make that choice on their own, so an entry can demand all of its conditions while the exit accepts any of its. That choice does a lot to a strategy.

Whatever you build, the app reads the whole thing back to you in plain English before you save it.

What happens when a rule fires

Signals are produced by active strategies. Activate one and it joins the five-minute evaluation round; while it is inactive nothing is evaluated and no signal is recorded for it.

When a rule fires on an active strategy, the signal is written to your feed and an alert goes out on whichever channels you have switched on, within whatever your plan allows.

In a backtest the same fire buys or sells at the next candle's open. Never at the close that triggered it, because at the moment of that close you could not have acted on it yet. One candle of delay is the difference between a simulation you can trust and one that quietly cheats.

Read next

Write the rule. We'll watch for it.

Unlimited backtests on the free plan, and no card to start.

Caliente Signals is an alert tool, not an investment advisor. Nothing on this page is financial advice, and past performance is not indicative of future results.