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