Skip to content
All library documents

Automating Position Size, Protective Exits, and Trade-Entry Review

Article MQL5 code base

Summary

This brief description outlines a trade-opening script that automatically assigns a lot size using one of three available methods: a fixed lot size or either of two alternative sizing approaches. It also attempts to set a stop loss and an equal-distance take profit when a position is opened. The author presents these exit levels as safeguards that may need adjustment after entry, rather than as a complete or validated exit strategy.

A further feature can save a chart screenshot at entry so the trader can later review the market context and their reasoning at that moment. The document gives no rules for choosing position size or exit levels, and provides no backtest, examples, or performance evidence. Its practical contribution is limited to describing basic trade automation and a way to support post-trade review; the sizing methods and the suitability of the default exits are left unspecified.

Key ideas

  • The script can assign position size through a fixed lot method or two other sizing methods.
  • It attempts to attach a stop loss and an equally distant take profit when opening a trade.
  • The suggested protective exits may require manual adjustment after entry.
  • Saving a chart image at entry can help preserve the market context for later trade review.
  • The description provides no sizing formulas, tested results, or criteria for choosing exit levels.

Tags

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