Hi
I need help with coding in EA to 'print net margin utilized for a symbol'
If I have EAs running on 3 different currency charts, the EA on each of those charts should only print the margin utilized by that symbol.
Taking on new orders for that symbol would have EA on its chart to recalculate and print the new utilized margin.
My current dashboard information display is coded like this.
p("Equity / Balance: " + DoubleToString(AccountEquity(), 2) + " / " + DoubleToString(AccountBalance(), 2));
p("Margin / Free margin: " + DoubleToString(AccountMargin(), 2) + " / " + DoubleToString(AccountFreeMargin(),2));
Currently the Margin figure is showing a collective Account Margin (total Margin) for all different currency pairs on order. So, I see the same Margin status on EAs dashboard when I switch to any other currency pair.
How could this be coded to only show only the margin of the respective currency?
Meaning, if I view EURUSD it should show the margin of only all EURUSD orders in trade. And if I switch over to GBPUSD, it will show only margin for GBPUSD trades.
Rgds
AMK
- Trade - MetaTrader 5 for Android
- Collateral Symbols - For Advanced Users - Trading Operations
- Trade - MetaTrader 5 for iPhone
Hope someone could help.
Thank you

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