Download MetaTrader 5

Scripts: Auto MM

To add comments, please log in or register
Automated-Trading
Admin
104207
Automated-Trading  

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
83
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. 

Chart AUDNZD., H1, 2015.10.19 16:16 UTC, Tradeslide Trading Tech LTD, MetaTrader 4, Real
Chart AUDNZD., H1, 2015.10.19 16:16 UTC, Tradeslide Trading Tech LTD, MetaTrader 4, Real
  • www.mql5.com
Symbol: AUDNZD.. Periodicity: H1. Broker: Tradeslide Trading Tech LTD. Trading Platform: MetaTrader 4. Trading Mode: Real. Date: 2015.10.19 16:16 UTC.
Siti Latifah
10007
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

Alain Verleyen
Moderator
32410
Alain Verleyen  
This code is not working correctly, sorry.
Siti Latifah
10007
Siti Latifah  
Alain Verleyen:
This code is not working correctly, sorry.
hello..
what is the problem ?
Siti Latifah
10007
Siti Latifah  
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

Alain Verleyen
Moderator
32410
Alain Verleyen  
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.

Siti Latifah
10007
Siti Latifah  
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

To add comments, please log in or register