Closed-Bar SuperTrend Trading and Signal-to-Order Auditing
Summary
This article explains an Expert Advisor that trades SuperTrend direction changes. It checks only completed bars, opens or reverses a single position on a flip, and places the stop at the indicator line with an optional points buffer. If the next available entry price has already crossed the line, the EA skips the trade rather than placing a stop on the wrong side. It uses a magic number to identify its orders and can include the compiled indicator as a resource.
The main lesson is how to verify signal handling: the EA logs indicator values on every closed bar, then an audit script compares flips with orders. The reported audit found one order per flip and no missing, extra, duplicate, or wrong-side trades in that run. Example tester results also show one profitable gold period and a losing euro period; the author cautions that the gold result reflected a trending month and that reversals incur spread costs. The EA has fixed sizing and lacks account-level risk controls, and netting accounts can merge manual and EA positions on the same symbol.
Key ideas
- The EA acts on completed-bar SuperTrend flips to avoid signals that disappear before bar close.
- It skips entries when price movement would put the stop on the wrong side of the entry.
- Logging every bar lets an audit compare indicator flips with executed orders.
- The reported audit matched each flip to one trade, but sample trading results were mixed.
- Fixed position size and missing loss controls limit its readiness for live use.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.