AccountEquity() and AccountBalance()

To add comments, please log in or register
Soewono Effendi
2121
Soewono Effendi  
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.
William Roeder
20210
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.
Soewono Effendi
2121
Soewono Effendi  
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 ?
Alain Verleyen
38676
Alain Verleyen  
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 ?

Soewono Effendi
2121
Soewono Effendi  
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.
Kenneth Parling
8661
Kenneth Parling  
The real issue here seems to be that you won't even try search your self for the answer.
Soewono Effendi
2121
Soewono Effendi  
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.

Soewono Effendi
2121
Soewono Effendi  
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
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.

Soewono Effendi
2121
Soewono Effendi  

But for those who compare ...


That same code works on MT5 but not on MT4,

happy bug hunting or switch to MT5 ;)

Alain Verleyen
38676
Alain Verleyen  
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.

Soewono Effendi
2121
Soewono Effendi  
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 ? ;)

To add comments, please log in or register