How to check is a specific lotsize is allowed for a account

 

Hello,

whats a good way to check if a specific lotsize (lets say 0,11 lot) is allowed on a trading account? It works on accounts with MODE_MINLOT = 0.01 (or 0.01) and MODE_LOTSTEP = 0.01 but e.x. would not work on accounts with

MODE_MINLOT = 0,1 and MODE_LOTSTEP 0,1. The next accepted value would be 0,1 or 0,2 then. I need to check it within my EA.

Regards

 
https://www.mql5.com/en/forum/882
MQL5.com Search - Quick, Easy and Convenient!
MQL5.com Search - Quick, Easy and Convenient!
  • 2010.04.29
  • www.mql5.com
For example, if you want to learn more about indicators of trading sessions, it is recommended to enter "Indicator session" instead of searching for each word separately.
 
Round it to lot step then check against min and max.
 
whroeder1:
Round it to lot step then check against min and max.

Thanks, I have a working solution now!