Skip to content
All library documents

Envelope-Based Trading Signals with a Timed Backtest Start

Article MQL5 code base

Summary

The document presents long and short voting rules based on a 200-period Envelopes indicator with a stated deviation of 0.35. The long rule returns a positive signal when the ask is at or below the lower band, or lies between the band midpoint and upper band. The short rule mirrors this logic using the bid: it signals at or above the upper band, or between the lower band and midpoint. This creates directional signals at the extremes and in opposite halves of the channel.

A separate tick-handler condition prevents trading while a position in the symbol is open and delays strategy execution until a specified historical time. The author says this timer was added after failing to reproduce a “first week” effect, and mentions a real example and a test result without presenting their details. There are no reported performance figures, transaction costs, or validation methodology, so the signal logic cannot be judged as profitable from this material.

Key ideas

  • The example sets Envelopes to a 200-period lookback and a deviation of 0.35.
  • The long rule signals at the lower band or in the upper half of the channel below its top.
  • The short rule signals at the upper band or in the lower half above its bottom.
  • The tick handler skips execution when a position is open and adds a time-based start condition.
  • No test statistics or evidence of profitability are provided.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.