|
|
@ -2,7 +2,6 @@ import { RuleSettings } from '@ghostfolio/api/models/interfaces/rule-settings.in |
|
|
|
import { Rule } from '@ghostfolio/api/models/rule'; |
|
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
|
import { UserSettings } from '@ghostfolio/common/interfaces'; |
|
|
|
import { MarketAdvanced } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
export class RegionalMarketClusterRiskNorthAmerica extends Rule<Settings> { |
|
|
|
private currentValueInBaseCurrency: number; |
|
|
@ -11,19 +10,14 @@ export class RegionalMarketClusterRiskNorthAmerica extends Rule<Settings> { |
|
|
|
public constructor( |
|
|
|
protected exchangeRateDataService: ExchangeRateDataService, |
|
|
|
currentValueInBaseCurrency: number, |
|
|
|
marketsAdvanced: { |
|
|
|
id: MarketAdvanced; |
|
|
|
valueInBaseCurrency?: number; |
|
|
|
valueInPercentage: number; |
|
|
|
} |
|
|
|
valueInBaseCurrency |
|
|
|
) { |
|
|
|
super(exchangeRateDataService, { |
|
|
|
key: RegionalMarketClusterRiskNorthAmerica.name, |
|
|
|
name: 'Regional Markets' |
|
|
|
}); |
|
|
|
this.currentValueInBaseCurrency = currentValueInBaseCurrency; |
|
|
|
this.regionalMarketNorthAmericaValueInBaseCurrency = |
|
|
|
marketsAdvanced.valueInBaseCurrency; |
|
|
|
this.regionalMarketNorthAmericaValueInBaseCurrency = valueInBaseCurrency; |
|
|
|
} |
|
|
|
|
|
|
|
public evaluate(ruleSettings: Settings) { |
|
|
|