Beispiel #1
0
 private double CalculateRequiredShortAmount(double buyAmount, double spread)
 {
     return((buyAmount * Long.HighestBidInBaseCurrency() + spread * buyAmount) / Short.LowestAskInBaseCurrency());
 }
Beispiel #2
0
 private double CalculateRequiredLongAmount(double sellAmount, double spread)
 {
     return(sellAmount * Short.LowestAskInBaseCurrency() / (Long.HighestBidInBaseCurrency() + spread));
 }