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

 
Can I have one?
 
int start()

  {
  DrowDownAlert=iCustom(NULL, 0, "Equity_v7",4,0);  
   

 double a=TotalLots(0);
 double b=TotalLots(1);
  Comment (a,b);
  return(0);
  }

//----------------------- подсчёт объема позиций----------------------------//
void TotalLots(bool zet)
{
   double total=0,total1=0;
   int slippage=20;
   for (int i=OrdersTotal()-1; i>=0; i--)
   {
      if (!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) break;
      if (OrderType()==OP_BUY ) total=total+OrderLots();
      if (OrderType()==OP_SELL) total1=total1+OrderLots();
   }
 if (zet==0) return (total); else return (total1) ;  
 
}
Guys, tell me where the error is, because the output of the Return function has zero result.... Why????
 
TEXX:


This version is not yet for trading, it needs to be tested for bugs. Do you need it?

yes, if you can
 
serferrer:
You can't test a lot with your hands, so it's logical to assume that unsinkability is not proven for the period of 1-12 years, until it is checked in the tester with the real tick history, floating spreads, gaps, slippage, + profit with reserve for requotes.


i wonder if i show the tester report from 1990 january 3 to 1992 september 6, would it make you feel better? $50,000 starting capital.

drawdown maximum. $69,000.

net profit. $129,000 net profit.

 
vladds:


I wonder if I show the tester report from 1990 January 3 to 1992 September 6, would it make you feel better? $50,000 starting capital.

drawdown maximum. $69,000.

net profit. $129,000.

What if that drawdown happens on your second day of trading?
 
Yeah, no one has ever escaped a drawdown..... I was able to stop the drawdown for the first time at $420 instead of $115 as shown by classical yolan in the test. The truth is that now it has fallen again, below the level of the beginning of trading, it's just that the market is going against Ilan, whatever way you slice it..... But nothing, I think it will break through.....
 
4x-online:
What if that drawdown happens on your second day of trading?

What if tomorrow is the end of the world?
 
vladds:

what if the world ends tomorrow?

If you want to make money in the market, you have to stop the drawdown, no matter how you spin it, otherwise there is no point in all this trading..... And the important thing is that the funds grow, not the balance... So.....
 
vladds:

What if the world ends tomorrow?
The world is only likely to end. And your drawdown on history is real.
 

nikelodeon:

int start()

  {
  DrowDownAlert=iCustom(NULL, 0, "Equity_v7",4,0);  
   

 double a=TotalLots(0);
 double b=TotalLots(1);
  Comment (a,b);
  return(0);
  }

//----------------------- подсчёт объема позиций----------------------------//
void TotalLots(bool zet)
{
   double total=0,total1=0;
   int slippage=20;
   for (int i=OrdersTotal()-1; i>=0; i--)
   {
      if (!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) break;
      if (OrderType()==OP_BUY ) total=total+OrderLots();
      if (OrderType()==OP_SELL) total1=total1+OrderLots();
   }
 if (zet==0) return (total); else return (total1) ;  
 
}

Guys, tell me where the error is, because the output of the Return function has zero result.... Why????
Here... highlighted in red.