Sha256: 7ba894002743c3be821605bfd21af078c46294049b8e8cfb041c35cebe7253cb

Contents?: true

Size: 903 Bytes

Versions: 3

Compression:

Stored size: 903 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
      - border = amnt >= 0 ? "#{amnt * u}px solid green" : "#{amnt * -1 * u}px solid red"
      - width  = "#{ ( pos.outer_strike - pos.inner_strike ) * u}px"
      - left   = "#{ ( pos.stock.last - pos.outer_strike ) * u}px"
      .PositionW{ style: "width: #{width}; left: #{left}; border-right: #{border};" }
        .Position
          .MaxGain{ style: "width: #{pos.max_gain * u}px" }
    .c

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
iron_warbler-2.0.7.25 app/views/iro/positions/_prepare_short_debit_put_spread.haml
iron_warbler-2.0.7.24 app/views/iro/positions/_prepare_short_debit_put_spread.haml
iron_warbler-2.0.7.23 app/views/iro/positions/_prepare_short_debit_put_spread.haml