Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Script | Check Margin

This script calculates required margin to open a trade by examining specified volume.

It also calculates maximum amount of lots that can be traded for given symbol.

PARAMETERS

  • Symbol Name: select symbol for calculation. if it is not specified script takes chart symbol as default.
  • Volume: specify lots for required margin calculation.
  • Order Type: determine order type. results can be changed even a little because of spread.

MetaTrader Experts, Indicators, Scripts and Libraries

Example: CADJPY with default parameters

30725