Sha256: 2e1cf4fb1aba9eab7fb8b40c88dcb4b3d7765cea85571a9c4719c58058e10dcc

Contents?: true

Size: 1022 Bytes

Versions: 19

Compression:

Stored size: 1022 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.q * @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.inner_strike - pos.outer_strike ) * u}px"
      - left   = "#{ ( pos.outer_strike - pos.stock.last ) * u}px"
      .PositionW{ class: pos.strategy.kind, style: "width: #{width}; left: #{left}; " }
        .Position{ style: " border-right: #{border}; " }
        .MaxGain{ style: "width: #{pos.max_gain * u}px" }
        .select= button_to 'select', prepare2_position_path(pos.id)
    .c

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
iron_warbler-2.0.7.45 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.43 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.42 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.41 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.40 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.39 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.38 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.37 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.36 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.35 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.34 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.33 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.32 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.31 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.30 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.29 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.28 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.27 app/views/iro/positions/_prepare_long_debit_call_spread.haml
iron_warbler-2.0.7.26 app/views/iro/positions/_prepare_long_debit_call_spread.haml