Sha256: 9fcee5b34b9ebd1d048c51bca1e6017f62887c51d7c62e996d45686f531dc02a
Contents?: true
Size: 1.38 KB
Versions: 3
Compression:
Stored size: 1.38 KB
Contents
- pos = position - stock = pos.stock - nearest_strike = stock.last.round - u = pos.purse.unit # pixels per dollar .collapse-expand.d-flex{ id: "gameui-pos-#{pos.id}" } [<>] .maxwidth= render "/iro/positions/header", pos: pos .a = render "/iro/positions/header_#{pos.strategy.kind}", pos: pos .StockCoordinatesW .StockCoordinates{ style: "height: #{pos.q() *u}px " } .grid= render "/iro/stocks/grid_#{pos.strategy.long_or_short}", stock: stock, position: pos .Origin{ style: "left: #{ ( nearest_strike - stock.last )* u}px" } .label Last: #{pp_amount stock.last} .c -## these are different - left = "#{ ( stock.last - pos.outer_strike ) * u}px" - width = "#{ ( pos.outer_strike - pos.inner_strike ) * u}px" .PositionW{ class: pos.strategy.kind, style: "left: #{left}; width: #{width}; " } .Position .MaxGain{ style: "width: #{pos.max_gain * u}px" } .RollGuide - if pos.net_amount >= 0 .Net.NetPositive{ style: "width: #{ (pos.net_amount / 100) * u }px; right: 0" } .label net = pp_amount pos.net_amount - else .Net.NetNegative{ style: "width: #{ (-1 * pos.net_amount / 100) * u }px; left: 100%" } .label net = pp_amount pos.net_amount .c
Version data entries
3 entries across 3 versions & 1 rubygems