SHARE
TWEET

Untitled

a guest Jun 25th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Spread = ReasonabilitySpread.GetObject(businessType, customerId, bookId, CurrencyPairGroup.GetCurrencyPairGroupId(currency, currency2, new SPFactory()), true);
  2.             MarketRate = marketRate;
  3.             UpRate = marketRate;
  4.             LowRate = marketRate;
  5.  
  6.             double spreadT = 0;
  7.             double spreadW = 0;
  8.             double minim = 0;
  9.  
  10.             if (Spread != null)
  11.             {
  12.                 spreadT = Spread.GetSpread(ReasonabilitySpread.DirectionEnum.Tight);
  13.                 spreadW = Spread.GetSpread(ReasonabilitySpread.DirectionEnum.Wide);
  14.                 minim = (Spread.Minimum ?? 0) / 100;
  15.  
  16.                 var instanceSettingProvider = new InstanceSettingProvider(new SPFactory());
  17.                 if (!instanceSettingProvider.GetInstanceCode().Equals("BB"))
  18.                 {
  19.                     spreadT = spreadT / 100;
  20.                     spreadW = spreadW / 100;
  21.                 }
  22.             }
  23.             if (betterRate == BetterRateEnum.Higher)
  24.             {
  25.                 UpRate = marketRate + Math.Abs(marketRate) * spreadW;
  26.                 LowRate = marketRate - Math.Abs(marketRate) * spreadT;
  27.             }
  28.             else
  29.             {
  30.                 UpRate = marketRate + Math.Abs(marketRate) * spreadT;
  31.                 LowRate = marketRate - Math.Abs(marketRate) * spreadW;
  32.             }
  33.             if (marketRate - LowRate < minim)
  34.             {
  35.                 LowRate = marketRate - minim;
  36.             }
  37.             if (UpRate - marketRate < minim)
  38.             {
  39.                 UpRate = marketRate + minim;
  40.             }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top