Skip to content

Commit

Permalink
% of account on Daily Total
Browse files Browse the repository at this point in the history
  • Loading branch information
TranceGeniK committed Dec 1, 2019
1 parent 9b0e828 commit d671fec
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bybit-tools",
"version": "0.4.4",
"version": "0.4.5",
"private": true,
"author": "Maiis Trancegenik <[email protected]>",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions src/components/Home/OpenPosition/OpenPosition.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
</template>

<template v-slot:item.daily_total="{ item }">
<span v-if="dailyTotal(item) < 0" class="error--text">{{dailyTotal(item).toFixed(6)}} | ≈${{(dailyTotal(item).toFixed(6) * $bybitApi.lastPrice).toFixed(2)}}</span>
<span v-else-if="dailyTotal(item) > 0" class="success--text">{{dailyTotal(item).toFixed(6)}} | ≈${{(dailyTotal(item).toFixed(6) * $bybitApi.lastPrice).toFixed(2)}}</span>
<span v-else>{{dailyTotal(item).toFixed(6)}} | ≈${{(dailyTotal(item).toFixed(6) * $bybitApi.lastPrice).toFixed(2)}}</span>
<span v-if="dailyTotal(item) < 0" class="error--text">{{dailyTotal(item).toFixed(6)}} | ≈${{(dailyTotal(item).toFixed(6) * $bybitApi.lastPrice).toFixed(2)}} ({{(100 * dailyTotal(item) / $bybitApi.walletBalance).toFixed(2)}}%)</span>
<span v-else-if="dailyTotal(item) > 0" class="success--text">{{dailyTotal(item).toFixed(6)}} | ≈${{(dailyTotal(item).toFixed(6) * $bybitApi.lastPrice).toFixed(2)}} ({{(100 * dailyTotal(item) / $bybitApi.walletBalance).toFixed(2)}}%)</span>
<span v-else>{{dailyTotal(item).toFixed(6)}} | ≈${{(dailyTotal(item).toFixed(6) * $bybitApi.lastPrice).toFixed(2)}} ({{(100 * dailyTotal(item) / $bybitApi.walletBalance).toFixed(2)}}%)</span>
</template>

<template v-slot:item.entry_price="{ item }">
Expand Down Expand Up @@ -55,7 +55,7 @@
<v-icon small>mdi-shield-edit-outline</v-icon>
</v-btn>
</template>

<trading-stops v-if="dialog" @close="dialog = false"></trading-stops>
</v-dialog>
</template>
Expand Down
10 changes: 5 additions & 5 deletions src/components/Home/OpenPosition/OpenPosition.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ export default {
{text: 'Margin', value: 'position_margin'},
{text: 'Leverage', value: 'leverage'},
{
text: 'Unrealized P&L (Last Traded Price)',
text: 'Unrealized P&L',
value: 'unrealised_pnl_last',
},
{text: 'Daily Realized P&L', value: 'realised_pnl'},
{text: 'Daily Total', value: 'daily_total'},
{text: 'Stop Loss', value: 'stop_loss'},
{text: 'Take Profit', value: 'take_profit'},
{text: 'Trailing Stop', value: 'trailing_stop'},
{text: 'Daily Total (% of Account)', value: 'daily_total'},
{text: 'SL', value: 'stop_loss'},
{text: 'TP', value: 'take_profit'},
{text: 'TS', value: 'trailing_stop'},
{text: 'Stops', value: 'trading_stops'},
{text: 'Market close', value: 'market_close'},
],
Expand Down

0 comments on commit d671fec

Please sign in to comment.