Problem With LotSize

 

Hi,Need some help with my Ea Please find the attached Ea

Put lots size equal to .07 as input and put a horizontal line and give name as trend and also give description as trend

The problem when ever trade excute with this lotsize then it will change to .08

I don't why this is happening as i already check for all values but it creating problem for this value

Can some body help me and give me some reason about this ?

 
hi can some body help to solve this problem ??
 
ankityadav:
hi can some body help to solve this problem ??

Try to change this line :

  Resultado = MathCeil(Lots / StpLot) * StpLot;

to

  Resultado = MathFloor(Lots / StpLot) * StpLot;
 
angevoyageur:

Try to change this line :

  Resultado = MathCeil(Lots / StpLot) * StpLot;

to

  Resultado = MathFloor(Lots / StpLot) * StpLot;

or you might change it to ...

 Resultado = MathRound(Lots / StpLot) * StpLot;
 
deVries:

or you might change it to ...


Thanks
 
angevoyageur:

Try to change this line :

to



Thanks
Reason: