Calculate profit loss on LinePrice - MetaTrader 4 Expert - MT4/MT5 Resources

Based on code from Igor V. Kim aka KimIV. The code has been improved as requested by many traders.
This Expert Advisor calculates the profit or loss of the deposited currency of all market orders opened on the current chart at the desired price of the symbol. The calculation is performed using the horizontal lines placed by the trader and specifying the "LP" name in the parameters.
Create a line and rename it "LP". When the line is moved, the profit/loss will be recalculated, showing the profit/loss at the price where the line is.
If a MagicNumber is specified, only orders with that magic will be considered in the calculation. At MagicNumber -1, any order of the current symbol will be used for calculation.

Attachment download
📎 calc_profit_loss_on_lineprice.mq4 (4.83 KB)
Source: MQL5 #13330
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •