You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Exactly what I posted above ;)
Instead of using a fixed value, you can get the Contract size with SymbolInfoDouble( ..., SYMBOL_TRADE_CONTRACT_SIZE )
Also, instead of using String manipulation you can obtain the Base, Profit and Margin Currencies using SymbolInfoString() and SYMBOL_CURRENCY_BASE, SYMBOL_CURRENCY_PROFIT and SYMBOL_CURRENCY_MARGIN
EDIT: By the way, you can also covert it into a "pip" equivalent if you prefer:
Instead of using a fixed value, you can get the Contract size with SymbolInfoDouble( ..., SYMBOL_TRADE_CONTRACT_SIZE )
Also, instead of using String manipulation you can obtain the Base, Profit and Margin Currencies using SymbolInfoString() and SYMBOL_CURRENCY_BASE, SYMBOL_CURRENCY_PROFIT and SYMBOL_CURRENCY_MARGIN
Thanks for the tips, but...
SYMBOL_CURRENCY_BASE doesn't work properly on CFD symbols eg. SPXUSD hence the string find.
I used MODE_LOTSIZE instead of SYMBOL_CONTRACT_SIZE which can be found in the UnitsDepositCurrency conversion function (updated for MQL5 compatibility). Also, the fixed number of 100,000.0 is a const factor in the commission calculation.
I tweaked it to make it more compatible with ECN brokers who offer multiple symbols. eg. EURUSD, EURUSDecn
Hi, I have a challenge. I'd like to create an input where I set the percentage of my account equity I want to use for each trade and calculate the volume size for each order.
My problem is that I do not know the formula to convert deposit currecy value to lot size.
I apperciate any help.
Hi, I have a challenge. I'd like to create an input where I set the percentage of my account equity I want to use for each trade and calculate the volume size for each order.
My problem is that I do not know the formula to convert deposit currecy value to lot size.
I apperciate any help.
I finally found what I needed. Anyoune who needs thake a look. The article is in portuguese, but you may translate it at google.
<Link Removed>
Moderator: Please do not post links to other websites
I finally found what I needed. Anyoune who needs thake a look. The article is in portuguese, but you may translate it at google.
<Link Removed>
Moderator: Please do not post links to other websites
Please you can send me the link in a private message.