lib/ig_markets/position.rb
def profit_loss
      return size / level if market.instrument_type == :binary

      price_delta * size * contract_size
    end
# Returns this position's current profit or loss, denominated in its {#currency}, and based on the current market
# state as stored in {#market}. For binary instruments this returns the payout amount.
#
# @return [Float]
Returns this position's current profit or loss, denominated in its {#currency}, and based on the current market
state as stored in {#market}. For binary instruments this returns the payout amount.
Returns this position ' s current profit or loss denominated in its { #currency } and based on the current market state as stored in { #market } . For binary instruments this returns the payout amount .
def profit_loss
      return size / level if market.instrument_type == :binary
      price_delta * size * contract_size
    end
def profit_loss return size / level if market . instrument_type == :binary price_delta * size * contract_size end
Returns this position's current profit or loss, denominated in its {#currency}, and based on the current market
state as stored in {#market}.
Returns this position ' s current profit or loss denominated in its { #currency } and based on the current market state as stored in { #market } .
None
Float