Calculate margin for CFD New comment waza123 2015.07.06 14:29 Formula for CFD to get margin , do not understand how to get Percentage with function ?Margin: Lots * ContractSize * MarketPrice * Percentage/100If I useMarketInfo(Symbol(), MODE_MARGINREQUIRED)Then if pair is type: Forex (0)MarketInfo(symbol, MODE_MARGINCALCMODE)its output sum in dollars, but if type is CFD then 0.00its unclear how to calculate margin for CFDThe most interesting that percentage is on brokers website, do I have to type it manually in to array for every pair ? There must be some function to retrieve that information !? How to get the "Percentage of Margin" programmatically How the margin requirements for a symbol are calculated Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes New comment
Formula for CFD to get margin , do not understand how to get Percentage with function ?
Margin: Lots * ContractSize * MarketPrice * Percentage/100
If I use
MarketInfo(Symbol(), MODE_MARGINREQUIRED)
Then if pair is type: Forex (0)
MarketInfo(symbol, MODE_MARGINCALCMODE)
its output sum in dollars, but if type is CFD then 0.00
its unclear how to calculate margin for CFD
The most interesting that percentage is on brokers website, do I have to type it manually in to array for every pair ? There must be some function to retrieve that information !?