diff --git a/app/models/open_spot_order.rb b/app/models/open_spot_order.rb index d083125..0da7bee 100644 --- a/app/models/open_spot_order.rb +++ b/app/models/open_spot_order.rb @@ -4,6 +4,6 @@ def current_price end def margin_rate - current_price.zero? ? 0 : ((price - current_price) / current_price) * 100 + current_price.zero? ? 0 : ((current_price - price) / current_price) * 100 end end diff --git a/app/views/page/open_spot_orders.html.erb b/app/views/page/open_spot_orders.html.erb index 0f37da1..b68984f 100644 --- a/app/views/page/open_spot_orders.html.erb +++ b/app/views/page/open_spot_orders.html.erb @@ -22,9 +22,8 @@