|
@ -1,8 +1,9 @@ |
|
|
import { Settings } from '@ghostfolio/api/models/interfaces/rule-settings.interface'; |
|
|
|
|
|
import { Rule } from '@ghostfolio/api/models/rule'; |
|
|
import { Rule } from '@ghostfolio/api/models/rule'; |
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
import { UserSettings } from '@ghostfolio/common/interfaces'; |
|
|
import { UserSettings } from '@ghostfolio/common/interfaces'; |
|
|
|
|
|
|
|
|
|
|
|
import { Settings } from './interfaces/rule-settings.interface'; |
|
|
|
|
|
|
|
|
export class RegionalMarketClusterRiskEurope extends Rule<Settings> { |
|
|
export class RegionalMarketClusterRiskEurope extends Rule<Settings> { |
|
|
private currentValueInBaseCurrency: number; |
|
|
private currentValueInBaseCurrency: number; |
|
|
private europeValueInBaseCurrency: number; |
|
|
private europeValueInBaseCurrency: number; |
|
@ -10,7 +11,7 @@ export class RegionalMarketClusterRiskEurope extends Rule<Settings> { |
|
|
public constructor( |
|
|
public constructor( |
|
|
protected exchangeRateDataService: ExchangeRateDataService, |
|
|
protected exchangeRateDataService: ExchangeRateDataService, |
|
|
currentValueInBaseCurrency: number, |
|
|
currentValueInBaseCurrency: number, |
|
|
valueInBaseCurrency: number |
|
|
europeValueInBaseCurrency: number |
|
|
) { |
|
|
) { |
|
|
super(exchangeRateDataService, { |
|
|
super(exchangeRateDataService, { |
|
|
key: RegionalMarketClusterRiskEurope.name, |
|
|
key: RegionalMarketClusterRiskEurope.name, |
|
@ -18,7 +19,7 @@ export class RegionalMarketClusterRiskEurope extends Rule<Settings> { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
this.currentValueInBaseCurrency = currentValueInBaseCurrency; |
|
|
this.currentValueInBaseCurrency = currentValueInBaseCurrency; |
|
|
this.europeValueInBaseCurrency = valueInBaseCurrency; |
|
|
this.europeValueInBaseCurrency = europeValueInBaseCurrency; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public evaluate(ruleSettings: Settings) { |
|
|
public evaluate(ruleSettings: Settings) { |
|
|