kumlien / fx2

fx trade, second try...
1 stars 0 forks source link

Add support for buy transactions in Depot #10

Closed kumlien closed 9 years ago

kumlien commented 9 years ago

Has to do with #19 and #24

kumlien commented 9 years ago

Formula used to calculate max units to buy Margin Available * (margin ratio) / ({BASE}/{HOME Currency} Exchange Rate) For example, suppose: Home Currency: USD Currency Pair: GBP/CHF Margin Available: 100 Margin Ratio : 20:1 Base / Home Currency: GBP/USD = 1.584 Then, Units = (100 * 20) / 1.584 Units = 1262