I want to programm the Equity as an Indicator. I tried it in this way, but it doesn't work
//---- check for possible errors
//---- last counted bar will be recounted
for(int k=0; k<limit; k++)
EquityBuffer[k] = AccountEquity();
Can anybody tell me why?!
I saw the Equity_v8, which I can only use in a Strategietest or an already running EA, but not in a backtest (or can somebody explain me, how it also works in an backtest??) .
I also found the offline_charts, but the use from it is a little bit of circumstantial, so I can't change the timeframe without starting the backtest again and the chart isn't in the same window. l
Unfortunately an indicator on the backtest chart cannot access the backtest trades, it will wrongly access the real live trade history. This is a known bug in MT4, Metaquotes refuses to fix it, it seems they have stopped anything that has to do with mt4, they don't even respond to questions about MT4 bugs anymore.
For a backtest the only real option is recordEquity() (from offline_charts.mqh) compiled directly into the EA . I wrote this include exactly for this reason.
To add comments, please log in or register