Skip to main content

Order Entry

Order type

Order Type controls how the EA enters the market after detecting a valid signal:

ValueBehaviour
Pending Orders (default)Places a buy stop (BUY) or sell stop (SELL) at the signal candle extreme + buffer
Market OrdersEnters at market price on the next tick after signal detection

Pending orders are strongly recommended. They require price to move in the anticipated direction before entry, filtering out many false breakouts without any additional logic.


Entry buffers

Buffers add pip padding beyond the signal candle extreme to position the pending order:

InputDefaultApplies to
Buy Entry Buffer (pips above signal high)1.0BUY pending stops
Sell Entry Buffer (pips below signal low)0.1SELL pending stops

A small buy buffer prevents entry on a minor wick above the candle. The tighter sell buffer keeps sell entries close to the candle low.


Pending order expiry

Cancel PO Bars (default 8) — number of closed bars after which an untriggered pending order is automatically cancelled. Set to 0 to never auto-cancel.

Cancel PO on EMA Close — cancel a pending order early if a closed bar prints on the wrong side of the selected EMA (signal direction invalidated):

ModeBehaviour
NoneNo EMA-based cancellation (default)
Slow EMACancel if a bar closes on the wrong side of the slow EMA
Fast EMACancel if a bar closes on the wrong side of the fast EMA

Pending order history logging

Log Pending Order History (default false) — when enabled, all pending order outcomes (triggered, expired, cancelled) are appended to a CSV file and saved as GlobalVariables for restart recovery and historical audit. Leave off unless you need this data.


Slippage

Slippage (default 5) — maximum allowed slippage in pips for order execution. Applies when pending orders trigger or when market orders are placed. Orders that would be filled beyond this threshold are rejected by the broker.


Symbol suffix

Symbol Suffix — if your broker appends a suffix to symbol names (e.g. EURUSDm, EURUSD.a), enter the suffix here (e.g. m or .a). Leave blank for standard symbol names.