3 <%= form_tag({:action=>'index'}, method: :get) do %>
5 <%= select_tag 'id_stock', options_from_collection_for_select(@securities, "id", "name", @selected_security.id), prompt: '-- Select Security --' %>
6 <%= button_tag 'show', :name=>'show', :value=>'this' %>
7 <%= button_tag '<= previous', :name=>'show', :value=>'previous' %>
8 <%= button_tag 'next =>', :name=>'show', :value=>'next' %>
12 <% if not @intraday_quotes.empty? %>
14 <em>intraday quotes in contrast to previous records</em></h2>
16 <% @intraday_quotes.each do |q| %>
18 <td><b><%= q.quote %></b> at <%= q.time %></td>
20 <% msg, newqr = @quoterecords.inspect_quote(q) %>
21 <% if not msg.empty? %>
22 <span><%= msg %></span>
24 <%= form_for newqr, url: {action: "create"} do |f| %>
25 <%= f.hidden_field :id_stock %>
26 <%= f.hidden_field :id_quote %>
27 <%= f.select :column, Quoterecord.new.get_columns, :prompt=>'-- Select Column --' %>
28 <%= f.text_field :comment, placeholder: 'Comment' %>
29 <%= f.check_box :is_pivotal_point %><%= f.label :is_pivotal_point, 'Pivotal Point' %>
30 <%= f.check_box :is_uphit %><%= f.label :is_uphit, 'UP hit' %>
31 <%= f.check_box :is_downhit %><%= f.label :is_downhit, 'DOWN hit' %>
32 <%= f.check_box :is_signal %><%= f.label :is_signal, 'Signal' %>
33 <%= f.submit 'record this one' %>
41 <% if not @quoterecords.empty? %>
42 <h2>Previous Records</h2>
47 <th><%= paginate @quoterecords %></th>
48 <% @quoterecords.get_columns.each do |c| %>
49 <th><%= @quoterecords.translate_column(c) %></th>
54 <% @quoterecords.get_columns.each do |c| %>
55 <th><%= @quoterecords.get_pivot_point(c) %></th>
60 <% @quoterecords.each do |qr| %>
62 <td><%=link_to '+', qr %> <%=smr_humanize(qr.time_created)%> <em><%= qr.comment %></em></td>
63 <% @quoterecords.get_columns.each do |c| %>
64 <td><%= qr.Quote.quote if qr.is_column?(c) %></td>
72 <h2>Sensitivity Settings</h2>
73 <%= form_for @sensitivity, :url=>{controller: :quoterecord_threshold, action: :create}, :method=>:POST do |f| %>
74 <fieldset id='quoterecord_sensitivity'>
75 <legend>adjust when UP/DOWN or Pivot Point hits are triggered</legend>
76 <%= hidden_field_tag :id, @sensitivity.id %>
77 <%= f.hidden_field :id_stock %>
78 <%= f.number_field :quote_sensitivity, :step=>0.1, :min=>0.1, :placeholder=>'UP/DOWN hit sensitivity' %>
79 <%= f.number_field :hit_sensitivity, :step=>0.1, :min=>0.1, :placeholder=>'Pivot Point hit sensitivity' %>
80 <%= f.submit 'save' %>