1. The bar loop
The engine walks through the bars one at a time, in order. On every bar it does three things:
- Fill pending orders at the open. A signal seen on the previous bar's close becomes a market order here, and slippage is added against you.
- Check protective orders inside the bar. Stop, target and trailing stop are compared with the bar's high and low. If the bar opens beyond a level (a gap), the fill is the open price. If a single bar touches both the stop and the target, there's no way to know which came first, so the engine assumes the stop.
- Decide on the close. A position can be flattened at the session close, at a forced exit time, after a maximum number of bars, or because a signal exit fired (that last one fills at the next open). When flat, the entry rules are checked, subject to your entry window, trades-per-day cap and daily loss limit.
Every indicator only uses bars up to and including the current one, so a rule can never see the future. The opening range is blank until its window has fully closed.
2. Writing rules
A condition is left · comparison · right. Each side is a price field, an indicator or a
plain number, and the right side can be multiplied (e.g. Volume > 2 × Volume SMA(20)). Price points are in the symbol's own price units: dollars for stocks, for example 0.0010 for EURUSD.
crosses above is true only on the bar where the left side moves from at-or-below to above.
Within a block, choose whether ALL conditions must hold or ANY one is enough.
| Indicator | What it is |
|---|---|
| VWAP | Volume-weighted average price, reset every session. For symbols without volume it falls back to the session's average typical price. |
| Opening-range high / low | High / low of the session's first N minutes, known once that window closes. |
| Session open / high / low so far | Running values within today's session. |
| Previous close / high / low | Yesterday's session values. |
| Gap % | Today's open against yesterday's close. |
| Relative volume | This bar's volume divided by the average of the previous N bars. |
| Bar # in session | 1 for the first bar of the day, 2 for the next, and so on. Useful for "only in the first hour" rules. |
3. Sizing
% of equity buys that fraction of current equity. % equity risked sizes so that hitting the stop loses exactly that fraction, which is the usual day-trader approach, and it needs a stop. Fixed $ and fixed shares do what they say. Every size is capped at equity × max leverage.
4. Reading the results
- Profit factor: gross winnings divided by gross losses. Below 1 loses money. After costs, 1.2 to 1.5 is already good for intraday.
- Expectancy (R): average result per trade in units of the initial risk. +0.2R means each trade earns a fifth of what it risked, on average.
- Sharpe / Sortino: computed on daily equity changes and annualised (252 days, or 365 for 24/7 markets).
- Session replay: candles, the strategy's own indicators, and every fill. Use it to check that the rules do what you meant. Click a trade or a daily bar to jump to its session.
- Monte Carlo: your trades, resampled in 1,000 random orders. If only a small share of those orders ends in profit, the result depended on luck in the sequence. The "1-in-20 max DD" is a sounder drawdown estimate than the single historical one.
5. Markets
Choose Stocks, Crypto, Forex or Futures in the Market dropdown. Bars are cached on the server, so the first load of a symbol takes a few seconds and later runs are quick. The status bar under the controls shows how much history is available for the symbol and bar size you picked.
| Market | Symbols | Session |
|---|---|---|
| Stocks | US stocks and ETFs, e.g. SPY, AAPL, BRK.B | 09:30 to 16:00 New York time |
| Crypto | Pairs like BTCUSDT, ETHUSDT (BTC-USD also works) | 24/7. Each session is one UTC calendar day, so set entry windows in UTC. |
| Forex | Currency pairs like EURUSD, GBPUSD, USDJPY (EUR/USD also works) | 24 hours, Monday to Friday. Each session is one London trading day, so set entry windows in London time (London open 08:00, New York overlap 13:00 to 17:00). There is no volume data. |
| Futures | Contract roots like ES, NQ, CL, GC (continuous front month) | US day session only, 09:30 to 16:00 New York time. The overnight session is left out. |
Very long histories are capped at about 60,000 bars per symbol and bar size, because every bar is sent to the replay chart. For stocks, volume may cover only part of the market. The app warns you when a strategy's VWAP or volume rules depend on it. Daily prices are split and dividend adjusted, so very old prices can be pennies per share.
6. Not fooling yourself
- Fewer than 30 trades tells you almost nothing. Widen the history before believing it.
- Every parameter you tune to this window makes the result less likely to repeat. Tune on part of the history (use the Sessions box), then check the rest.
- Set realistic slippage. 1 to 2 bps on SPY is fair, but small caps and fast moves can be many times that.
- Not modelled: partial fills, halts, short-borrow availability, the pattern-day-trader rule, and the fact that your own orders move the price.