Download MetaTrader 5

Problem With LotSize

To add comments, please log in or register
ankityadav
208
ankityadav  

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 ?

ankityadav
208
ankityadav  
hi can some body help to solve this problem ??
Alain Verleyen
Moderator
34405
Alain Verleyen  
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;
Tjipke de Vries
6424
Tjipke de Vries  
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;
ankityadav
208
ankityadav  
deVries:

or you might change it to ...


Thanks
ankityadav
208
ankityadav  
angevoyageur:

Try to change this line :

to



Thanks
To add comments, please log in or register