Skip to content
All library documents

Using Three Price Lines to Set and Manage Trading Orders

Article MQL5 code base

Summary

This document explains a chart panel for placing and managing pending orders and open positions with three draggable price levels. The aqua line sets the entry price for pending orders. The green and red lines set take profit and stop loss levels, with their roles reversing for buy and sell orders. It also gives placement constraints: green should remain above red, while aqua must sit on the appropriate side of the current bid or ask for the selected order type.

To modify an existing order, select it so the lines align with its entry, take profit, and stop loss, drag them to new levels, and submit the modification. The panel also offers controls for closing positions or deleting pending orders, resetting line positions, and choosing, minimizing, maximizing, or normalizing trade volume. This is an operational guide rather than a strategy: it provides no entry rationale, performance evidence, or risk analysis, and traders still need to choose levels and volume appropriately.

Key ideas

  • The aqua line sets the entry price for pending orders.
  • The green and red lines assign take profit and stop loss levels according to whether the order is a buy or sell.
  • Their specified ordering and relation to the current bid or ask constrain valid level placement.
  • Selecting an existing order aligns the lines with its current prices so they can be adjusted and submitted.
  • Volume controls help select a permitted trade size, but the document does not explain how to determine suitable risk-based sizing.

Tags

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