mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-11 02:33:51 +00:00
Use common profitvariable in profit_summary
This commit is contained in:
parent
2ef746d8f8
commit
86fda37d51
|
@ -76,7 +76,7 @@ export default class CandleChartContainer extends Vue {
|
|||
|
||||
@Prop({ required: true }) readonly timeframe!: string;
|
||||
|
||||
@Prop({ required: false, default: [] }) readonly trades!: Array<Trade>;
|
||||
@Prop({ required: false, default: () => [] }) readonly trades!: Array<Trade>;
|
||||
|
||||
@Prop({ required: false, default: false }) historicView!: boolean;
|
||||
|
||||
|
|
|
@ -13,14 +13,9 @@
|
|||
{{ comb.pair }}
|
||||
<span v-if="comb.locks" :title="comb.lockReason"> 🔒 </span>
|
||||
</div>
|
||||
<b-badge
|
||||
:variant="comb.trade && comb.trade.profit_ratio > 0 ? 'success' : 'danger'"
|
||||
pill
|
||||
:title="comb.profitString"
|
||||
>{{
|
||||
comb.trade && comb.trade.profit_ratio ? formatPercent(comb.trade.profit_ratio) : ''
|
||||
}}</b-badge
|
||||
>
|
||||
<b-badge :variant="comb.profit > 0 ? 'success' : 'danger'" pill :title="comb.profitString">{{
|
||||
comb.profit ? formatPercent(comb.profit) : ''
|
||||
}}</b-badge>
|
||||
</b-list-group-item>
|
||||
</b-list-group>
|
||||
</template>
|
||||
|
@ -39,6 +34,7 @@ interface CombinedPairList {
|
|||
profitString: string;
|
||||
trade?: Trade;
|
||||
locks?: Lock;
|
||||
profit: number;
|
||||
}
|
||||
|
||||
@Component({})
|
||||
|
@ -84,7 +80,7 @@ export default class PairSummary extends Vue {
|
|||
if (trade) {
|
||||
profitString += `\nOpen since: ${timestampms(trade.open_timestamp)}`;
|
||||
}
|
||||
comb.push({ pair, trade, locks, lockReason, profitString });
|
||||
comb.push({ pair, trade, locks, lockReason, profitString, profit });
|
||||
});
|
||||
// sort Pairs: "with open trade" -> available -> locked
|
||||
comb.sort((a, b) => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user