Blocks and Their Logic
Understand the Backtrex builder: custom condition blocks written by the AI, linked by AND, OR and THEN, with values and timeframe editable without the AI.
A strategy, made of blocks
Once your source is read, each rule becomes a block. A block is a custom condition, written by the AI for your strategy: there is no catalogue of ready-made blocks.
The builder is organised by side, Buy and Sell. Each side holds:
- Entry: when to open a trade
- Exit: when to close it before the stop or target (optional)
- Risk: stop loss, take profit and position settings
Anatomy of a block
- The title, with the timeframe badge beside it
- The sentence, saying in plain language what the condition checks
- The values (periods, thresholds, times, dates), editable in place
- The checkbox, on the right: checked, the condition is tested; unchecked, it is greyed out and ignored
- The pencil: opens the AI window to change the condition's logic
- The trash: deletes the block
A block changed since the backtest on display is marked Modified.
What changes without the AI
These actions are instant, and never count toward your gauge:
- A value: click a number, time or date and type the new value
- The timeframe: click the badge and pick from the list (M5, M15, H1, H4, D1). One control also moves every condition to the same timeframe at once.
- The checkbox: turn a condition on or off
- Deleting a block, stop and target included
What goes through the AI
Changing a condition's logic goes through the AI window:
- Click the block's pencil (the Edit the condition window) or + Condition (the New condition window)
- Describe what you want in your own words, paste a script excerpt or drop a file
- Click Start detection (or Ctrl+Enter). You can rerun it as often as you need.
- The proposed block appears under the input. Click Add the condition or Save.
Linking blocks: AND, OR, THEN
AND: on the same candle
All conditions linked by AND must be true on the same closed candle.
Close above the 200 EMA (H1)
AND RSI 14 below 30 (M15)
Every AND cuts the number of trades. A strategy that drops from 400 trades to 12 can no longer be measured.
OR: several paths
The builder shows the paths side by side: any of these paths is enough. What follows applies in every case.
Path A: break of the Asian session high
Path B: return into a bullish order block
and in every case: bullish engulfing candle
THEN: an ordered sequence
THEN chains steps in order, with a maximum delay in candles that you edit in place.
Step 1: price sweeps the previous day's low
Then, wait at most 20 candles
Step 2: bullish change of character on M15
A sequence can carry a guard, Cancelled if: for example, the sequence is cancelled if price closes below the swept low.
The last step is In position: stop, target, break-even, time exit, trades per day and exit conditions. The entry happens at the open of the next candle.
Special cases
Assumptions
When the source is ambiguous, the AI makes an assumption (a time zone, a period) and flags it on the condition. A low-confidence rule arrives unchecked, in its place in the chain. Check the assumption, fix the value if needed, then tick it.
Non-testable sentences
A sentence that cannot be coded becomes a greyed, dashed block, outside the chain, with no checkbox. It shows the reason, for example:
- volume is not in the data
- the order book is not in the data
- news is not in the data
- no measurable rule in the source
Click Make precise to rephrase it as a measurable rule, or delete it.
Conditions that read the future
A condition that needs future data cannot be added. The AI first tries to repair it. If it cannot, the window shows the refused block with the explanation, and the add button stays disabled.
Versions and drafts
- Each backtest freezes its own version of the strategy, which never changes again.
- Editing anything creates a draft, saved automatically. The builder says so: Draft, 1 change since backtest 7.
- Running the backtest freezes the draft into a new version.
- The backtest menu at the top switches the chart, the metrics and the builder together. The Latest and Best tags mark the most recent and the best scored.
Editing an old version creates a new draft: the old backtest stays intact.