Download MetaTrader 5
To add comments, please log in or register
Interessiert am Partnerprogramm MQL5.community? Veröffentliche Links und verdiene Geld damit!
ankityadav
208
ankityadav 2014.05.09 09:06 

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 2014.05.10 09:12  
hi can some body help to solve this problem ??
Alain Verleyen
Moderator
28659
Alain Verleyen 2014.05.10 20:22  
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
6282
Tjipke de Vries 2014.05.10 21:00  
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 2014.05.11 17:44  
deVries:

or you might change it to ...


Thanks
ankityadav
208
ankityadav 2014.05.11 17:44  
angevoyageur:

Try to change this line :

to



Thanks
/
To add comments, please log in or register