Create Position Size for existing EA

Trabajo finalizado

Plazo de ejecución 7 días
Comentario del Cliente
Great coder. Very patient and awesome work. Will come back for future projects!
Comentario del Ejecutor
Thank you for the order.

Tarea técnica

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.  

Han respondido

1
Desarrollador 1
Evaluación
(101)
Proyectos
123
31%
Arbitraje
7
29% / 29%
Caducado
5
4%
Trabaja
2
Desarrollador 2
Evaluación
(443)
Proyectos
570
37%
Arbitraje
106
39% / 33%
Caducado
17
3%
Libre
3
Desarrollador 3
Evaluación
(322)
Proyectos
499
67%
Arbitraje
5
40% / 0%
Caducado
4
1%
Libre
Ha publicado: 8 ejemplos
4
Desarrollador 4
Evaluación
(33)
Proyectos
36
0%
Arbitraje
2
50% / 0%
Caducado
0
Libre
5
Desarrollador 5
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
Ha publicado: 4 ejemplos
6
Desarrollador 6
Evaluación
(19)
Proyectos
27
26%
Arbitraje
2
0% / 100%
Caducado
2
7%
Libre
7
Desarrollador 7
Evaluación
(152)
Proyectos
228
80%
Arbitraje
22
27% / 50%
Caducado
11
5%
Libre
Ha publicado: 24 artículos, 1882 ejemplos
8
Desarrollador 8
Evaluación
(36)
Proyectos
45
2%
Arbitraje
6
33% / 17%
Caducado
1
2%
Libre

Información sobre el proyecto

Presupuesto
30 - 40 USD
Plazo límite de ejecución
a 1 día(s)