public Price(int value, Direction roundDirection = Direction.Up) { this.Direction = roundDirection; this.Value = roundDirection == Direction.Up ? PriceHelpers.RoundUpToNearestBetfairPrice(value / Factor) : PriceHelpers.RoundDownToNearestBetfairPrice(value / Factor); }
public Price(decimal value, Direction roundDirection = Direction.Up) { this.Direction = roundDirection; this.Value = roundDirection == Direction.Up ? PriceHelpers.RoundUpToNearestBetfairPrice(value) : PriceHelpers.RoundDownToNearestBetfairPrice(value); }
public Price ApplySpread(double percentage) => new Price(PriceHelpers.ApplySpread(Value, percentage), Direction);
public Price SubtractPip(int num) => new Price(PriceHelpers.SubtractPip(num), Direction);
public Price SubtractPip() => new Price(PriceHelpers.SubtractPip(Value), Direction);
public Price AddPip(int num) => new Price(PriceHelpers.AddPip(Value, num), Direction);
public Price AddPip() => new Price(PriceHelpers.AddPip(Value), Direction);