Resposta

Máximo de lotes Proeção não superior a 100

7 respostas

bobotrade

Assinante, bbp_participante, comunidade, 6 respostas.

Perfil da visita

9 anos atrás #113470

Olá,

 

A função "Maximum lots" não aceita números maiores que 100

 

Trata-se de um problema com minha corretora (FXCM) no DAX, que opera microlotes sem decimais

 

 

Obrigado pela ajuda

0

Marca Fric

Administrador, sq-ultimate, 2 respostas.

Perfil da visita

9 anos atrás #129367

Olá,

 

Você pode me dizer o que deseja alcançar? Isso é algum erro no Assistente de EA? Se sua corretora não suporta mais de 100 lotes, isso me parece ser uma limitação da corretora.

Marcar
EstratégiaQuant arquiteto

0

bobotrade

Assinante, bbp_participante, comunidade, 6 respostas.

Perfil da visita

9 anos atrás #129389

Olá,

 

É um erro do Assistente do EA. Quando coloco mais de 100 lotes na seção Maximum Lots Protection, o EA não abre posições

 

E minha corretora FXCM não tem limitações, posso abrir manualmente mais de 100 lotes sem problemas

0

bobotrade

Assinante, bbp_participante, comunidade, 6 respostas.

Perfil da visita

9 anos atrás #129421

Olá,

 

Alguma solução, por favor? Esse é um problema importante para mim

 

Desde já, obrigado 😉

0

nolube

Cliente, bbp_participante, comunidade, 115 respostas.

Perfil da visita

9 anos atrás #129436

Você já tentou digitar 999?

 

Desculpe, mas não tenho certeza se isso ajudará ou não, pois não uso o software.

0

bobotrade

Assinante, bbp_participante, comunidade, 6 respostas.

Perfil da visita

9 anos atrás #129453

olá

 

Você já tentou digitar 999?

 

Desculpe, mas não tenho certeza se isso ajudará ou não, pois não uso o software.

 

Olá, boa idéia, mas não funciona... :unsure:

 

Alguma solução, por favor?

0

bobotrade

Assinante, bbp_participante, comunidade, 6 respostas.

Perfil da visita

9 anos atrás #129576

Olá, você tem uma solução para colocar mais de 100 lotes?

 

Não consigo usar o gerenciamento de dinheiro e estou preso no desenvolvimento do meu EA :wacko:

0

bobotrade

Assinante, bbp_participante, comunidade, 6 respostas.

Perfil da visita

9 anos atrás #129582

Talvez seja necessário alterar algo no código do EA?

//+------------------------------------------------------------------+
//+ Money Management functions
//+------------------------------------------------------------------+

double sqMMGetOrderStopLossDistance(int orderMagicNumber, int orderType) {
   double openPrice = getOrderPrice(orderMagicNumber);
   double slSize = getOrderStopLoss(orderMagicNumber, orderType, openPrice);

   if(slSize == 0) return(0);

   if(orderType == OP_BUY || orderType == OP_BUYSTOP || orderType == OP_BUYLIMIT) {
      return(openPrice - slSize);
   } else {
      return(slSize - openPrice);
   }
}

double sqMMFixedRisk(int orderMagicNumber, int orderType) {
   Verbose("Computing Money Management for order with Magic Number: ", orderMagicNumber," - fixed risk");

   double slSize = sqMMGetOrderStopLossDistance(orderMagicNumber, orderType) * gPointPow;
   if(slSize <= 0) {
      Verbose("Computing Money Management - Stop Loss is zero, using Lots if no MM: ", 5.0);
      return(5.0);
   }

   double _riskInPercent = Risk;
   double _lotsDecimals = 2.0;
   double _maximumLots = 100.0;
   double _exchRate = 1.0;

   if(_riskInPercent < 0 ) {
      Verbose("Computing Money Management - Incorrect RiskInPercent size, it must be above 0");
      return(0);
   }

   double riskPerTrade = (_exchRate * AccountBalance() *  (_riskInPercent / 100.0));
   if(slSize <= 0) {
      Verbose("Computing Money Management - Incorrect StopLossPips size, it must be above 0");
      return(0);
   }
   Verbose("Risk per trade: ", riskPerTrade);

   Verbose("Computing Money Management - SL: ", slSize, ", Account Balance: ", AccountBalance(),", Tick value: ", MarketInfo(Symbol(), MODE_TICKVALUE),", Point: ", MarketInfo(Symbol(), MODE_POINT), ", Lot size: ", MarketInfo(Symbol(), MODE_LOTSIZE),", Tick size: ", MarketInfo(Symbol(), MODE_TICKSIZE));
   double tickValue = MarketInfo(Symbol(),MODE_TICKVALUE);

   double lossPerTick = riskPerTrade / slSize;
   Verbose("Computed lossPerTick: ",lossPerTick);
   double lossPerTick2 = lossPerTick;
   if(Digits == 1 || Digits == 3 || Digits == 5) {
      lossPerTick2 = 0.1 * lossPerTick;
   }
   Verbose("Computing: LossPerTick: ",lossPerTick, ", LossPerTick2: ",lossPerTick2);

   double lotMM1 = lossPerTick2;
   if(tickValue  0) {
      lotMM = lotMM1 - MathMod(lotMM1, lotStep);
   } else {
      lotMM = lotMM1;
   }

   lotMM = NormalizeDouble( lotMM, _lotsDecimals);

   if(MarketInfo(Symbol(), MODE_LOTSIZE)==10000.0) lotMM=lotMM*10.0 ;
   lotMM=NormalizeDouble(lotMM,_lotsDecimals);

   double Smallest_Lot = MarketInfo(Symbol(), MODE_MINLOT);
   double Largest_Lot = MarketInfo(Symbol(), MODE_MAXLOT);

   if (lotMM  Largest_Lot) lotMM = Largest_Lot;

   if(lotMM > _maximumLots) {
      lotMM = _maximumLots;
   }

   Verbose("Computing Money Management - final computed lots: ", lotMM);
   return (lotMM);
}

0

Visualizando 7 respostas - 1 até 7 (de um total de 7)