Appearance

Personalize your experience

Mode
Accent Color
Direction
Step 5 — Entry Signals

Step 5 — Entry Signals

Wizard step

Where the strategy is actually written. Conditions, operators, nesting, order configuration, multiple entry sets, and the re-entry engine behind Grid, DCA and Pyramid.

Anatomy of a condition

Every condition is one comparison: left operand → operator → operand. Either side can be an indicator, a , a constant, or a custom formula. Conditions combine with AND and OR into groups, and groups nest, which is the whole of the language.

Condition and condition group
┌────────────────────────────────────────────────────────────────┐
│                       CONDITION                                 │
│                                                                │
│   ┌──────────────┐   ┌──────────────┐   ┌──────────────┐       │
│   │ LEFT OPERAND │   │   OPERATOR   │   │ RIGHT OPERAND│       │
│   ├──────────────┤   ├──────────────┤   ├──────────────┤       │
│   │  Indicator   │ ▶ │  >   <   ==  │ ▶ │   Constant   │       │
│   │  Price field │   │  >=  <=  !=  │   │   Indicator  │       │
│   │  Custom expr │   │ crossesAbove │   │   Price field│       │
│   │              │   │ crossesBelow │   │   Custom expr│       │
│   └──────────────┘   └──────────────┘   └──────────────┘       │
│                                                                │
│   ┌──── CONDITION GROUP  (AND / OR) ────┐                       │
│   │   Condition 1                        │                      │
│   │   Condition 2       AND → all true   │                      │
│   │   Condition 3       OR  → any true   │                      │
│   │   [ nested group ]                   │                      │
│   └──────────────────────────────────────┘                      │
└────────────────────────────────────────────────────────────────┘
RSI OVERSOLD AND (MACD BULLISH OR SUPERTREND FLIP) AND VOLUME CONFIRMSANDall must holdconditionRSI(14) < 30ORconditionMACD > 0conditionST flips upeither one satisfies the groupconditionVol > avg×1.5nesting is unlimited, but past three levels a tree stops being readable — and stops being debuggable
A nested tree: an oversold trigger, either of two confirmations, and a volume filter.
ℹ
Note:Conditions in an AND group evaluate left to and short-circuit — a false result skips the rest. OR groups stop at the first true. Put cheap comparisons before expensive indicators and the does less work per bar, which matters on long backtests.
nested condition group
AND {
  RSI(14)  crossesAbove  30               # primary trigger
  OR {
    MACD(12,26,9)  crossesAbove  0        # confirmation A
    Supertrend(10,3)  ==  "bullish"       # confirmation B
  }
  Volume  >  Mean(Volume, 20) * 1.5       # volume filter
  HourOfDay  >=  10                       # time filter
  HourOfDay  <   15
}
!
Caution:Nesting is unlimited. Keep it under three levels anyway. Past that, nobody — including the person who wrote it — can predict what the tree does without tracing it by , and a condition you cannot reason about is a condition you cannot debug when it misfires.

Operators

Eight operators, in two families that behave completely differently. Confusing a value comparison with a crossover is the most common mistake in the builder, and it is worth being precise about the distinction.

OperatorTypeDescription
>comparisonTrue while the left exceeds the . Re-evaluates every bar and stays true.
<comparisonTrue while the left is below the .
>=comparisonTrue while the left is at or above the .
<=comparisonTrue while the left is at or below the .
==comparisonExact equality. Treat with suspicion on indicator output: two floating-point values that should be equal frequently are not.
!=comparisonTrue while the values differ.
crossesAbove*crossoverFires once, on the bar where the left goes from below the to at-or-above it. Silent on every subsequent bar it remains above.
crossesBelow*crossoverFires once, on the bar where the left goes from above the to at-or-below it.
RSI(14) crossesAbove 30309727.39829.19931.810034.210128.510232.110336.410433.0FIRESFIRESstill above — no fresh crossing, no signalbarthe value must first go back below 30 to arm the next cross
RSI crossing 30 twice. The signal fires on the crossing bar only, and needs to go back below to arm again.
★
Pro tip:The rule of thumb: crossesAbove and crossesBelow are triggers — they answer “did something just happen”. > and < are filters — they answer “is the environment acceptable”. A working entry usually has exactly one and one or two filters. Two triggers in one AND group is nearly always a bug: they have to fire on the same bar, which they rarely do.

Evaluation, bar by bar

Understanding the order of operations explains most surprising behaviour — particularly why a condition that looks true on the chart did not produce a trade.

What happens when a bar closes
Before bar 1: every series the strategy uses is computed once
              over the whole history (no value during warm-up)

Bar N closes
│
├─1─ Protective exits for positions opened on earlier bars
│      stop → targets → time exit / max loss → session square-off
│
├─2─ Exit signals: conditions true → repetition → cooldown → flow
│      └─ acts → every open position closes at the close
│
├─3─ Entry signals: conditions true → repetition → cooldown → flow
│      └─ position rules: maxPositions, session window,
│         daily loss limit, re-entry rules when already holding
│      └─ all pass → position opens at the close
│
├─4─ Layered entry sets: own signals + gap from the previous layer
│
└─5─ Equity marked to market; daily loss limit checked
ℹ
Note: steps 5 and 6. A resolving true is necessary but not sufficient: cooldown, , position limits and the spread all sit between a true condition and an order. If the chart shows a signal and the backtest shows no trade, one of those four filters swallowed it, and the will say which.

Indicators

Over a hundred indicators are available on either side of a comparison. The full reference has parameters and interpretation for each; this is the of the .

Trend — moving averages

  • ·SMA(period)
  • ·EMA(period)
  • ·WMA(period)
  • ·DEMA / TEMA
  • ·HMA(period)
  • ·KAMA(p, fast, slow)
  • ·VWMA(period)

Trend — advanced

  • ·Supertrend(period, mult)
  • ·Parabolic SAR(step, max)
  • ·Ichimoku(conv, base, span)
  • ·ADX(period)
  • ·DI+ / DI−
  • ·TRIX(period)

Momentum

  • ·RSI(period)
  • ·MACD(fast, slow, signal)
  • ·Stochastic(%K, %D)
  • ·CCI(period)
  • ·Williams %R
  • ·ROC(period)
  • ·MFI(period)

Volatility

  • ·ATR(period)
  • ·Bollinger Bands(p, std)
  • ·Keltner Channel
  • ·Donchian Channel
  • ·NATR(period)

Volume

  • ·OBV
  • ·VWAP
  • ·Money Flow Index
  • ·AD Line
  • ·CMF
  • ·Volume EMA

Math & statistics

  • ·Abs / Sqrt / Log
  • ·StdDev / Variance
  • ·ZScore
  • ·Correlation
  • ·LinRegSlope
  • ·Percentile

Signal patterns that work

Effective entries combine indicator , not indicator counts. Three momentum oscillators tell you the same thing three times; a trend plus a momentum trigger plus a volume confirmation tell you three different things.

Trend following with momentum confirmation

swing trading in a trend
AND {
  EMA(21)  >  EMA(55)                     # regime filter: uptrend
  Close  crossesAbove  EMA(21)            # trigger: pullback recovered
  RSI(14)  >  40   AND   RSI(14)  <  70   # filter: neither extreme
  ADX(14)  >  20                          # filter: the trend has strength
}

Mean reversion with a volatility filter

counter-trend in a range
AND {
  RSI(14)  crossesAbove  30               # trigger: oversold, turning
  Close  <  BB_Lower(20, 2)               # filter: genuinely stretched
  ATR(14)  >  ATR(14)[20]                 # filter: volatility expanding
  Volume  >  Mean(Volume, 20) * 1.2       # filter: someone is participating
}

Breakout with participation

momentum breakout
AND {
  Close  >  Max(High, 20)                 # trigger: 20-bar breakout
  Volume  >  Mean(Volume, 20) * 2         # filter: volume surge
  MACD(12,26,9)  >  0                     # filter: momentum agrees
  OR {
    ADX(14)  >  25                        # either a strong trend …
    ATR(14) / Close * 100  >  2           # … or enough volatility to travel
  }
}
!
Caution:A breakout without volume confirmation is the false-positive generator. Price can print a new high on nothing at all, and a that acts on it buys the top of a move that had no behind it.

Order configuration

When a condition fires, an order goes out with these parameters. The side is set automatically from the signal direction.

FieldTypeDefaultDescription
orderType"market" | "limit""market"Market immediately at whatever the book offers. Limit rests at a price and may never fill.
orderSide"buy" | "sell"—Derived from the signal. Buy is a long entry, sell a short entry.
timeInForce"day" | "fill-or-kill" | "IOC""day"Day rests until the closes. Fill-or- entirely or cancels. IOC fills what is available and cancels the remainder.
limitPricenumber—Required for limit orders — the you will buy or lowest you will sell. Can reference an indicator rather than a constant.
★
Pro tip:The choice between market and limit is a choice about which risk you prefer. A market order accepts price uncertainty to guarantee a fill; a guarantees the price and accepts that you may miss the trade. For a breakout , missing the trade defeats the purpose — use market. For a mean-reversion entry into a level, a missed fill costs nothing.

Multiple entry sets

With enabled in Settings, you can define independent entry sets, each with its own conditions, order configuration and label. Any set whose conditions are satisfied can open a trade.

Two independent entry sets behind one dispatcher
┌──────────────────────────────────────────────────────┐
│                MULTI-ENTRY DISPATCHER                 │
│                                                       │
│  ┌────────────────────┐   ┌────────────────────┐     │
│  │ entry set A        │   │ entry set B        │     │
│  │ "RSI oversold"     │   │ "MACD cross"       │     │
│  │                    │   │                    │     │
│  │ RSI(14) < 30       │   │ MACD crossesAbove  │     │
│  │ AND Close < BB_Low │   │   Signal           │     │
│  │ AND Volume > avg   │   │ AND ADX > 20       │     │
│  └─────────┬──────────┘   └─────────┬──────────┘     │
│            │ true?                  │ true?          │
│            ▼                        ▼                │
│  ┌──────────────────────────────────────────┐        │
│  │              SIGNAL MERGER                │        │
│  │  highest priority fires first, or all     │        │
│  │  fire independently when priorities tie   │        │
│  └────────────────────┬─────────────────────┘        │
│                       ▼                              │
│              order placement                         │
└──────────────────────────────────────────────────────┘
FieldTypeDefaultDescription
entriesEntrySet[]—Entry configurations, each with id, label, and order configuration.
entry.labelstring—Human-readable name — " Oversold", "MACD ". Appears in backtest trade logs, which is where it earns its keep.
entry.prioritynumber0When several sets fire on one bar, higher goes first. Equal priorities all fire.
★
Pro tip:Label every set, even when there are only two. An unlabelled set shows up in the as an index, and working out which of “entry 1” and “entry 2” is the one losing money means reopening the builder and reading conditions.

Re-entry

Re-entry settings decide when additional entries fire after the first. This is the engine behind Grid, DCA and Pyramid — the Settings step chooses the , this configures the distances and the limits.

FieldTypeDefaultDescription
reEntry.enabledbooleanfalseTurn re-entry on.
reEntry.mode"cooldown" | "grid" | "dca" | "pyramid"—What triggers an additional entry — elapsed bars, or distance travelled.
reEntry.cooldownBarsnumber5Minimum bars between consecutive entries.
reEntry.maxReEntriesnumber3Hard cap on additional entries before the position must close. The single most field on this .
reEntry.distanceFromEntrynumber—Minimum price distance from the first entry before another is allowed.
reEntry.distanceType"fixed" | "percentage" | "atr""percentage"How that distance is measured.
reEntry.spreadFilternumber—Maximum acceptable bid-ask spread for a re-entry order.
The four re-entry modes on the same entry
GRID RE-ENTRY                          DCA RE-ENTRY
entry @ 100                            entry @ 100
│                                      │
├─ level 1   buy @ 97   (−3%)          ├─ safety 1   buy @ 95   (−5%)
│            100 units                 │             150 units   (1.5× base)
├─ level 2   buy @ 94   (−6%)          ├─ safety 2   buy @ 90   (−10%)
│            100 units                 │             225 units   (1.5× prev)
├─ level 3   buy @ 91   (−9%)          ├─ safety 3   buy @ 83   (−17%)
│            100 units                 │             338 units   (1.5× prev)
│                                      │
└─ 400 units,  average 95.50           └─ 813 units,  average 90.28


PYRAMID RE-ENTRY                       COOLDOWN RE-ENTRY
entry @ 100                            entry @ bar 0
│                                      │
├─ add @ 105  (+5%)                    ├─ re-entry  bar 10    (cooldown 10)
│            75 units   (75% of base)  │
├─ add @ 110  (+10%)                   ├─ re-entry  bar 25    (cooldown 10)
│            50 units   (50% of base)  │
│                                      ├─ max re-entries reached  (max 3)
└─ 225 units,  average 104.44          └─ 3 entries over 25 bars
!
Caution:maxReEntries is what stands between a DCA ladder and an unbounded one. Look at the DCA column above: three at 1.5× each turn 100 units into 813, and the average entry is 90.28 while price is at 83. A fourth and fifth level compound that. Set the cap by asking what the fully- ladder costs, not what the first entry costs.

Signal presets

Presets are working condition you can apply in one click and then adjust. Starting from one is faster than starting from nothing, and it shows the a sound condition takes.

Golden Cross

SMA(50) crossesAbove SMA(200) — the long-term trend .

Supertrend Buy

Close crossesAbove (10,3) — an -based trend reversal.

RSI Oversold Bounce

(14) crossesAbove 30 — mean reversion out of oversold.

MACD Bull Cross

MACD(12,26) crossesAbove Signal(9) — a momentum shift upward.

Bollinger Bounce

Close crossesAbove BB_Lower(20,2) — recovery from the lower .

Donchian Breakout

Close > Max(High, 20) — a break of the 20-bar high.

Triple Confirmation

> 30 AND MACD > 0 AND Close > SMA(50) — three-layer agreement.

Flow control

The inline editor adds if / elif / else branching inside a signal, so a can use a different entry rule depending on the regime it detects. The first matching block wins; if none match, no signal is emitted.

Regime-dependent entry selection
if   ( ADX(14) > 25  AND  Supertrend == bullish )
       entry type   TREND_FOLLOW
       trigger      Close crossesAbove EMA(21)

elif ( RSI(14) < 30  AND  Close < BB_Lower )
       entry type   MEAN_REVERSION
       trigger      RSI crossesAbove 30

elif ( Volume > Mean(Volume,20) × 3  AND  Range > 2 × ATR )
       entry type   BREAKOUT
       trigger      Close > Max(High, 20)

else
       no entry — wait for a clearer regime

the first matching block wins; if none match, no signal is emitted
adaptive strategy
flow {
  if (ADX(14) > 25) {
    # trending — follow it
    entry: EMA(9) crossesAbove EMA(21) AND RSI(14) > 40
    type: "trend_follow"
  }
  elif (BB_Width(20,2) < Percentile(BB_Width, 100, 10)) {
    # squeezed — wait for the expansion
    entry: Close > BB_Upper(20,2) AND Volume > Mean(Volume, 20) * 2
    type: "breakout"
  }
  else {
    # range-bound — fade the extremes
    entry: RSI(14) crossesAbove 30 AND Close < BB_Lower(20,2)
    type: "mean_reversion"
  }
}
!
Caution:Flow control multiplies the number of things being fitted. Three branches with their own parameters is three strategies sharing one backtest, and each of them is validated on roughly a third of the . If you use it, judge each branch on its own , not on the combined .

Three ways to build entry conditions

The builder offers three for defining entry conditions — a -and-drop form editor, a node graph, and a -based DSL. All three work on the same and sync in real time, so you can switch between them at any without losing work. Choose the one that fits your workflow, or use different modes for different tasks.

BUILDER MODES — CHOOSE YOUR INTERFACEEasePowerSpeedLearn⬚ Drag-Drop◉ Node{ CodeEase: beginner-friendly · Power: expressiveness · Speed: expert velocity · Learn: learning curveall three modes sync in real-time — switch anytime without losing work
Each mode has different strengths — ease of use, expressive power, editing speed, and learning curve.
All three views sync instantly over shared state
THREE REPRESENTATIONS, ONE SOURCE OF TRUTH
──────────────────────────────────────────────────────────────

┌──────────────┐       ┌──────────────┐       ┌──────────────┐
│  DRAG-DROP   │◀─────▶│  NODE GRAPH  │◀─────▶│   CODE DSL   │
│   BUILDER    │  sync │   BUILDER    │  sync │   BUILDER    │
└──────────────┘       └──────────────┘       └──────────────┘
       │                       │                       │
       └───────────────────────┼───────────────────────┘
                               ▼
                   ┌───────────────────────┐
                   │   STRATEGY STORE      │
                   │   (internal JSON)     │
                   └───────────────────────┘
                               │
                    ┌──────────┼──────────┐
                    ▼          ▼          ▼
              ┌─────────┐ ┌────────┐ ┌────────┐
              │Evaluator│ │Backtest│ │ Export │
              └─────────┘ └────────┘ └────────┘


SWITCHING MODES:

Edit in drag-drop  ─▶  switch to code  ─▶  DSL appears, fully populated
Edit in code       ─▶  switch to nodes  ─▶  graph updates, connections intact
Edit in nodes      ─▶  switch to drag   ─▶  forms reflect node structure

Changes made in ANY mode propagate to ALL modes instantly.
The builder you see is a view over shared state — not three separate systems.

Drag-and-drop builder

The form-based builder presents entry conditions as a hierarchy of dropdowns, input fields, and nested groups. components from the palette onto the canvas, configure their parameters inline, and nest condition groups by drag-and-drop. Best for beginners, exploratory work, and when you want to see all parameters at a glance.

Component palette and canvas layout
┌──────────────────────────────────────────────────────────────────────────────┐
│                       DRAG-AND-DROP BUILDER                                  │
├──────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│  ┌─────────────────┐          ┌──────────────────────────────────────────┐  │
│  │   PALETTE       │          │       CANVAS                              │  │
│  ├─────────────────┤          ├──────────────────────────────────────────┤  │
│  │ ⬚ Indicator     │   drag   │  ┌─ AND Group ─────────────────────────┐ │  │
│  │ ⚙ Operator      │   ───▶   │  │ ⬚ RSI(14) > 30                      │ │  │
│  │ # Constant      │          │  │ ⬚ Volume > Mean(Volume,20) × 1.5    │ │  │
│  │ & AND Group     │   drop   │  │ ┌─ OR Group ───────────────────────┐ │ │  │
│  │ | OR Group      │   ───▶   │  │ │ ⚙ MACD crossesAbove 0           │ │ │  │
│  │ ƒ Custom Expr   │          │  │ │ ⬚ Close > EMA(50)               │ │ │  │
│  └─────────────────┘          │  │ └─────────────────────────────────┘ │ │  │
│                               │  └─────────────────────────────────────┘ │  │
│  Visual form fields:          │                                          │  │
│  • Drop-downs for operators   │  Right-click menu:                       │  │
│  • Auto-complete for funcs    │  • Edit condition                        │  │
│  • Inline parameter editing   │  • Wrap in AND/OR                        │  │
│  • Colour-coded types         │  • Delete                                │  │
│                               │  • Duplicate                             │  │
└──────────────────────────────────────────────────────────────────────────────┘

BEST FOR:  Beginners, visual thinkers, exploratory work
WORKFLOW:  Select component → configure params → drag to canvas → nest groups
SYNC:      Changes reflect instantly in node and code views
DRAG-AND-DROP BUILDER — VISUAL FORM-BASED EDITORComponentsIndicatorOperatorConstantAND GroupOR GroupCondition CanvasAND GroupRSI(14) > 30Volume > Mean(Volume, 20) × 1.5OR GroupMACD crossesAbove 0Close > EMA(50)drag components from palette → drop onto canvas → configure → nest groups
Drag components from the left palette, drop them onto the canvas, and nest groups visually.

Step-by-step: building an RSI oversold entry

ℹ
Note:Goal: Enter when crosses above 30, volume confirms, and price is above the 50 .
  • Click "Add AND Group" from the palette — this becomes the root condition
  • an "Indicator" component into the AND group
  • Click the indicator to configure: select , set to 14
  • Set the operator dropdown to "crossesAbove"
  • Set the operand to constant 30
  • Add a second condition: Volume > Mean(Volume, 20) * 1.5
  • Add a third condition: Close > (50)
  • Click "Preview on Chart" to see entry arrows on historical bars
  • Adjust parameters and watch arrows update in real time
  • Save the entry set with a descriptive label like " Oversold Recovery"
★
Pro tip:-click any condition to wrap it in a new AND/OR group, duplicate it, or convert it to a . The context menu is the fastest way to restructure an existing tree.

Node builder

The node-based builder represents conditions as a graph. Indicator nodes output values, comparison nodes output booleans, and logic gates combine them into the final signal. Connect nodes by dragging from output ports to input ports. Best for understanding signal , complex nested conditions, and thinkers who prefer graphs over forms.

Node types and data flow
┌──────────────────────────────────────────────────────────────────────────────┐
│                           NODE BUILDER                                       │
├──────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│  Node types:                                                                 │
│  ┌────────────┐   ┌────────────┐   ┌────────────┐   ┌────────────┐         │
│  │ INDICATOR  │──▶│ COMPARATOR │──▶│ LOGIC GATE │──▶│   SIGNAL   │         │
│  │  RSI(14)   │   │    > 30    │   │    AND     │   │   OUTPUT   │         │
│  └────────────┘   └────────────┘   └────────────┘   └────────────┘         │
│                                                                              │
│  Canvas layout:                                                              │
│  ┌────────────────────────────────────────────────────────────────────────┐ │
│  │                                                                        │ │
│  │  ◉ RSI(14) ─────▶ ◈ > 30 ──┐                                         │ │
│  │                              ├─▶ ◆ AND ──▶ ◉ SIGNAL                   │ │
│  │  ◉ Volume ──▶ ◈ > Mean×1.5 ─┤                                         │ │
│  │                              │                                         │ │
│  │  ◉ MACD ────▶ ◈ crossAbove ─┼─▶ ◆ OR ────┘                            │ │
│  │  ◉ Close ───▶ ◈ > EMA(50) ──┘                                         │ │
│  │                                                                        │ │
│  │  Connection rules:                                                     │ │
│  │  • Indicators output values → comparators                             │ │
│  │  • Comparators output booleans → logic gates                          │ │
│  │  • Logic gates output booleans → signal or other gates                │ │
│  │  • Cannot connect incompatible types (validation enforced)            │ │
│  └────────────────────────────────────────────────────────────────────────┘ │
│                                                                              │
│  Interactions:                                                               │
│  • Click node to edit parameters                                             │
│  • Drag from output port to input port                                       │
│  • Delete connection by clicking the wire                                    │
│  • Auto-layout: spacebar to organize graph                                   │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

BEST FOR:  Visual data flow, complex nested conditions, understanding signal path
WORKFLOW:  Add nodes → connect ports → configure → see data flow visually
SYNC:      Generates equivalent DSL code and form representation
NODE BUILDER — VISUAL DATA FLOW GRAPHRSI(14)> 30Volume> Mean×1.5MACDcrossAboveClose> EMA(50)ORANDSIGNALconnect nodes → data flows left to right → logic gates combine → signal emits
Indicators flow into comparisons, comparisons flow into logic gates, gates combine to signal output.

Step-by-step: building a trend-following entry with confirmation

ℹ
Note:Goal: Enter when price crosses above (21) AND either MACD is bullish OR ADX shows a strong trend.
  • Add an "Indicator" node from the node palette, configure it as Close
  • Add another indicator node for (21)
  • Add a "Comparator" node, set operator to "crossesAbove"
  • Connect Close output → left input of comparator
  • Connect (21) output → input of comparator
  • Add MACD(12,26,9) indicator and a comparator for "crossesAbove 0"
  • Add ADX(14) indicator and a comparator for "> 25"
  • Add an OR gate, connect the MACD and ADX comparators to it
  • Add an AND gate, connect the Close> condition and the OR gate
  • Connect the AND gate output to the Signal Output node
  • Click "Run Graph" to validate connections and see output on chart
!
Caution:The node graph enforces type safety: you cannot connect an indicator output directly to a logic gate, or a boolean output to a comparator's input. If a refuses to snap, check that the port match — value to value, boolean to boolean.
★
Pro tip:Press Spacebar to auto-layout the graph. This reorganizes nodes into a clean left-to- , which makes a tangled graph readable again in one keystroke.

Code builder (DSL)

The DSL editor is a interface with syntax highlighting, autocomplete, and inline validation. Write conditions in a concise language that reads like pseudocode, with full control over every . Best for advanced users, bulk edits, template generation, and version control workflows where strategies are stored as text files in git.

DSL editor features and shortcuts
┌──────────────────────────────────────────────────────────────────────────────┐
│                           CODE BUILDER (DSL)                                 │
├──────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│  ┌─────────────────────────────────────────────────────────────────────────┐│
│  │ entry.dsl                                               [validate] [▶]  ││
│  ├─────────────────────────────────────────────────────────────────────────┤│
│  │ 1  AND {                                                                ││
│  │ 2    # Primary trigger                                                  ││
│  │ 3    RSI(14) > 30                                                       ││
│  │ 4                                                                       ││
│  │ 5    # Volume filter                                                    ││
│  │ 6    Volume > Mean(Volume, 20) * 1.5                                    ││
│  │ 7                                                                       ││
│  │ 8    # Confirmation — either condition satisfies                        ││
│  │ 9    OR {                                                               ││
│  │ 10     MACD(12,26,9) crossesAbove 0                                     ││
│  │ 11     Close > EMA(50)                                                  ││
│  │ 12   }                                                                  ││
│  │ 13                                                                       ││
│  │ 14   # Time filter                                                      ││
│  │ 15   HourOfDay >= 10 AND HourOfDay < 15                                 ││
│  │ 16 }                                                                    ││
│  └─────────────────────────────────────────────────────────────────────────┘│
│                                                                              │
│  Features:                                                                   │
│  ✓ Syntax highlighting         ✓ Inline error markers                       │
│  ✓ Auto-complete (Ctrl+Space)  ✓ Parameter hints                            │
│  ✓ Bracket matching            ✓ Multi-cursor editing                       │
│  ✓ Comment with #              ✓ Import/export full strategy                │
│  ✓ Format on save              ✓ Validation on type                         │
│                                                                              │
│  Keyboard shortcuts:                                                         │
│  • Cmd/Ctrl + S     → Save & validate                                        │
│  • Cmd/Ctrl + /     → Toggle comment                                         │
│  • Cmd/Ctrl + D     → Duplicate line                                         │
│  • Cmd/Ctrl + F     → Find & replace                                         │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

BEST FOR:  Advanced users, bulk edits, version control, template generation
WORKFLOW:  Write DSL → validate → preview chart → export for git versioning
SYNC:      Parses to form and node graph automatically
CODE BUILDER — DSL TEXT EDITOR WITH SYNTAX HIGHLIGHTINGentry.dsl123456789AND{RSI(14) > 30Volume>Mean(Volume, 20) * 1.5OR{MACDcrossesAbove0Close>EMA(50)}}# validates on savewrite DSL directly → syntax highlighting → autocomplete → instant validation → import/export
Syntax-highlighted editor with autocomplete, bracket matching, and instant validation.

Step-by-step: writing a breakout entry in DSL

ℹ
Note:Goal: Enter on a 20-bar breakout with volume surge and momentum confirmation.
breakout entry — complete DSL
# Breakout entry with volume and momentum confirmationAND {  # Primary trigger — 20-bar high breakout  Close > Max(High, 20)    # Volume filter — surge above average  Volume > Mean(Volume, 20) * 2.5    # Momentum confirmation — MACD already positive  MACD(12,26,9) > 0    # Volatility filter — enough room to move  OR {    ADX(14) > 25              # strong trend    ATR(14) / Close * 100 > 2 # or sufficient volatility  }    # Time window — avoid open and close  HourOfDay >= 10  HourOfDay < 15}
  • Open the Code Builder tab in the entry step
  • Start typing "AND" — autocomplete suggests condition keywords
  • Type opening { and the editor adds the closing brace automatically
  • Write each condition on its own line — left operand, operator, operand
  • Use # for comments — they help six months from now when you revisit this
  • Nest groups by writing OR { inside the AND { block
  • Press Ctrl+Space anywhere to autocomplete for indicators and operators
  • Save with Cmd/Ctrl+S — validation runs automatically and marks errors inline
  • Click "Preview" to see the parsed and chart arrows
  • Export the DSL with "Copy to Clipboard" for version control or
★
Pro tip:DSL is where bulk edits shine. Need to change (14) to RSI(21) across twelve conditions? Find-and-replace does it in two seconds. Need to add a time to every entry set? Copy the two lines and paste them into each block. The form and node builders make you click through every instance.

Switching between builder modes

The three builders are over the same , not three separate systems. Changes made in any propagate to the others instantly, and switching is non-destructive — no is lost, no structure is flattened.

From → ToDescription
Form → CodeThe DSL editor populates with the exact structure you built in the form, including group nesting and comments if you them.
Form → NodesEach condition becomes a comparator node, each group becomes a logic gate, and connections are laid out automatically.
Code → FormThe form parses the DSL and rebuilds the tree. Comments are preserved but not displayed in the form.
Code → NodesThe graph generates from the parsed DSL. Auto-layout runs automatically so the initial graph is readable.
Nodes → FormEach node becomes a form field or group, preserving the structure you wired on the canvas.
Nodes → CodeThe DSL serializes from the graph. You get syntactically correct code even if you have never written DSL.
ℹ
Note:Use the switcher in the top- of the entry . The switch is instant — there is no "convert" or "export" step, because all three are reading and writing the same internal representation.

Visual node builder

An alternative to the form editor: a canvas where indicator nodes, condition nodes, logic gates and signal outputs are wired together. Nodes generate the same condition groups the form produces and sync both ways, so you can switch representation at any without losing work.

Data nodes

  • ·Indicator node — configurable parameters, outputs a value per bar
  • ·Condition node — two inputs and an operator, outputs a boolean per bar

Logic nodes

  • ·Logic gate — AND, OR or NOT over several boolean inputs
  • ·Signal output — terminal node that emits the entry or exit

Filters & layout

  • ·Time filter — gates by hour, weekday or session state
  • ·Group box — visual container only, no effect on logic
★
Pro tip:The chart draws entry arrows on historical as you — green up for longs, red down for shorts. Watching arrows appear and disappear as you change a parameter is a far faster loop than running a backtest, and it catches the gross errors immediately: no arrows at all, or an arrow on every single bar.

Before moving on

  • Chosen a builder that fits your workflow — form, nodes, or code
  • Tried the chart preview to see entry arrows on historical bars
  • Started from one condition and only where it earned its place
  • Exactly one per entry set — the rest are filters
  • A confirmation present to cut false signals
  • Two or three different indicator , not three of the same type
  • Condition count per signal under five
  • : re-entry cap and cooldown set deliberately
  • Entry sets labelled so the is readable
  • Entry arrows visible on the chart preview, in plausible places
  • A quick backtest run: 50–200 is a healthy signal frequency
  • If using DSL: exported the code for version control or template reuse

See also

Related articles

  • Step 6 — Exit & Risk

    Automation / Strategy Builder / Wizard Steps

    Exit conditions, stop loss, take profit, staged partial exits and portfolio-level limits. The step that decides whether a losing trade costs you a percent…

  • Step 0 — Particulars

    Automation / Strategy Builder / Wizard Steps

    Identity and metadata: the name, description, tags and visibility that make a strategy findable a year from now. Also where the immutable Strategy ID is minted.

  • Step 1 — Settings

    Automation / Strategy Builder / Wizard Steps

    Global behaviour that decides how entries and exits interact: whether the strategy builds a position in stages, which multi-entry model it follows, and how…

  • Step 2 — Tagging

    Automation / Strategy Builder / Wizard Steps

    Optional. Client order ID templates, signal-level metadata and order linking — the machinery that makes live orders reconcilable against broker statements.

  • Step 3 — Symbol

    Automation / Strategy Builder / Wizard Steps

    The trading context: broker, segment, instrument, timeframe and session mode. These choices decide what data exists, what order types are available, and…

  • Step 4 — Quantity & Capital

    Automation / Strategy Builder / Wizard Steps

    How much to trade. Four sizing modes, the capital they draw on, the leverage applied, and how capital is divided across entry sets.

  • Step 7 — Strategy Testing

    Automation / Strategy Builder / Wizard Steps

    The testing step offers three modes, each answering different questions about strategy behavior. Use all three in sequence: backtest to validate logic,…

  • Step 8 — Review & Deploy

    Automation / Strategy Builder / Wizard Steps

    Review is the final step before deployment. It presents the complete strategy configuration in one place, runs validation checks, highlights errors and…

  • Strategy DSL — Language Reference

    Coding / Strategy DSL

    The strategy JSON the C++ engine executes: every top-level block, signals and flow, operands and the 94-indicator catalog, the eleven operators, and the…

Browse all knowledge base articles →