Indicator to plot account balance and equity

 

I wonder if there is an indicator for mql4 that will plot account balance and account equity in a separate window. I tried to code the indicator but

all I get  is two straight lines.

 
Prataprai Kaneria:

I wonder if there is an indicator for mql4 that will plot account balance and account equity in a separate window. I tried to code the indicator but

all I get  is two straight lines.

Did you find a solution?, I'm having the same issue

 

Don't assume history is ordered by date, it's not. Could EA Really Live By Order_History Alone? (ubzen) - MQL4 forum

Once you get balances by time, you can draw your lines, from the current balance back.

As far as equity, you would have to compute the draw down per bar.
Draw down = OrderLots * (|OrderOpenPrice - OrderStopLoss at bar extreme| * DeltaPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip)
Could be done, but not very easily.