AccountEquity() and AccountBalance()

 
how to get the account balance and equity to work in strategy tester ?
Not the "real account", but in strategy tester.

Looking for indicator that displays these values.
Any reference is appreciated.
Thank you.
 
  1. What make you think they don't work.
  2. Find one or modify one. You haven't stated a problem, you stated a want.
 
William Roeder:
  1. What make you think they don't work.
  2. Find one or modify one. You haven't stated a problem, you stated a want.
If you had tried yourself, you would know.
I want nothing just reference.
You love to paste templated answer. Right ?
 
Soewono Effendi:
If you had tried yourself, you would know.
I want nothing just reference.
You love to paste templated answer. Right ?

There is no problem with AccountEquity(), AccountBalance() unless demonstrated otherwise.

There are plenty of indicators about equity/balance either in Codebase or the Market, what is preventing you to search them ?

 
Alain Verleyen:

There is no problem with AccountEquity(), AccountBalance() unless demonstrated otherwise.

There are plenty of indicators about equity/balance either in Codebase or the Market, what is preventing you to search them ?

when you said so ;)

you simply do not understand the real issue.
 
The real issue here seems to be that you won't even try search your self for the answer.
 
Kenneth Parling:
The real issue here seems to be that you won't even try search your self for the answer.

Many comments but not helping ;)
Let's see who is next.

 
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {

   int n=rates_total-1;     
   n = rates_total - prev_calculated - 1;
   if (prev_calculated == 0)
   {
      n = n - 1;
   }
   
   for(int i = n;(i>=0) && !IsStopped(); i--) 
     {
      Buffer1[i] = AccountBalance();
      Buffer2[i] = AccountEquity();
     }
   return(rates_total - 1);
  }

This won't work, not because AccountBalance() or AccountEquity() do not work.
Let the all-wise-guy smile ;)

Case closed.

 

But for those who compare ...


That same code works on MT5 but not on MT4,

happy bug hunting or switch to MT5 ;)

 
Soewono Effendi:

This won't work, not because AccountBalance() or AccountEquity() do not work.
Let the all-wise-guy smile ;)

Case closed.

You are incompetent and unpleasant guy. Only in your code there is a bug, fix it.

With such attitude you are unlikely to ever get help on this forum. Not mine for sure.

 
Alain Verleyen:

You are incompetent and unpleasant guy. Only in your code there is a bug, fix it.

With such attitude you are unlikely to ever get help on this forum. Not mine for sure.

Again, it's your opinion.
I have mine about you too, but who cares ? ;)

Reason: