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