Skip to content
All library documents

Sizing Buy Stop Orders with Deposit-Based Money Management

Article MQL5 code base

Summary

This document describes a MetaTrader script for placing a buy stop at a set distance above the current price, with stop loss and take profit levels measured from the trigger. Its main configurable feature is a money management input that determines trade volume as a proportion of the account deposit. Other inputs set the trigger distance, stop and target distances, order expiry, retry count, and pause between retries.

The document explains the script’s parameters but provides no performance tests, market rationale for the chosen distances, or risk-adjusted position sizing method. The deposit-based ratio alone does not show how much a trade could lose: that depends on the stop distance, instrument, and contract specifications. The settings are an execution template, not evidence of a profitable strategy.

Key ideas

  • The script places a buy stop at a fixed distance from the current price.
  • Stop loss and take profit are set as distances from the order trigger.
  • A money management input controls volume in relation to the deposit.
  • Order expiry and retry behavior are configurable.
  • The document gives no evidence that the settings produce profitable trades.

Tags

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