Equity Curve Candle View
A plain equity curve line only ever shows where equity currently is. It hides whether a hard hour saw equity plunge and recover, or just drift down steadily - information a normal price candle gives for free but an equity line does not. This indicator samples AccountEquity() on a fixed timer, folds each sample into the OHLC of whichever hour or day bucket it falls into, and draws the result as genuine candles: green when that bucket's equity closed higher than it opened, red otherwise, with the full high/low range visible as a wick. This build's MQL4 compiler has no DRAW_CANDLES type, so the candles are hand-built from chart objects - one trend-line wick and one rectangle body per equity bar - the same technique used elsewhere in this catalogue for a synthetic-pair candle view. Two invisible plotted buffers exist purely so the subwindow's vertical scale fits the recorded equity range. MQL4 keeps no history of past account equity at all, so every candle here is built forward from the moment the indicator was attached. It cannot show what equity did yesterday if it was not already running yesterday. Notes and limitations Candle history is not persisted across a terminal restart or the indicator being removed and re-added - it starts accumulating from zero again each time, by design, to avoid the complexity and the roughly-four-week global-variable expiry trap that a persistence layer would otherwise inherit. A trader who needs equity history across restarts should keep the indicator continuously attached. Bar boundaries use server time, not the trader's own local calendar day - a daily candle's boundary may not line up with midnight in the trader's own timezone. Up to 500 candles are retained internally regardless of InpBarsToDraw; older ones are dropped once that cap is reached to keep memory bounded.
Indicator · MT5 · v1.0 · Free
About Equity Curve Candle View
Equity Curve Candle View is an indicator for MetaTrader 5. It has 5 settings, such as Aggregation, Sample seconds and Bars to draw. MQL source code included.
Files in the download: EquityCurveCandleView.ex5, EquityCurveCandleView.mq5, EquityCurveCandleView.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Aggregation | AGG_HOURLY | Candle period |
| Sample seconds | 5 | How often equity is sampled, in seconds |
| Bars to draw | 100 | How many recent equity candles are drawn |
| Bull color | clrForestGreen | Body colour when close >= open |
| Bear color | clrCrimson | Body colour when close < open |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: MT5 Indicator · MQL5 Source Code