Skip to main content

What a strategy can do

When you describe a strategy, the Office turns it into rules the research engine can run. This page lists what those rules can express, so you know what to ask for. You do not need to write any of it yourself; say it in your own words and review the rule sheet. The exact schema the Embodiments write against is published by the engine to them and to your own tools.

Direction​

Long only, short only, or both, where a signal in the other direction stops and reverses.

Entry and filter conditions​

  • Crossovers between two values, and comparisons against a level (above, below, at or above, at or below).
  • Time-of-day and trading-session windows.
  • Combinations with AND, OR and NOT.
  • "First time only" signals, a regime filter, and a setup that must be followed by a trigger within a number of bars.

Indicators and formulas​

  • Indicators: simple and exponential moving averages, standard deviation, Wilder's smoothing (RMA) and on-balance volume.
  • Formulas over open, high, low, close and volume: arithmetic, if/then/else, rolling sum, minimum and maximum, cumulative sum, and the value N bars ago.
  • Position values such as entry price, open profit and contracts held, and variables that carry state from bar to bar.

Orders​

  • Market at the next bar's open, or market on close.
  • Limit, stop and stop-limit orders offset from the close, or resting at a fixed price or at an indicator's value.

Exits​

ExitWhat it does
Fixed stopCloses at a set distance against you.
Trailing stopFollows the price and closes when it gives back a set distance.
Profit targetCloses at a set distance in your favour.
TimeCloses after N bars.
Break-evenMoves the stop to the entry price once in profit.
Session endCloses before the trading session ends.

Every strategy needs one protective stop. Whichever exit is hit first closes the position. Distances can be money (per contract or per position), ticks, percent, a price or a multiple of ATR. When several exits are hit within the same bar, the engine assumes the fill that is worst for you.

Position sizing​

Fixed units, a percent of equity, a fixed risk to the stop, or volatility risk measured by ATR. Pyramiding can add to a position up to a set number of entries.

Bring an existing strategy​

Strategies written in Pine Script or EasyLanguage can be imported, and a strategy can be exported to EasyLanguage. Ask the Office to import yours, then review the rule sheet it produces.