Skip to content

Commit

Permalink
Add more description to data list brtr/coin_elite#724
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-xiong committed Sep 19, 2023
1 parent d3d9217 commit 20082b7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/shared/_list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<% url = get_list_url(source_type, ch_remote_params(params, h[:sort])) %>
<%= link_to "#{h[:name]}", url, remote: true, class: "#{params[:sort] == h[:sort] ? 'text-primary' : ''}" %>
<% end %>
<% if h[:sort].in?(["roi", "margin_ratio"]) %>
<% if h[:sort].in?(["roi", "margin_ratio", "average_durations"]) %>
<span class="question-mark" data-bs-toggle="tooltip" title='<%= t("views.trading.#{h[:sort]}") %>'>?</span>
<% end %>
</th>
Expand Down
4 changes: 2 additions & 2 deletions app/views/synced_transactions/_list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<td><%= h.event_time.strftime('%Y-%m-%d %H:%M:%S') %></td>
<td><%= h.origin_symbol %></td>
<td class="<%= trade_type_style(h.trade_type) %>"><%= h.trade_type == 'buy' ? '买入' : '卖出' %></td>
<td><%= h.cost_price.round(4) %> <%= h.fee_symbol %></td>
<td data-bs-toggle="tooltip" title='<%= h.cost_price %>'><%= h.cost_price.round(4) %> <%= h.fee_symbol %></td>
<td><%= h.qty.abs.round(4) %></td>
<td><%= h.total_cost.round(4) %> <%= h.fee_symbol %></td>
<td><%= h.price.round(4) %> <%= h.fee_symbol %></td>
<td data-bs-toggle="tooltip" title='<%= h.price %>'><%= h.price.round(4) %> <%= h.fee_symbol %></td>
<td><%= h.amount.abs.round(4) %> <%= h.fee_symbol %></td>
<td><%= h.fee.round(4) %> <%= h.fee_symbol %></td>
<td class="<%= h.revenue > 0 ? 'pos-num' : 'neg-num' %>"><%= "#{h.revenue.round(4)} #{h.fee_symbol}" %></td>
Expand Down
1 change: 1 addition & 0 deletions config/locales/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ zh-CN:
total_revenue: (买入数量-卖出数量)* 当前价格 + 卖出总价 - 买入成本
total_roi: 总收益 / 总买入成本
margin_ratio: 空单为(当前价 - 最低价)/ 最低价,多单为(最高价 - 当前价)/ 当前价
average_durations: 未平仓投入总持仓时间 / 未平仓投入数量
contract_trading:
sell:
buy:
Expand Down

0 comments on commit 20082b7

Please sign in to comment.