Building a Trade-Tab Display for Visual Expert Advisor Testing
Summary
This article presents a way to show open positions and pending orders while an Expert Advisor runs in MetaTrader’s visual strategy tester. The ordinary terminal indicator cannot read the tester’s simulated account state, so the proposed design uses an indicator to reserve a chart subwindow and an included library to create and refresh the display from the Expert Advisor. The EA initializes the display once and updates it on each tick.
The displayed fields are intended to resemble the terminal’s Trade tab, including account status and position details. User settings control the number of rows, font size, colors, and proximity highlighting for open price, stop loss, and take profit. The article illustrates a sell position and changing stop-loss highlighting, but does not report controlled tests or trading results. It also notes a limitation: the tester may require the display’s subwindow number to be set explicitly, especially when other indicators use separate windows. This is a visualization utility for inspecting simulated trades, not a method for generating signals.
Key ideas
- The standard terminal indicator does not report the strategy tester’s virtual account state.
- A chart subwindow can be reserved by an indicator while an included library handles display updates.
- The Expert Advisor initializes the display once and refreshes it on every tick.
- Colors can highlight position details as price approaches key order levels.
- The tester may need an explicit subwindow index when other indicators are present.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.