Docs menu

How a strategy flow works

The block categories, the order in which blocks connect, and what happens when a flow gets large.

A strategy flow is a set of connected blocks. It starts at a Start block and ends at an order. This page explains the categories of blocks and how to connect them.

Block categories

The palette groups the 129 blocks into the categories below. The names and counts come from the Builder itself.

Category in the paletteBlocks
Utility2
Indicators57
Price / Info5
Conditions12
Filters22
Actions16
Money Mgmt7
Exit Strategy8

The order of a flow

A flow reads from left to right.

  1. Start is the entry point. It runs on every tick. Connect its output to an indicator or a condition.
  2. Indicators and Price / Info blocks produce values, such as a moving average or the current price. Connect them to a condition. An indicator cannot connect straight to an order.
  3. Conditions compare values and give a yes or no. Compare tests two values with an operator such as > or <=. Cross detects a crossover or crossunder. The AND Gate, OR Gate and NOT Gate combine other conditions. Connect a condition to an action.
  4. Filters go between a condition and an action. A filter blocks trades you do not want, for example outside a time window or when the spread is wide.
  5. Actions are the last step of a flow. They include Open Buy, Open Sell, the pending orders (Buy Limit, Sell Limit, Buy Stop, Sell Stop), Close Position and Alert. Connect a condition to the input of an action.
  6. Money Mgmt blocks set how the lot size is chosen, for example Fixed Lot or Risk-Based Lot.
  7. Exit Strategy blocks set how a position closes, for example Stop Loss, Take Profit, Trailing Stop and Break Even.

In short, a typical entry is Start, then an indicator, then a condition, then an optional filter, then an action. Lot size and exits come from the money management and exit blocks, or from the same options in the Settings tab.

A flow from left to right: Start feeds an RSI block, RSI and a Constant feed a Compare block, and Compare feeds Open Buy.
Start, an indicator and a value, a Compare condition, then an Open Buy action.

The Builder checks the order for you. Connecting an indicator straight to an action is error E205, and a condition-less action raises warning E204. See Validation messages.

Pending orders and stops in detail

Four parts give finer control over pending orders and protective stops. All of them are MT5 only. Exporting a design that uses one to another target is refused with a reason, and nothing is dropped silently. Each setting is off or unchanged by default, so a flow built without them keeps its present output.

  • Pending Orders Manager (Actions) looks after the pending orders of this strategy on the chart symbol. Delete in a time window removes them inside a weekday and hour window, for example Friday from 20:00 to 24:00 server time. Also delete orders older than removes them by age. Remember prices and re-place them later stores the prices at one hour and places the orders again at another hour. A price is dropped when it is already on the wrong side of the market, when it sits on the wrong side of the value connected to the block, or when a pending order or position is already at that price. The memory lives inside the running strategy, so it is lost if the strategy restarts. It works with one symbol only.
  • Level Latch (Conditions) remembers a connected value, such as the day high, at a set server time. It becomes true once, on the first tick that breaks the remembered value upward or downward, and stays true for the minutes you set. It cannot fire again until the value is remembered again. Use one block for the upside and one for the downside. It works with one symbol only.
  • Buy Stop and Sell Stop have four extra settings. Count pending orders per can be set to this block with a maximum, so one block can hold several pending orders at once. Skip if the price is already taken checks for the same price, with a tolerance in points. Allow offset 0 / fractional pips lets the offset be 0 or a decimal.
  • Break Even and Trailing Stop accept a distance in decimal pips or in points. They can use separate values for sells. Trailing Stop can follow only until the stop reaches break-even (Before break-even only), or only after it, one step at a time (After break-even only). Break Even has a Sell break-even formula setting. The default places a sell’s stop below the entry price. The compatibility choice makes sells use the buy formula, to reproduce a strategy that behaves that way.

Settings that apply to the whole strategy

The Settings tab holds options that are not tied to one block: lot size, the default stop loss and take profit, when the flow is evaluated, filters, exits, position management, risk limits and target symbols. The filter, money management and exit categories exist both as blocks and as Settings entries. A block that is only available in the Settings tab, such as Pyramiding or Account Guard, cannot be placed on the canvas.

The Settings tab with Money Management open and the other groups folded.
The Settings tab. Each group folds open and shows how many of its entries are on.

Large flows

The count of blocks is shown in the small column on the canvas as ”= n”. When the count reaches 50, the validation bar says “Node limit reached (50). Performance may degrade.” for a moment, until the structure checks replace it. While a flow has 50 or more blocks, the Preflight check also shows warning E207.

50 is a warning level, not a ceiling. The Builder still lets you place more blocks, and code generation still works. A large flow only makes the editor slower.

Next steps