Skip to content
All library documents

Calculating Potential Trade Profit or Loss with a Chart Line

Article MQL5 code base

Summary

This document describes a chart indicator for estimating potential profit or loss from a trade size, or estimating the size needed to reach a chosen profit or loss. The user selects which value to enter; the indicator calculates the other value and displays it on a line. A new line can be created, or the most recently created line can be recalculated after changing its input. Dragging the line’s endpoints also updates the calculation.

The stated settings control the displayed font size and the line and value color. The document gives no formula, worked example, supported-instrument details, or accuracy information, so it does not explain how costs, slippage, or changing market conditions affect the estimate. It describes a basic visual calculation aid rather than a trading signal or strategy.

Key ideas

  • The indicator estimates potential profit or loss from a trade size, or trade size from a target profit or loss.
  • Users choose which input to provide, and the indicator calculates the corresponding value.
  • A line can be created, recalculated, and adjusted by dragging its endpoints.
  • The documented settings change the font size and display color.

Tags

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