Example #1
0
 public Price(int value, Direction roundDirection = Direction.Up)
 {
     this.Direction = roundDirection;
     this.Value     = roundDirection == Direction.Up ?
                      PriceHelpers.RoundUpToNearestBetfairPrice(value / Factor) :
                      PriceHelpers.RoundDownToNearestBetfairPrice(value / Factor);
 }
Example #2
0
 public Price(decimal value, Direction roundDirection = Direction.Up)
 {
     this.Direction = roundDirection;
     this.Value     = roundDirection == Direction.Up ?
                      PriceHelpers.RoundUpToNearestBetfairPrice(value) :
                      PriceHelpers.RoundDownToNearestBetfairPrice(value);
 }
Example #3
0
 public Price ApplySpread(double percentage) => new Price(PriceHelpers.ApplySpread(Value, percentage), Direction);
Example #4
0
 public Price SubtractPip(int num) => new Price(PriceHelpers.SubtractPip(num), Direction);
Example #5
0
 public Price SubtractPip() => new Price(PriceHelpers.SubtractPip(Value), Direction);
Example #6
0
 public Price AddPip(int num) => new Price(PriceHelpers.AddPip(Value, num), Direction);
Example #7
0
 public Price AddPip() => new Price(PriceHelpers.AddPip(Value), Direction);