|
@ -26,10 +26,10 @@ export class FeeRatioInitialInvestment extends Rule<Settings> { |
|
|
? this.fees / this.totalInvestment |
|
|
? this.fees / this.totalInvestment |
|
|
: 0; |
|
|
: 0; |
|
|
|
|
|
|
|
|
if (feeRatio > ruleSettings.threshold) { |
|
|
if (feeRatio > ruleSettings.thresholdMax) { |
|
|
return { |
|
|
return { |
|
|
evaluation: `The fees do exceed ${ |
|
|
evaluation: `The fees do exceed ${ |
|
|
ruleSettings.threshold * 100 |
|
|
ruleSettings.thresholdMax * 100 |
|
|
}% of your initial investment (${(feeRatio * 100).toPrecision(3)}%)`,
|
|
|
}% of your initial investment (${(feeRatio * 100).toPrecision(3)}%)`,
|
|
|
value: false |
|
|
value: false |
|
|
}; |
|
|
}; |
|
@ -37,7 +37,7 @@ export class FeeRatioInitialInvestment extends Rule<Settings> { |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
evaluation: `The fees do not exceed ${ |
|
|
evaluation: `The fees do not exceed ${ |
|
|
ruleSettings.threshold * 100 |
|
|
ruleSettings.thresholdMax * 100 |
|
|
}% of your initial investment (${(feeRatio * 100).toPrecision(3)}%)`,
|
|
|
}% of your initial investment (${(feeRatio * 100).toPrecision(3)}%)`,
|
|
|
value: true |
|
|
value: true |
|
|
}; |
|
|
}; |
|
@ -47,12 +47,12 @@ export class FeeRatioInitialInvestment extends Rule<Settings> { |
|
|
return { |
|
|
return { |
|
|
baseCurrency: aUserSettings.baseCurrency, |
|
|
baseCurrency: aUserSettings.baseCurrency, |
|
|
isActive: true, |
|
|
isActive: true, |
|
|
threshold: 0.01 |
|
|
thresholdMax: 0.01 |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
interface Settings extends RuleSettings { |
|
|
interface Settings extends RuleSettings { |
|
|
baseCurrency: string; |
|
|
baseCurrency: string; |
|
|
threshold: number; |
|
|
thresholdMax: number; |
|
|
} |
|
|
} |
|
|