Create Position Size for existing EA

MQL5 Experts Integração

Trabalho concluído

Tempo de execução 7 dias
Comentário do cliente
Great coder. Very patient and awesome work. Will come back for future projects!
Comentário do desenvolvedor
Thank you for the order.

Termos de Referência

I have an existing EA that i use on different brokers with the following formular to calculate it's position size: 

double GetLot(double risk, int sl = 0)

  {

   double Free    = acc.Balance();

   double tick_value  = smb.TickValue();

   double tick_size  = smb.TickSize();

   if(sl <= 0 || tick_value <= 0)

      return(Free/1000*smb.LotsMin()*risk);


   double LotVal = tick_value *_Point /tick_size;

   double Step    = smb.LotsStep();

   double lot     = MathFloor((Free*risk/100)/(sl*LotVal)/Step)*Step;


   return(lot);

  }


but somehow on one broker the value of the lot sizes is way too small and i need a developer who can provide me with a script which works. Please find attached the specifications for 3 instruments i'm currently trading. On the brokers where the above formular works, the tick size and tick value is set to 0. The broker who provides tick size and tick value the formular:  = MathFloor((Free*risk/100)/(sl*LotVal)/Step)*Step; does not work. 

I'm looking for a lot size calculation script to implement into my EA.

Please let me know if you can provide such script for this specific broker.  

Respondido

1
Desenvolvedor 1
Classificação
(101)
Projetos
123
31%
Arbitragem
7
29% / 29%
Expirado
5
4%
Trabalhando
2
Desenvolvedor 2
Classificação
(443)
Projetos
570
37%
Arbitragem
106
39% / 33%
Expirado
17
3%
Livre
3
Desenvolvedor 3
Classificação
(322)
Projetos
499
67%
Arbitragem
5
40% / 0%
Expirado
4
1%
Livre
Publicou: 8 códigos
4
Desenvolvedor 4
Classificação
(33)
Projetos
36
0%
Arbitragem
2
50% / 0%
Expirado
0
Livre
5
Desenvolvedor 5
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 4 códigos
6
Desenvolvedor 6
Classificação
(19)
Projetos
27
26%
Arbitragem
2
0% / 100%
Expirado
2
7%
Livre
7
Desenvolvedor 7
Classificação
(152)
Projetos
228
80%
Arbitragem
22
27% / 50%
Expirado
11
5%
Livre
Publicou: 24 artigos, 1882 códigos
8
Desenvolvedor 8
Classificação
(36)
Projetos
45
2%
Arbitragem
6
33% / 17%
Expirado
1
2%
Livre

Informações sobre o projeto

Orçamento
30 - 40 USD
Prazo
para 1 dias