public decimal GetPrice(decimal bid, decimal ask, FxToAssetPairDirection direction, bool metricIsPositive = true) { return(metricIsPositive ? direction == FxToAssetPairDirection.Straight ? ask : 1 / bid : direction == FxToAssetPairDirection.Straight ? bid : 1 / ask); }
public decimal GetPrice(InstrumentBidAskPair quote, FxToAssetPairDirection direction, bool metricIsPositive = true) { return(metricIsPositive ? direction == FxToAssetPairDirection.Straight ? quote.Ask : 1 / quote.Bid : direction == FxToAssetPairDirection.Straight ? quote.Bid : 1 / quote.Ask); }