Skip to content
All library documents

Chart Script for Updating Open Positions’ Stops and Targets

Article MQL5 code base

Summary

This short description explains a chart-operated tool for modifying the stop-loss or take-profit levels of every open order on the chart’s current instrument. The user drags the script to a price level: placing it below the current market price changes stop losses, while placing it above changes take-profit levels. The example uses multiple buy positions in a currency pair to illustrate that the action applies across the instrument’s open positions.

The text describes an order-management utility rather than a trading strategy. It gives no details about how the script handles sell positions, mixed order types, rejected modifications, broker restrictions, or distance constraints. It also provides no evidence about execution quality or risk outcomes, so users would need to confirm its behavior in their own platform setup before relying on it.

Key ideas

  • The script modifies stop-loss or take-profit levels for open orders on the chart’s current instrument.
  • Dragging it below the market price is described as changing stop-loss levels.
  • Dragging it above the market price is described as changing take-profit levels.
  • The description does not specify behavior for mixed positions, broker constraints, or rejected changes.

Tags

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