Le conseiller est-il adapté à la vie réelle ? - page 52

 
YOUNGA:
Pourquoi n'y a-t-il pas de shorts ?

Les paramètres sont séparés, le plan est de mettre deux EAs sur le même compte avec une séparation par direction, seul le test long a été cité.

C'est à peu près la même chose pour les shorts...

 

Test court pour la même période. Le lot est standard - 0.1. Peut-être y a-t-il des pièges dont je ne suis pas conscient, veuillez nous faire part de vos commentaires à ce sujet.


 

Bonjour à tous.

Est-ce que quelqu'un négocie des indices croisés ?

 
double GetLot() {
  int i, FastPeriodMA = 7, SlowPeriodMA = 14, Coefficient = 2;

  static double Lot = 0;
  static double PrevBalance = 0;
  static double BalanceOld[0];
  static double BalanceNew[0];
  if (NormalizeDouble(PrevBalance - AccountBalance(), 2) != 0) {
    ArrayResize(BalanceNew, ArraySize(BalanceOld) + 1);
    for (i = 0; i <= ArraySize(BalanceOld) - 1; i++)
      BalanceNew[i] = BalanceOld[i];
    BalanceNew[ArraySize(BalanceOld)] = AccountBalance();
    ArrayResize(BalanceOld, ArraySize(BalanceOld) + 1);
    ArrayCopy(BalanceOld, BalanceNew);
    PrevBalance = AccountBalance();

    if (ArraySize(BalanceNew) > SlowPeriodMA) {
      double FastMA = 0, SlowMA = 0;
      for (i = ArraySize(BalanceNew) - FastPeriodMA; i <= ArraySize(BalanceNew) - 1; i++)
        FastMA += BalanceNew[i];
      FastMA /= FastPeriodMA;
      for (i = ArraySize(BalanceNew) - SlowPeriodMA; i <= ArraySize(BalanceNew) - 1; i++)
        SlowMA += BalanceNew[i];
      SlowMA /= SlowPeriodMA;
      if (FastMA > SlowMA) Lot *= 2;
      else Lot /= 2;
    }
  }
  if (Lot < MarketInfo(Symbol(), MODE_MINLOT)) Lot = MarketInfo(Symbol(), MODE_MINLOT);
  else if (Lot > MarketInfo(Symbol(), MODE_MAXLOT)) Lot = MarketInfo(Symbol(), MODE_MAXLOT);
  return (Lot);
}
 static double BalanceOld[0];
  static double BalanceNew[0];
выдает ошибку.Подправьте пожалуйста