You can filter trades to be monitored via the MagicNumber input variable. The default value of -1, means that it will monitor all trades.
To see it in action: Add this TradeReporter indicator to a chart (any chart will do, it doesn't depend on incoming ticks, instead it uses the Timer event to get started). The indi will instantly start recording and updating the High and Low water marks of all the open trades. These values can be observed in the Global Variables panel (Tools -> Global Variables or F3).
If and when a trade is closed (you can do this manually for instance to test the indi), a line is added to a file in the MQL4\Files area. The file name defaults to allTrades.csv.
The line will have the following information:
Code: Select all
Ticket;Symbol;OrderLots;OpenPrice;OpenTime;HighWater;LowWater;ClosePrice;CloseTime;Magic;Comment;PipFactor
The PipFactor is important to convert price differences to PIPs. Just multiply the price difference by the PipFactor to get PIPs. I am sure you know all about that.
As mentioned it is important to keep this indi running at all times -- otherwise it will miss price movements outside the already recorded High and Low water marks.
Have fun,