Create Position Size for existing EA

MQL5 Experts Integration

Job finished

Execution time 7 days
Feedback from customer
Great coder. Very patient and awesome work. Will come back for future projects!
Feedback from employee
Thank you for the order.

Specification

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.  

Responded

1
Developer 1
Rating
(101)
Projects
123
31%
Arbitration
7
29% / 29%
Overdue
5
4%
Working
2
Developer 2
Rating
(443)
Projects
570
37%
Arbitration
106
39% / 33%
Overdue
17
3%
Free
3
Developer 3
Rating
(322)
Projects
499
67%
Arbitration
5
40% / 0%
Overdue
4
1%
Free
Published: 8 codes
4
Developer 4
Rating
(33)
Projects
36
0%
Arbitration
2
50% / 0%
Overdue
0
Free
5
Developer 5
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Published: 4 codes
6
Developer 6
Rating
(19)
Projects
27
26%
Arbitration
2
0% / 100%
Overdue
2
7%
Free
7
Developer 7
Rating
(152)
Projects
228
80%
Arbitration
22
27% / 50%
Overdue
11
5%
Free
Published: 24 articles, 1882 codes
8
Developer 8
Rating
(36)
Projects
45
2%
Arbitration
6
33% / 17%
Overdue
1
2%
Free

Project information

Budget
30 - 40 USD
Deadline
to 1 day(s)