Job finished
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.