using Account information functions - page 2

 
alladir:


What kinds of profits/loss are you making?

If your total loss is >100, and floating losses are included in the calculation of AccountFreeMargin()   (i.e. AccountFreeMarginMode() = 1 or 4)  then I guess this will cause a margin call even though no new trades were opened while free margin was <100.

Fundamentally, I think 100 is too small an amount. It depends on how much you are trading but if it's any decent amount, leaving only 100 is just too risky.


okay, i have gone through the accountFreeMarginMode(), well 100 was just for backtesting and I am not using it on a live market. I just wanted to find a way to avoid margin call by limiting the number of trades that the expert advisor makes by looking at the free margin available.


So after knowing the account free margin mode, how do I use that to help me with controlling the advisor?

Reason: