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: 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;
|
@Prop({ required: false, default: false }) historicView!: boolean;
|
||||||
|
|
||||||
|
|
|
@ -13,14 +13,9 @@
|
||||||
{{ comb.pair }}
|
{{ comb.pair }}
|
||||||
<span v-if="comb.locks" :title="comb.lockReason"> 🔒 </span>
|
<span v-if="comb.locks" :title="comb.lockReason"> 🔒 </span>
|
||||||
</div>
|
</div>
|
||||||
<b-badge
|
<b-badge :variant="comb.profit > 0 ? 'success' : 'danger'" pill :title="comb.profitString">{{
|
||||||
:variant="comb.trade && comb.trade.profit_ratio > 0 ? 'success' : 'danger'"
|
comb.profit ? formatPercent(comb.profit) : ''
|
||||||
pill
|
}}</b-badge>
|
||||||
:title="comb.profitString"
|
|
||||||
>{{
|
|
||||||
comb.trade && comb.trade.profit_ratio ? formatPercent(comb.trade.profit_ratio) : ''
|
|
||||||
}}</b-badge
|
|
||||||
>
|
|
||||||
</b-list-group-item>
|
</b-list-group-item>
|
||||||
</b-list-group>
|
</b-list-group>
|
||||||
</template>
|
</template>
|
||||||
|
@ -39,6 +34,7 @@ interface CombinedPairList {
|
||||||
profitString: string;
|
profitString: string;
|
||||||
trade?: Trade;
|
trade?: Trade;
|
||||||
locks?: Lock;
|
locks?: Lock;
|
||||||
|
profit: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({})
|
@Component({})
|
||||||
|
@ -84,7 +80,7 @@ export default class PairSummary extends Vue {
|
||||||
if (trade) {
|
if (trade) {
|
||||||
profitString += `\nOpen since: ${timestampms(trade.open_timestamp)}`;
|
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
|
// sort Pairs: "with open trade" -> available -> locked
|
||||||
comb.sort((a, b) => {
|
comb.sort((a, b) => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user