Saltire Column Breakout
- Experts
-
Syarief Azman Bin Rosli
Hello and welcome to my official MQL5 profile!
I am Syarief Azman Bin Rosli, an algorithmic trading systems developer and quantitative software engineer with over a decade of specialized experience creating robust automated trading solutions for MetaTrader 5 and MetaTrader 4. - Version: 1.0
- Activations: 5
Saltire Column Breakout is a MetaTrader 5 Expert Advisor that builds a classic Point & Figure chart inside the terminal (columns of X for rising prices, columns of O for falling prices) and trades its breakout signals: double and triple tops (buy) and double and triple bottoms (sell), by default only in the direction of the 45-degree P&F trend line. One position at a time per symbol and magic number, a stop beyond the prior column, a vertical-count target and breakeven. No grid, martingale, averaging or hedging.
Quick Start
- Attach the EA to one chart of the symbol (any chart timeframe; the P&F chart is fed by the Price Timeframe, H1 by default) and enable Algo Trading.
- Start with the defaults: box = 0.33 x daily ATR, 3-box reversal, closing prices, trend filter on, 1 % risk per trade.
- The cockpit draws the live X/O grid, the trend and the next trigger prices. ARMED = waiting for a signal.
- Check: a visual Strategy Tester run of a few months on XAUUSD or EURUSD shows the signal marks, trigger lines and trades.
- Push alerts: set your MetaQuotes ID (Tools > Options > Notifications) and Push Notifications to Mobile = true.
The Point & Figure Chart
- Box: Box Size Mode = Daily ATR Multiple uses Box Size x the ATR of the last Daily ATR Period complete days, rounded down to a 1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8 x 10^n ladder in points. The box is checked at each new server day and only changes when the raw size leaves -20 % / +25 % of the current box; then the chart is rebuilt. Fixed Points uses Fixed Box Size.
- Columns: an X column grows while price reaches a new box above its top; Reversal boxes against it start an O column one box below (and the reverse for O). Price Method: Closing Prices uses bar closes (no intrabar noise), High / Low Range uses each bar's high first in an X column and low first in an O column.
- The chart is built from History Bars Used to Build the Chart closed bars of the Price Timeframe at start-up and on each box change, then updated at every new bar. Only closed bars are used, so nothing repaints.
- Trend (45-degree lines): after the first reversal a support line starts one box below the lowest O column and rises one box per column (BULLISH), or a resistance line starts one box above the highest X column and falls one box per column (BEARISH). An O column reaching the support line turns the trend BEARISH (new line from the highest X since the anchor); an X column reaching the resistance line turns it BULLISH.
Signals and Entry
- DOUBLE TOP (DT, buy): the X column rises above the top of the previous X column. TRIPLE TOP (TT): the two previous X tops were equal. DOUBLE BOTTOM (DB) and TRIPLE BOTTOM (TB) mirror them for sells.
- Filters: Signals Traded (Double and Triple Tops / Bottoms, or Triple Tops / Bottoms Only), Trade With the 45-Degree Trend Only (buys only while BULLISH, sells only while BEARISH), Allowed Directions.
- A signal is evaluated when its bar closes; the market order is sent on the first tick of the next bar if no EA position is open (netting: no position on the symbol), entries are on, the market is open and every check passes.
Exits and Risk
- Initial Stop: Beyond the Prior Column = one box beyond the opposite column before the breakout (below the O low for buys); Reversal Point = Reversal boxes against the breakout column's extreme. Short stops add the spread. A stop wider than Maximum Stop Distance boxes is skipped (STOP TOO WIDE).
- Take-Profit: Vertical Count = boxes in the breakout column x Reversal x box, measured from the prior column's extreme (no target if it lies behind the entry); R Multiple = R Multiple Target x the risk; None = no target.
- Breakeven Trigger: after a gain of that many R the stop moves to entry plus Breakeven Buffer points.
- Trailing Stop: Off; Each New Column = when a new column in the trade direction starts, the stop moves one box beyond the opposite column just completed; Reversal Point = the stop follows Reversal boxes behind the live column. Stops only move in the trade direction.
- Close on an Opposite Signal: closes the position on any opposite signal (filters not applied); if that signal passes the filters, the reverse trade opens right after.
- Skips: spread above Max Spread percent of the stop distance (SPREAD), stop or target inside the broker stop level (STOPS; a target too close is dropped).
- Closes and stop changes are sent only inside the trading session and outside the freeze level, otherwise retried.
- Position Sizing: Fixed Lot; Risk % of Balance = balance x Risk Percent per Trade / 100 / loss per lot at the stop; Risk Money uses Risk Money per Trade. Lots are rounded to the lot step, capped by Maximum Lot and the volume limit, raised to the broker minimum (small accounts may risk more) and checked against free margin.
Recommended: H1 on XAUUSD and major FX pairs. Worth optimizing: Box Size, Reversal, Price Method, Take-Profit and the trend filter.
Cockpit Controls
- [-] / [+]: collapse to a pill (SALTIRE and status) or expand.
- <>: move the cockpit to the next chart corner.
- MOVE TO BE: stop of every EA position to entry plus Breakeven Buffer points (when price is far enough).
- CLOSE ALL: the first click shows CONFIRM CLOSE; a second click within 4 seconds closes all EA positions on the symbol.
- ENTRIES ON / ENTRIES OFF: allow or pause new entries; open positions stay managed.
- LONG+SHORT / LONG ONLY / SHORT ONLY: allowed directions.
- MARKS ON / MARKS OFF: chart signal marks and trigger lines.
Toggles survive timeframe changes and reset to the inputs when the EA is re-attached.
Cockpit Readouts
- Header SALTIRE COLUMN BREAKOUT with a status LED. Status badge: ARMED, IN LONG, IN SHORT, ENTRIES OFF, MARKET CLOSED, ALGO OFF, BUILDING CHART (waiting for history). The right text shows symbol, Price Timeframe and risk.
- POINT & FIGURE: the last 20 columns, newest at the right; green X, red O, blue / or \ for the 45-degree line, dots for empty boxes. Each row shows its box price; the live price row is marked, BUY and SELL mark the next trigger boxes. Caption: BOX size, reversal and price method.
- COLUMNS & TREND: Column number, X or O, boxes and range; Trend BULLISH, BEARISH or NO TREND YET with the support line or resistance line price; Buy above / Sell below = the box a column must reach for the next signal of that side.
- SIGNALS: the last three signals with tag, bar time, level and state: PENDING, TAKEN, FILTERED: AGAINST TREND, FILTERED: DOUBLE OFF, FILTERED: SIDE OFF, MISSED (STALE) (bars caught up after a gap) or SKIPPED: reason. Reasons: ENTRIES OFF, POSITION OPEN, SYMBOL BUSY, ALGO OFF, TRADE DISABLED, MARKET CLOSED, STOP PASSED, STOP TOO WIDE, STOPS, SPREAD, NO MARGIN, VOLUME LIMIT, NO DATA, SEND FAILED. With no signal yet: No new signal since the EA started.
- POSITION: FLAT (Waiting for a breakout signal) or side, lots, entry, floating profit; SL, TP, R now; BREAKEVEN AT n R, BREAKEVEN LOCKED or BREAKEVEN OFF; TRAIL OFF, TRAIL: EACH NEW COLUMN or TRAIL: REVERSAL POINT. MAGIC shows the magic number.
- ACTION DECK with the buttons, then the last event.
Chart Marks
Each signal since the last chart build gets an arrow at its breakout level with its tag (DT, TT, DB, TB), up to Past Signals Drawn on the Chart. Dotted lines mark the next buy and sell trigger prices.
Alerts
Terminal Pop-Up Alerts and Push Notifications to Mobile fire on entries, skipped signals (except ENTRIES OFF and POSITION OPEN) and opposite-signal closes. Not in the Strategy Tester.
Side Effects
Chart objects prefixed SCB_H_ (cockpit) and SCB_OV_ (marks), removed with the EA; one-second timer; no files, no global variables, no DLLs. Order comment = Trade Comment plus the tag, e.g. Saltire DT.
Input Parameters
- Point & Figure Chart: Price Timeframe (H1, up to D1); Price Method (Closing Prices, High / Low Range); Box Size Mode (Daily ATR Multiple, Fixed Points); Box Size (0.33 x daily ATR); Daily ATR Period (14 days); Fixed Box Size (200 points); Reversal (3 boxes, 1-10); History Bars Used to Build the Chart (1500, 100-20000).
- Signals: Signals Traded (Double and Triple Tops / Bottoms, Triple Tops / Bottoms Only); Trade With the 45-Degree Trend Only (true); Allowed Directions (Long and Short, Long Only, Short Only).
- Exits: Initial Stop (Beyond the Prior Column, Reversal Point); Maximum Stop Distance (12 boxes, 0 = off); Take-Profit (Vertical Count, R Multiple, None); R Multiple Target (2.0); Trailing Stop (Off, Each New Column, Reversal Point); Breakeven Trigger (1.0 R, 0 = off); Breakeven Buffer (10 points); Close on an Opposite Signal (false).
- Money Management: Position Sizing (Risk % of Balance, Fixed Lot, Risk Money); Fixed Lot (0.10); Risk Percent per Trade (1.0); Risk Money per Trade (100); Maximum Lot (5.0, 0 = broker maximum).
- Execution: Magic Number (20261122, one per chart on the same symbol); Trade Comment (Saltire); Max Slippage (20 points); Max Spread (15 % of the stop distance, 0 = off).
- Alerts: Terminal Pop-Up Alerts (true); Push Notifications to Mobile (false).
- Cockpit & Chart: Cockpit Dock Position (Top Left, Top Right, Bottom Left, Bottom Right); Horizontal Margin (16) and Vertical Margin (28) pixels; Draw Signals & Trigger Lines on the Chart (true); Past Signals Drawn on the Chart (20).
Typical Setups
- Balanced (gold, majors, H1): defaults.
- Fewer, stronger signals: Signals Traded = Triple Tops / Bottoms Only, Box Size 0.25.
- Trend rider: Take-Profit = None, Trailing Stop = Each New Column, Breakeven Trigger 1.5.
- Fixed-box chart: Box Size Mode = Fixed Points, Fixed Box Size 100 (10 pips on 5-digit FX), Price Method = High / Low Range.
Notes
- Signals are infrequent by design (often a few per month per symbol on H1 defaults). After a restart the chart is rebuilt from history and open positions are adopted and managed.
- The Strategy Tester uses the same rules; cockpit and marks appear in visual mode only.
- Test on a demo account first.
Risk Disclaimer
Trading forex and CFDs on margin carries a high risk of loss. Past or simulated results do not guarantee future results. This EA does not promise profit; use only capital you can afford to lose.
