**ingvar_e:**

I have been looking around for some straight forward method to calculate the lot size based on a percentage of Equity or Free margin.

I found som examples but I did not really like them or understand if they really where "universal" and they had other "bells and whistles" I did not like.

What variables do I need to calculate the lotsize. It should work for all pairs and on any base currency and what is the formula?

I dont need the code, just the formula and the variables.

if (AutoMoneyManagement)

Lots = NormalizeDouble(AccountBalance()*Risk/StopLoss/(MarketInfo(Symbol(), MODE_TICKVALUE)),2);

if (Lots >= MaxLots)

Lots = (MaxLots);

if (Lots <= MinLots)

Lots = (MinLots);

I have been looking around for some straight forward method to calculate the lot size based on a percentage of Equity or Free margin.

I found som examples but I did not really like them or understand if they really where "universal" and they had other "bells and whistles" I did not like.

What variables do I need to calculate the lotsize. It should work for all pairs and on any base currency and what is the formula?

I dont need the code, just the formula and the variables.