Historical Equity Flow Indicator
- Indicators
- VALERII BUKIREV
- Version: 1.61
- Updated: 11 March 2025
Historical Equity Flow Indicator (HEFI)
Description
HEFI is an indicator for MetaTrader 5 that visualizes the dynamics of account balance and floating balance in real time. It helps traders analyze the historical effectiveness of their trading, as well as assess the current state of open positions.
What is it intended for?
Account balance tracking, taking into account closed transactions for the selected period.
Displaying a floating balance (balance + uncovered profits/losses).
Analysis of the impact of open positions on total capital.
Visualization of entry/exit points (if the display of transactions is enabled).
Key functions
Two lines on the graph:
Balance (Blue line): The actual account balance calculated based on closed transactions.
Floating Balance (Colored line):
Green: Floating balance above the current balance (profitable positions).
Red: Floating balance below the current balance (unprofitable positions).
Gray: The floating balance is equal to the balance.
Settings:
HISTORY_DAYS — the number of days for analyzing the transaction history.
SHOW_TRADES — display of markers for opening/closing positions (under development).
How it works
The indicator analyzes the history of transactions for the specified period and recalculates the balance for each bar on the chart.
For each time point, both closed trades and floating gains/losses from open positions are taken into account.
The dynamics of the balance sheet and floating balance allows you to evaluate:
Stability of the trading strategy.
Risks associated with current positions.
Points of maximum drawdown or capital growth.
Features
Automatic synchronization with the account history.
Adaptation to any timeframe.
The color indication simplifies data interpretation.
Installation and requirements
Copy the HEFI.mq5 file to the MQL5/Indicators folder.
The indicator only works in MetaTrader 5.
For correct operation, access to the transaction history is required (at least 30 days by default).
Important
The indicator does not open or close positions — it is an analysis tool.
It is recommended to use it together with other elements of risk management.
Usage example
The trader can determine during which periods his open positions significantly affected the capital, and adjust the strategy to reduce the risks.