Scripts: Auto MM

 

Auto MM:

This script will help you calculate your lot to open position. You just need to enter Risk and StopLoss.

Auto MM

Author: Siti Latifah

 
Aimak:

Hello. I appreciate your script which I find very useful. However, I think there is something wrong. Please see this screenshot I used the script to open a BUY trade with risk 1% and SL =25. However the trade opened is 10 times larger in lots and with more pips for SL. Could you help me find what is wrong. Thank you.

 Edit: at the time of opening this trade the balance was $504, aprox. 

are you sure 1% ? 

the result seems like 10%.

try again ..make sure.. you can try at demo account first

 
This code is not working correctly, sorry.
 
Alain Verleyen:
This code is not working correctly, sorry.
hello..
what is the problem ?
 
hemm I think about about digits the problem..

just a little modify...

remove this section

 if(Digits==2 || Digits==4) poen=Point;

 if(Digits==3 || Digits==5) poen=10*Point;


then change every poen to Point


that's all

 
Siti Latifah:
hello..
what is the problem ?

Balance : 10008 GBP, standard lot on EURUSD, default settings : Risk=10, SL=20

Result : 18.32 lots

That's not correct, by far (should be ~7.15). You should test your code before publishing it.

 
Alain Verleyen:

Balance : 10008 GBP, standard lot on EURUSD, default settings : Risk=10, SL=20

Result : 18.32 lots

That's not correct, by far (should be ~7.15). You should test your code before publishing it.

yeah.. I had tried, but for 4 digits decimal..

I think the auto digits is not correctly.

it will be correct just need remove / delete  "10" in thes section

 if(Digits==2 || Digits==4) poen=Point;

 if(Digits==3 || Digits==5) poen=10*Point;

CHANGE TO

 if(Digits==2 || Digits==4) poen=Point;

 if(Digits==3 || Digits==5) poen=Point;

so, that is using 5 digits format.

SL 20 (4 digits ) = SL 200 (5 digits).


SS2ss1