Skip to content
All library documents

Using a Script to Report Forex Profit and Loss in Pips

Article MQL5 code base

Summary

This document describes a utility script for viewing open forex positions’ profit or loss in pips. It says the tool does not place or close trades, and reports four outputs: aggregate pip P&L across positions, the pip result for each position, the sum of profitable positions, and the sum of losing positions. The intended benefit is a common, volume-independent unit for reviewing results instead of account currency or points.

The material is a brief feature description rather than an explanation of pip calculations, code, or trading methodology. It states that the script was tested only on forex, so its applicability to other instruments is not established. It also gives no information about treatment of different quote conventions, currency conversion, commissions, swaps, or realized versus unrealized P&L. The note can help traders understand the reporting purpose and scope of the utility, but it offers no performance evidence and does not describe a strategy.

Key ideas

  • The script displays forex profit and loss in pips regardless of position volume.
  • It reports total pip P&L, per-position results, and separate sums for gains and losses.
  • The utility is described as informational and does not open or close trades.
  • The document says testing covered forex only and does not explain calculation details.

Tags

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