Sha256: 65962fbe859294b2c8d84ff69fe69f9b4bf045b1334cae99a87702bdf8529abc

Contents?: true

Size: 879 Bytes

Versions: 21

Compression:

Stored size: 879 Bytes

Contents


- u              = pos.purse.unit # 50 ## pixels per dollar
- strategy       = pos.strategy
- nearest_strike = pos.stock.last.round
- stock          = pos.stock


.StockCoordinatesW
  .StockCoordinates{ style: "height: #{@position.purse.height}px " }

    .grid= render "/iro/stocks/grid_#{pos.strategy.long_or_short}", stock: stock, position: pos

    .Origin{ style: "left: #{ ( nearest_strike - pos.stock.last )* u}px" }
      .label
        Last:
        = pos.stock.last
      - amnt   = pos.next_gain_loss_amount
      -# - byebug
      - border = amnt >= 0 ? "#{amnt * u}px solid green" : "#{amnt * -1 * u}px solid red"
      - width  = "#{ pos.begin_inner_price * u}px"
      - left   = "#{ (pos.stock.last - pos.inner_strike - pos.begin_inner_price) * u}px"
      .PositionW{ style: "width: #{width}; left: #{left}; border-right: #{border};" }
        .Position
    .c

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
iron_warbler-2.0.7.23 app/views/iro/positions/_prepare_covered_call.haml