1.Yes, yes.
2.It shouldn't. If your broker has gold as GOLD, you have to make additional calculations, but it's unreal.
3.Margin could be changed after order has opened, so calculate for open price only.
4.I don't know these ways, sorry.
Roger, Roger. Thanks.
I have another question - are there brokers that have a different calculation method for margin required? I think I found a broker that regardless of symbol the margin required = volume*contract/leverage. Is that possible? How can I know which broker has what method?

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
Some questions regarding code from the article Forex Trading ABC: