Download MetaTrader 5

EA Money Management

To add comments, please log in or register
Does your signal already have a lot of of subscribers? It's time to think about the paid subscription!
SSX666
11
SSX666 2014.06.09 13:17 

Is there a way to limit the max margin used by a EA to a fixed amount like $100?

Thank you

Alain Verleyen
Moderator
30752
Alain Verleyen 2014.06.09 13:19  
SSX666:

Is there a way to limit the max margin used by a EA to a fixed amount like $100?

Thank you

It depends if you have to source code or not. With the code, no problem to get this limit.
SSX666
11
SSX666 2014.06.09 14:19  

I do. But I am new to MT4. I got the EA from a third party and it keeps trading until has exhausted the margins. So I want it to stop to a specific margin value i.e. $100 is there a function/command to do so? Is something that a newbie can handle?

Thank you

Alain Verleyen
Moderator
30752
Alain Verleyen 2014.06.10 15:06  
SSX666:

I do. But I am new to MT4. I got the EA from a third party and it keeps trading until has exhausted the margins. So I want it to stop to a specific margin value i.e. $100 is there a function/command to do so? Is something that a newbie can handle?

Thank you

Provided that you are using an USD account :

         if(AccountInfoDouble(ACCOUNT_MARGIN)>100)
         // You can trade
         else
         // You can't trade
To add comments, please log in or register