[Archive] Learn how to make money villagers! - page 690

 
OnGoing:
Yeah, that's right. It's not about monkeys. You just have to count all the drawdowns yourself if you want reliable results.

I wondered if the maximum drawdown in the tester was measured incorrectly. I drew up the code and checked it: the results matched the tester.

That's how it is: you should check it yourself, not believe rumours. You can see for yourself, I'm sending you the code.

double MaxDrawDown;
int deinit() {
 Print("MaxDrawDown=",MaxDrawDown);
   return (0);
} 

start(){ 
  static double MaxEquity;
  static double MinEquity;
         double DrawDown;
  static bool flag;
 
  if(!flag)
    {
     MaxEquity=AccountEquity();
     MinEquity=AccountEquity();
     flag = true;
    } 
  if(AccountEquity()>MaxEquity) 
    {MaxEquity=AccountEquity();MinEquity=AccountEquity();}
  
  if(AccountEquity()<MinEquity) 
    {MinEquity=AccountEquity();}
  
  DrawDown=MaxEquity-MinEquity;
  
  if(DrawDown>MaxDrawDown ) 
    {MaxDrawDown=DrawDown;}
// ............остальной код советника
 
khorosh:

I wondered if the maximum drawdown in the tester was measured incorrectly. I drew up the code and checked it: the results matched the tester.

That's it: you should check it yourself, not believe rumours. You can see for yourself, I'll show you the code.

You are calculating incorrectly) What does the minimum equity and the maximum equity have to do with it? We need to compare equity with the balance and this will be the real drawdown we are looking for.

But you must have calculated it the way the tester did and that is why the result coincided.

By the way, initial variable values can be set in init(), in this case unnecessary constructs with flags etc. can be avoided.

 
OnGoing:

You're counting it wrong) What does the min equity and max equity have to do with it? We need to compare equity with balance, this will be the real drawdown we are interested in.

But you must have calculated it the way the tester did and that is why the result coincided.

By the way, initial variable values can be set in Init(), in this case unnecessary constructs with flags etc. can be avoided.

I think the equity calculation is correct, forget about the balance - we don't need it. And the flag is not crucial.
 
khorosh:
I think the equity calculation is correct, forget about the balance - we don't need it. And the flag is not crucial.
In that case, you may continue to call rumours what happens in the terminal during demo-testing). It is your business.
 
OnGoing:
Then keep calling rumours what people really have in the terminal during demo-testing) and be flattered by false results. It is your business.
Equity is money and balance is nothing. Can you withdraw the balance from the account? You can only withdraw equity.
 
khorosh:
Equity is money and balance is nothing. Can you withdraw the balance from the account? You can only withdraw equity.
These are all pretty words. Even the tester calculates many indicators based on the balance. The same maximum and relative drawdown. It just does not do it as we would like it to do.
 

When you start a series, you start and calculate the lot from the balance. That is, the equity at that time equals the balance.

Therefore, you need to know how much the series has fallen from the starting value, and not the delta between the min and max equity values as you do.

 
Suppose the equity maximum was above the balance, and then the equity curve went down and dropped below the balance. Are you going to measure the drawdown from the balance sheet instead of the equity maximum?
 
khorosh:
Suppose the equity maximum was above the balance, and then the equity curve went down and dropped below the balance. Are you going to measure the drawdown from the balance sheet instead of the equity maximum?
You had to fix what was going up. You have not fixed it, it is a paper profit and it actually does not exist. That is why it is not very useful to calculate it.
 
vladds:

I understand your passion, but how about this? You wanted to see it!
Yeah, I'll check it out.
Reason: