setting margin and profit/loss

 

i am the user of meta 5, but i don't know how to set up the margin, profit/loss. i want to make the margin for forex and cfd.

suppose i have trade for eurusd the margin that i want for fix amount is us$ 1.000,- and another one i want margin for floating. the formula for fix margin is contract size * lot.

and to get the formula for calculation profit loss CFD are : price * contract size * lot * leverage / rate

ie : buy 1 lot HSBC HOLDING at 3.5 contract size 100.000 shares, leverage 10% rate at 7.75. running 3.6

the result for margin is 4.516.13 then for profit loss is 1.290,32

could you help this problem of me

Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Symbol Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Symbol Properties - Documentation on MQL5