Spreads comerciais em moedas. Spreader 2 - página 14

 
Reshetov >>:


...Если поставить малый размер входному параметру profit, то депо будет слито очень быстро.



Você pode me dizer como determinar o tamanho ideal do parâmetro de lucro?

Talvez, dependendo do tamanho do depósito? Mas como exatamente?

 
A propósito, em menos de 24 horas, na demonstração +10% do depósito.
 

há um erro no código.

Precisamos corrigir uma parte dela:

   double secondlots = 0;

   for (int i = 0; i < total; i++) {
      OrderSelect( i, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol()) {
         currentticket = OrderTicket();
         currentprofit = currentprofit + OrderProfit();
         currenttype = OrderType();
      }
      if (OrderSymbol() == seconds_instrument) {
         secondticket = OrderTicket();
         secondtype = OrderType();
         currentprofit = currentprofit + OrderProfit();
         secondlots = OrderLots();
      }
   }


   if (( secondticket < 0) && ( currentticket >= 0)) {
      Comment("Try close positon for " + Symbol());
      if ( currenttype == OP_BUY) {
         if (OrderClose( currentticket, lots, Bid, 2, Blue)) {
            openbarspriceonly = true;
         }
         return(0);
      } else {
         if (OrderClose( currentticket, lots, Ask, 2, Red)) {
            openbarspriceonly = true;
         }
         return(0);
      }
   }

para

   double currentlots = 0;
   double secondlots = 0;

   for (int i = 0; i < total; i++) {
      OrderSelect( i, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol()) {
         currentticket = OrderTicket();
         currentprofit = currentprofit + OrderProfit();
         currenttype = OrderType();
         currentlots = OrderLots();
      }
      if (OrderSymbol() == seconds_instrument) {
         secondticket = OrderTicket();
         secondtype = OrderType();
         currentprofit = currentprofit + OrderProfit();
         secondlots = OrderLots();
      }
   }


   if (( secondticket < 0) && ( currentticket >= 0)) {
      Comment("Try close positon for " + Symbol());
      if ( currenttype == OP_BUY) {
         if (OrderClose( currentticket, currentlots, Bid, 2, Blue)) {
            openbarspriceonly = true;
         }
         return(0);
      } else {
         if (OrderClose( currentticket, currentlots, Ask, 2, Red)) {
            openbarspriceonly = true;
         }
         return(0);
      }
   }
 
vis_inet >>:
Кстати, меньше чем за сутки на демо +10% от депо.

Lista de negócios em estúdio!

Eu tive -20% Depo durante 2 dias, estou testando a versão 3 hoje, até agora em menos.

 
David177 >>:

Список сделок в студию!

У меня за 2 суток -20%депо, сегодня тестирую 3-ю версию, пока в общем минуса.

Aqui, o saldo era de 1054 aproximadamente antes do início dos testes:

Configurações: lote 0,1, lucro 25.

 

Yuri, por favor, faça a segunda versão para abrir os tamanhos de lote especificados nas variáveis para ambos os pares - iguais. Obrigado.

 
e que... ahem... E acrescente o magik à terceira versão.
 
A terceira está realmente perdendo o controle.
 
dimasik >>:

Юрий, сделайте пожалуйста во второй версии чтобы открывал размеры лота, заданные в переменных для обеих пар - равнозначные. Спасибо.


Ou que o tamanho do lote para o segundo par pode ser especificado nas configurações.