Skip to content
All library documents

Applying Pip-Based Stop Losses and Take Profits by EA Number

Article MQL5 code base

Summary

This document describes a script that can apply a stop loss, a take profit, or both to trades associated with a specified expert-advisor number. The EA number acts as a filter, so the script is intended to affect only trades carrying the matching identifier. The stated use case is adding protective exits to automated systems that do not set their own stops, with scalpers and martingale systems mentioned as examples.

The only operational detail provided is the execution interval: it should be longer than one second, with roughly three seconds suggested for a scalper that opens trades frequently. The description does not explain how the script measures pip distances, handles existing stop levels, or behaves when broker rules reject a modification. It also gives no test results or evidence that adding exits makes a strategy profitable or controls its broader exposure. The material presents a trade-management utility and a scheduling parameter, rather than a complete risk-management method.

Key ideas

  • The script can set stop loss, take profit, or both for trades matching a chosen EA number.
  • The intended scope is automated trades that lack built-in protective exits.
  • A short execution interval is suggested for systems that open trades frequently.
  • The document does not explain rejection handling or provide performance evidence.

Tags

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