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