MaxLot size indicator

 

I have been using the attached indicator for quite some time and it used to work very well. After a recent Windows 10 update, it is not working/loading any more.

- Does anybody have a version of this indicator that is working correctly under the current win10? By the way, I have only an ex4 (not mq4) file which I downloaded from the market place.

- If not, is there any other indicator which does the same job? If yes, could you please post it.

- As a last resort, I have tried to use/make an excel file which could calculate the maxlot size I can buy with the current free margin, however, I cannot find the right formula to retrieve the freemargin from the MT4 DDE server into excel. If anybody knows the line I need, please post it here.


Let me also clarify, that I am NOT looking for an indicator which would calculate some lot size based on risk and SL levels.... I found many of these and I do not need them. I need a simple indicator which simply shows what is the max amount of lots I can buy with the currently available free margin.


BTW, these are not working neither: https://www.mql5.com/ru/code/10769 and https://www.mql5.com/ru/code/10708


Thank you in advance.

<ex4 file deleted>

MAX_LOT
MAX_LOT
  • www.mql5.com
Midvol Индикатор средней волатильности. Указывает точку-середину волатильности за выбранный период. Используется для пробойно-отбойной стратегии. MaChannel Канал из скользящих средних. 8_2_5_Modify 8_2_5_Modify =...
 
rosspet6:

I have been using the attached indicator for quite some time and it used to work very well. After a recent Windows 10 update, it is not working/loading any more.

- Does anybody have a version of this indicator that is working correctly under the current win10? By the way, I have only an ex4 (not mq4) file which I downloaded from the market place.

- If not, is there any other indicator which does the same job? If yes, could you please post it.

- As a last resort, I have tried to use/make an excel file which could calculate the maxlot size I can buy with the current free margin, however, I cannot find the right formula to retrieve the freemargin from the MT4 DDE server into excel. If anybody knows the line I need, please post it here.


Let me also clarify, that I am NOT looking for an indicator which would calculate some lot size based on risk and SL levels.... I found many of these and I do not need them. I need a simple indicator which simply shows what is the max amount of lots I can buy with the currently available free margin.


BTW, these are not working neither: https://www.mql5.com/ru/code/10769 and https://www.mql5.com/ru/code/10708


Thank you in advance.

<ex4 file deleted>

lot = your free margin/required margin
     = AccountFreeMargin()/MarketInfo(_Symbol,MODE_MARGINREQUIRED) <=== max lot based on free margin

but you should also compare to maxlot = MarketInfo(_Symbol, MODE_MAXLOT) <=== max lot based on broker side.

 
Irwan Adnan:

lot = your free margin/required margin
     = AccountFreeMargin()/MarketInfo(_Symbol,MODE_MARGINREQUIRED) <=== max lot based on free margin

but you should also compare to maxlot = MarketInfo(_Symbol, MODE_MAXLOT) <=== max lot based on broker side.

Hi Adnan, thanks for responding, however, I don't know what to do with your response.

Are these lines to be inserted somewhere in a mq4 file? If yes, which file and how? They don't look like excel formulas, so this is why I assume they are for a mq4 file..

Reason: