Max CURRENT availible lot size

 

Hi Guys,

I need to know what my max available lot size would be for my current position (having already one or more trades open)?  In MT5 I believe you could just call a method.

 So for example if I have 2 trades open, I then need the max value for lot size just before I will get error code 134 - Not enough money.

 

Please help or guide me in MT4

 

Thanks!! 

 
ToolMaker: max available lot size would be for my current position (having already one or more trades open)?
You verify that there is available margin at the most adverse excursion (i.e. SL) for ALL open orders (and the new one.) See my code
Reason: