ib-ruby 0.8.4 → 0.8.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. data/.gitignore +3 -0
  2. data/HISTORY +3 -0
  3. data/README.md +29 -9
  4. data/VERSION +1 -1
  5. data/app/assets/javascripts/ib/bars.js +2 -0
  6. data/app/assets/javascripts/ib/executions.js +2 -0
  7. data/app/assets/javascripts/ib/order_states.js +2 -0
  8. data/app/assets/stylesheets/ib/bars.css +4 -0
  9. data/app/assets/stylesheets/ib/executions.css +4 -0
  10. data/app/assets/stylesheets/ib/order_states.css +4 -0
  11. data/app/controllers/ib/bars_controller.rb +87 -0
  12. data/app/controllers/ib/combo_legs_controller.rb +87 -0
  13. data/app/controllers/ib/contract_details_controller.rb +87 -0
  14. data/app/controllers/ib/contracts_controller.rb +87 -0
  15. data/app/controllers/ib/executions_controller.rb +87 -0
  16. data/app/controllers/ib/order_states_controller.rb +87 -0
  17. data/app/controllers/ib/orders_controller.rb +87 -0
  18. data/app/helpers/ib/bars_helper.rb +4 -0
  19. data/app/helpers/ib/combo_legs_helper.rb +4 -0
  20. data/app/helpers/ib/contract_details_helper.rb +4 -0
  21. data/app/helpers/ib/contracts_helper.rb +4 -0
  22. data/app/helpers/ib/executions_helper.rb +4 -0
  23. data/app/helpers/ib/order_states_helper.rb +4 -0
  24. data/app/helpers/ib/orders_helper.rb +4 -0
  25. data/app/views/ib/bars/_form.html.erb +57 -0
  26. data/app/views/ib/bars/edit.html.erb +6 -0
  27. data/app/views/ib/bars/index.html.erb +41 -0
  28. data/app/views/ib/bars/new.html.erb +5 -0
  29. data/app/views/ib/bars/show.html.erb +55 -0
  30. data/app/views/ib/combo_legs/_form.html.erb +53 -0
  31. data/app/views/ib/combo_legs/edit.html.erb +6 -0
  32. data/app/views/ib/combo_legs/index.html.erb +39 -0
  33. data/app/views/ib/combo_legs/new.html.erb +5 -0
  34. data/app/views/ib/combo_legs/show.html.erb +55 -0
  35. data/app/views/ib/contract_details/_form.html.erb +141 -0
  36. data/app/views/ib/contract_details/edit.html.erb +6 -0
  37. data/app/views/ib/contract_details/index.html.erb +83 -0
  38. data/app/views/ib/contract_details/new.html.erb +5 -0
  39. data/app/views/ib/contract_details/show.html.erb +160 -0
  40. data/app/views/ib/contracts/_form.html.erb +77 -0
  41. data/app/views/ib/contracts/edit.html.erb +6 -0
  42. data/app/views/ib/contracts/index.html.erb +53 -0
  43. data/app/views/ib/contracts/new.html.erb +5 -0
  44. data/app/views/ib/contracts/show.html.erb +85 -0
  45. data/app/views/ib/executions/_form.html.erb +77 -0
  46. data/app/views/ib/executions/edit.html.erb +6 -0
  47. data/app/views/ib/executions/index.html.erb +51 -0
  48. data/app/views/ib/executions/new.html.erb +5 -0
  49. data/app/views/ib/executions/show.html.erb +80 -0
  50. data/app/views/ib/order_states/_form.html.erb +93 -0
  51. data/app/views/ib/order_states/edit.html.erb +6 -0
  52. data/app/views/ib/order_states/index.html.erb +59 -0
  53. data/app/views/ib/order_states/new.html.erb +5 -0
  54. data/app/views/ib/order_states/show.html.erb +100 -0
  55. data/app/views/ib/orders/_form.html.erb +353 -0
  56. data/app/views/ib/orders/edit.html.erb +6 -0
  57. data/app/views/ib/orders/index.html.erb +193 -0
  58. data/app/views/ib/orders/new.html.erb +5 -0
  59. data/app/views/ib/orders/show.html.erb +435 -0
  60. data/bin/scaffold.rb +29 -0
  61. data/config/routes.rb +8 -1
  62. data/db/config.yml +5 -0
  63. data/db/migrate/101_add_ib_executions.rb +3 -0
  64. data/db/migrate/111_add_ib_bars.rb +6 -0
  65. data/db/migrate/121_add_ib_order_states.rb +8 -0
  66. data/db/migrate/131_add_ib_orders.rb +24 -0
  67. data/db/migrate/141_add_ib_combo_legs.rb +6 -0
  68. data/db/migrate/151_add_ib_underlyings.rb +3 -0
  69. data/db/migrate/161_add_ib_contract_details.rb +11 -0
  70. data/db/migrate/171_add_ib_contracts.rb +8 -1
  71. data/db/schema.rb +6 -5
  72. data/lib/ib/base.rb +3 -1
  73. data/lib/ib/base_properties.rb +26 -15
  74. data/lib/ib/connection.rb +3 -2
  75. data/lib/ib/errors.rb +16 -9
  76. data/lib/ib/extensions.rb +6 -4
  77. data/lib/ib/symbols.rb +10 -3
  78. data/lib/ib/symbols/forex.rb +49 -64
  79. data/lib/ib/symbols/futures.rb +2 -3
  80. data/lib/ib/symbols/options.rb +2 -1
  81. data/lib/ib/symbols/stocks.rb +2 -1
  82. data/lib/models/ib/bar.rb +6 -2
  83. data/lib/models/ib/combo_leg.rb +4 -3
  84. data/lib/models/ib/contract.rb +9 -5
  85. data/lib/models/ib/contract_detail.rb +1 -1
  86. data/lib/models/ib/execution.rb +3 -1
  87. data/lib/models/ib/order.rb +22 -20
  88. data/lib/models/ib/order_state.rb +4 -2
  89. data/lib/models/ib/underlying.rb +3 -4
  90. data/spec/README.md +12 -10
  91. data/spec/ib/symbols/symbols_spec.rb +10 -0
  92. data/spec/integration_helper.rb +1 -1
  93. data/spec/model_helper.rb +9 -8
  94. data/spec/models/ib/combo_leg_spec.rb +29 -28
  95. data/spec/models/ib/contract_detail_spec.rb +4 -1
  96. data/spec/models/ib/contract_spec.rb +66 -58
  97. data/spec/models/ib/execution_spec.rb +50 -44
  98. data/spec/models/ib/order_spec.rb +2 -2
  99. data/spec/order_helper.rb +5 -4
  100. data/spec/spec_helper.rb +3 -3
  101. metadata +59 -35
  102. data/app/models/ib/underlying.rb +0 -5
  103. data/bin/account_info +0 -29
  104. data/bin/cancel_orders +0 -27
  105. data/bin/contract_details +0 -35
  106. data/bin/depth_of_market +0 -43
  107. data/bin/fa_accounts +0 -22
  108. data/bin/fundamental_data +0 -39
  109. data/bin/historic_data +0 -51
  110. data/bin/historic_data_cli +0 -182
  111. data/bin/list_orders +0 -28
  112. data/bin/market_data +0 -41
  113. data/bin/option_data +0 -44
  114. data/bin/place_combo_order +0 -58
  115. data/bin/place_order +0 -27
  116. data/bin/template +0 -18
  117. data/bin/tick_data +0 -26
  118. data/bin/time_and_sales +0 -53
@@ -0,0 +1,93 @@
1
+ <%= form_for(@order_state) do |f| %>
2
+ <% if @order_state.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@order_state.errors.count, "error") %> prohibited this order_state from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @order_state.errors.full_messages.each do |msg| %>
8
+ <li><%= msg %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= f.label :order_id %><br />
16
+ <%= f.number_field :order_id %>
17
+ </div>
18
+ <div class="field">
19
+ <%= f.label :local_id %><br />
20
+ <%= f.number_field :local_id %>
21
+ </div>
22
+ <div class="field">
23
+ <%= f.label :client_id %><br />
24
+ <%= f.number_field :client_id %>
25
+ </div>
26
+ <div class="field">
27
+ <%= f.label :perm_id %><br />
28
+ <%= f.number_field :perm_id %>
29
+ </div>
30
+ <div class="field">
31
+ <%= f.label :parent_id %><br />
32
+ <%= f.number_field :parent_id %>
33
+ </div>
34
+ <div class="field">
35
+ <%= f.label :status %><br />
36
+ <%= f.text_field :status %>
37
+ </div>
38
+ <div class="field">
39
+ <%= f.label :filled %><br />
40
+ <%= f.number_field :filled %>
41
+ </div>
42
+ <div class="field">
43
+ <%= f.label :remaining %><br />
44
+ <%= f.number_field :remaining %>
45
+ </div>
46
+ <div class="field">
47
+ <%= f.label :price %><br />
48
+ <%= f.text_field :price %>
49
+ </div>
50
+ <div class="field">
51
+ <%= f.label :average_price %><br />
52
+ <%= f.text_field :average_price %>
53
+ </div>
54
+ <div class="field">
55
+ <%= f.label :why_held %><br />
56
+ <%= f.text_field :why_held %>
57
+ </div>
58
+ <div class="field">
59
+ <%= f.label :warning_text %><br />
60
+ <%= f.text_field :warning_text %>
61
+ </div>
62
+ <div class="field">
63
+ <%= f.label :commission_currency %><br />
64
+ <%= f.text_field :commission_currency %>
65
+ </div>
66
+ <div class="field">
67
+ <%= f.label :commission %><br />
68
+ <%= f.text_field :commission %>
69
+ </div>
70
+ <div class="field">
71
+ <%= f.label :min_commission %><br />
72
+ <%= f.text_field :min_commission %>
73
+ </div>
74
+ <div class="field">
75
+ <%= f.label :max_commission %><br />
76
+ <%= f.text_field :max_commission %>
77
+ </div>
78
+ <div class="field">
79
+ <%= f.label :init_margin %><br />
80
+ <%= f.text_field :init_margin %>
81
+ </div>
82
+ <div class="field">
83
+ <%= f.label :maint_margin %><br />
84
+ <%= f.text_field :maint_margin %>
85
+ </div>
86
+ <div class="field">
87
+ <%= f.label :equity_with_loan %><br />
88
+ <%= f.text_field :equity_with_loan %>
89
+ </div>
90
+ <div class="actions">
91
+ <%= f.submit %>
92
+ </div>
93
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing Order State</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @order_state %> |
6
+ <%= link_to 'Back', order_states_path %>
@@ -0,0 +1,59 @@
1
+ <h1>Listing Order States</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <th>Order</th>
6
+ <th>Local</th>
7
+ <th>Client</th>
8
+ <th>Perm</th>
9
+ <th>Parent</th>
10
+ <th>Status</th>
11
+ <th>Filled</th>
12
+ <th>Remaining</th>
13
+ <th>Price</th>
14
+ <th>Average price</th>
15
+ <th>Why held</th>
16
+ <th>Warning text</th>
17
+ <th>Commission currency</th>
18
+ <th>Commission</th>
19
+ <th>Min commission</th>
20
+ <th>Max commission</th>
21
+ <th>Init margin</th>
22
+ <th>Maint margin</th>
23
+ <th>Equity with loan</th>
24
+ <th></th>
25
+ <th></th>
26
+ <th></th>
27
+ </tr>
28
+
29
+ <% @order_states.each do |order_state| %>
30
+ <tr>
31
+ <td><%= order_state.order_id %></td>
32
+ <td><%= order_state.local_id %></td>
33
+ <td><%= order_state.client_id %></td>
34
+ <td><%= order_state.perm_id %></td>
35
+ <td><%= order_state.parent_id %></td>
36
+ <td><%= order_state.status %></td>
37
+ <td><%= order_state.filled %></td>
38
+ <td><%= order_state.remaining %></td>
39
+ <td><%= order_state.price %></td>
40
+ <td><%= order_state.average_price %></td>
41
+ <td><%= order_state.why_held %></td>
42
+ <td><%= order_state.warning_text %></td>
43
+ <td><%= order_state.commission_currency %></td>
44
+ <td><%= order_state.commission %></td>
45
+ <td><%= order_state.min_commission %></td>
46
+ <td><%= order_state.max_commission %></td>
47
+ <td><%= order_state.init_margin %></td>
48
+ <td><%= order_state.maint_margin %></td>
49
+ <td><%= order_state.equity_with_loan %></td>
50
+ <td><%= link_to 'Show', order_state %></td>
51
+ <td><%= link_to 'Edit', edit_order_state_path(order_state) %></td>
52
+ <td><%= link_to 'Destroy', order_state, :method => :delete, :data => { :confirm => 'Are you sure?' } %></td>
53
+ </tr>
54
+ <% end %>
55
+ </table>
56
+
57
+ <br />
58
+
59
+ <%= link_to 'New Order State', new_order_state_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New Order State</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', order_states_path %>
@@ -0,0 +1,100 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <b>Order:</b>
5
+ <%= @order_state.order_id %>
6
+ </p>
7
+
8
+ <p>
9
+ <b>Local:</b>
10
+ <%= @order_state.local_id %>
11
+ </p>
12
+
13
+ <p>
14
+ <b>Client:</b>
15
+ <%= @order_state.client_id %>
16
+ </p>
17
+
18
+ <p>
19
+ <b>Perm:</b>
20
+ <%= @order_state.perm_id %>
21
+ </p>
22
+
23
+ <p>
24
+ <b>Parent:</b>
25
+ <%= @order_state.parent_id %>
26
+ </p>
27
+
28
+ <p>
29
+ <b>Status:</b>
30
+ <%= @order_state.status %>
31
+ </p>
32
+
33
+ <p>
34
+ <b>Filled:</b>
35
+ <%= @order_state.filled %>
36
+ </p>
37
+
38
+ <p>
39
+ <b>Remaining:</b>
40
+ <%= @order_state.remaining %>
41
+ </p>
42
+
43
+ <p>
44
+ <b>Price:</b>
45
+ <%= @order_state.price %>
46
+ </p>
47
+
48
+ <p>
49
+ <b>Average price:</b>
50
+ <%= @order_state.average_price %>
51
+ </p>
52
+
53
+ <p>
54
+ <b>Why held:</b>
55
+ <%= @order_state.why_held %>
56
+ </p>
57
+
58
+ <p>
59
+ <b>Warning text:</b>
60
+ <%= @order_state.warning_text %>
61
+ </p>
62
+
63
+ <p>
64
+ <b>Commission currency:</b>
65
+ <%= @order_state.commission_currency %>
66
+ </p>
67
+
68
+ <p>
69
+ <b>Commission:</b>
70
+ <%= @order_state.commission %>
71
+ </p>
72
+
73
+ <p>
74
+ <b>Min commission:</b>
75
+ <%= @order_state.min_commission %>
76
+ </p>
77
+
78
+ <p>
79
+ <b>Max commission:</b>
80
+ <%= @order_state.max_commission %>
81
+ </p>
82
+
83
+ <p>
84
+ <b>Init margin:</b>
85
+ <%= @order_state.init_margin %>
86
+ </p>
87
+
88
+ <p>
89
+ <b>Maint margin:</b>
90
+ <%= @order_state.maint_margin %>
91
+ </p>
92
+
93
+ <p>
94
+ <b>Equity with loan:</b>
95
+ <%= @order_state.equity_with_loan %>
96
+ </p>
97
+
98
+
99
+ <%= link_to 'Edit', edit_order_state_path(@order_state) %> |
100
+ <%= link_to 'Back', order_states_path %>
@@ -0,0 +1,353 @@
1
+ <%= form_for(@order) do |f| %>
2
+ <% if @order.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@order.errors.count, "error") %> prohibited this order from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @order.errors.full_messages.each do |msg| %>
8
+ <li><%= msg %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= f.label :contract_id %><br />
16
+ <%= f.number_field :contract_id %>
17
+ </div>
18
+ <div class="field">
19
+ <%= f.label :local_id %><br />
20
+ <%= f.number_field :local_id %>
21
+ </div>
22
+ <div class="field">
23
+ <%= f.label :client_id %><br />
24
+ <%= f.number_field :client_id %>
25
+ </div>
26
+ <div class="field">
27
+ <%= f.label :perm_id %><br />
28
+ <%= f.number_field :perm_id %>
29
+ </div>
30
+ <div class="field">
31
+ <%= f.label :parent_id %><br />
32
+ <%= f.number_field :parent_id %>
33
+ </div>
34
+ <div class="field">
35
+ <%= f.label :order_ref %><br />
36
+ <%= f.text_field :order_ref %>
37
+ </div>
38
+ <div class="field">
39
+ <%= f.label :order_type %><br />
40
+ <%= f.text_field :order_type %>
41
+ </div>
42
+ <div class="field">
43
+ <%= f.label :tif %><br />
44
+ <%= f.text_field :tif %>
45
+ </div>
46
+ <div class="field">
47
+ <%= f.label :side %><br />
48
+ <%= f.text_field :side %>
49
+ </div>
50
+ <div class="field">
51
+ <%= f.label :quantity %><br />
52
+ <%= f.number_field :quantity %>
53
+ </div>
54
+ <div class="field">
55
+ <%= f.label :limit_price %><br />
56
+ <%= f.text_field :limit_price %>
57
+ </div>
58
+ <div class="field">
59
+ <%= f.label :aux_price %><br />
60
+ <%= f.text_field :aux_price %>
61
+ </div>
62
+ <div class="field">
63
+ <%= f.label :open_close %><br />
64
+ <%= f.number_field :open_close %>
65
+ </div>
66
+ <div class="field">
67
+ <%= f.label :oca_type %><br />
68
+ <%= f.number_field :oca_type %>
69
+ </div>
70
+ <div class="field">
71
+ <%= f.label :oca_group %><br />
72
+ <%= f.text_field :oca_group %>
73
+ </div>
74
+ <div class="field">
75
+ <%= f.label :transmit %><br />
76
+ <%= f.check_box :transmit %>
77
+ </div>
78
+ <div class="field">
79
+ <%= f.label :what_if %><br />
80
+ <%= f.check_box :what_if %>
81
+ </div>
82
+ <div class="field">
83
+ <%= f.label :outside_rth %><br />
84
+ <%= f.check_box :outside_rth %>
85
+ </div>
86
+ <div class="field">
87
+ <%= f.label :not_held %><br />
88
+ <%= f.check_box :not_held %>
89
+ </div>
90
+ <div class="field">
91
+ <%= f.label :hidden %><br />
92
+ <%= f.check_box :hidden %>
93
+ </div>
94
+ <div class="field">
95
+ <%= f.label :block_order %><br />
96
+ <%= f.check_box :block_order %>
97
+ </div>
98
+ <div class="field">
99
+ <%= f.label :sweep_to_fill %><br />
100
+ <%= f.check_box :sweep_to_fill %>
101
+ </div>
102
+ <div class="field">
103
+ <%= f.label :all_or_none %><br />
104
+ <%= f.check_box :all_or_none %>
105
+ </div>
106
+ <div class="field">
107
+ <%= f.label :etrade_only %><br />
108
+ <%= f.check_box :etrade_only %>
109
+ </div>
110
+ <div class="field">
111
+ <%= f.label :firm_quote_only %><br />
112
+ <%= f.check_box :firm_quote_only %>
113
+ </div>
114
+ <div class="field">
115
+ <%= f.label :opt_out_smart_routing %><br />
116
+ <%= f.check_box :opt_out_smart_routing %>
117
+ </div>
118
+ <div class="field">
119
+ <%= f.label :override_percentage_constraints %><br />
120
+ <%= f.check_box :override_percentage_constraints %>
121
+ </div>
122
+ <div class="field">
123
+ <%= f.label :min_quantity %><br />
124
+ <%= f.number_field :min_quantity %>
125
+ </div>
126
+ <div class="field">
127
+ <%= f.label :display_size %><br />
128
+ <%= f.number_field :display_size %>
129
+ </div>
130
+ <div class="field">
131
+ <%= f.label :trigger_method %><br />
132
+ <%= f.number_field :trigger_method %>
133
+ </div>
134
+ <div class="field">
135
+ <%= f.label :origin %><br />
136
+ <%= f.number_field :origin %>
137
+ </div>
138
+ <div class="field">
139
+ <%= f.label :good_after_time %><br />
140
+ <%= f.text_field :good_after_time %>
141
+ </div>
142
+ <div class="field">
143
+ <%= f.label :good_till_date %><br />
144
+ <%= f.text_field :good_till_date %>
145
+ </div>
146
+ <div class="field">
147
+ <%= f.label :rule_80a %><br />
148
+ <%= f.text_field :rule_80a %>
149
+ </div>
150
+ <div class="field">
151
+ <%= f.label :percent_offset %><br />
152
+ <%= f.text_field :percent_offset %>
153
+ </div>
154
+ <div class="field">
155
+ <%= f.label :trail_stop_price %><br />
156
+ <%= f.text_field :trail_stop_price %>
157
+ </div>
158
+ <div class="field">
159
+ <%= f.label :trailing_percent %><br />
160
+ <%= f.text_field :trailing_percent %>
161
+ </div>
162
+ <div class="field">
163
+ <%= f.label :fa_group %><br />
164
+ <%= f.text_field :fa_group %>
165
+ </div>
166
+ <div class="field">
167
+ <%= f.label :fa_profile %><br />
168
+ <%= f.text_field :fa_profile %>
169
+ </div>
170
+ <div class="field">
171
+ <%= f.label :fa_method %><br />
172
+ <%= f.text_field :fa_method %>
173
+ </div>
174
+ <div class="field">
175
+ <%= f.label :fa_percentage %><br />
176
+ <%= f.text_field :fa_percentage %>
177
+ </div>
178
+ <div class="field">
179
+ <%= f.label :short_sale_slot %><br />
180
+ <%= f.number_field :short_sale_slot %>
181
+ </div>
182
+ <div class="field">
183
+ <%= f.label :designated_location %><br />
184
+ <%= f.text_field :designated_location %>
185
+ </div>
186
+ <div class="field">
187
+ <%= f.label :exempt_code %><br />
188
+ <%= f.number_field :exempt_code %>
189
+ </div>
190
+ <div class="field">
191
+ <%= f.label :account %><br />
192
+ <%= f.text_field :account %>
193
+ </div>
194
+ <div class="field">
195
+ <%= f.label :settling_firm %><br />
196
+ <%= f.text_field :settling_firm %>
197
+ </div>
198
+ <div class="field">
199
+ <%= f.label :clearing_account %><br />
200
+ <%= f.text_field :clearing_account %>
201
+ </div>
202
+ <div class="field">
203
+ <%= f.label :clearing_intent %><br />
204
+ <%= f.text_field :clearing_intent %>
205
+ </div>
206
+ <div class="field">
207
+ <%= f.label :discretionary_amount %><br />
208
+ <%= f.text_field :discretionary_amount %>
209
+ </div>
210
+ <div class="field">
211
+ <%= f.label :nbbo_price_cap %><br />
212
+ <%= f.text_field :nbbo_price_cap %>
213
+ </div>
214
+ <div class="field">
215
+ <%= f.label :auction_strategy %><br />
216
+ <%= f.number_field :auction_strategy %>
217
+ </div>
218
+ <div class="field">
219
+ <%= f.label :starting_price %><br />
220
+ <%= f.text_field :starting_price %>
221
+ </div>
222
+ <div class="field">
223
+ <%= f.label :stock_ref_price %><br />
224
+ <%= f.text_field :stock_ref_price %>
225
+ </div>
226
+ <div class="field">
227
+ <%= f.label :delta %><br />
228
+ <%= f.text_field :delta %>
229
+ </div>
230
+ <div class="field">
231
+ <%= f.label :stock_range_lower %><br />
232
+ <%= f.text_field :stock_range_lower %>
233
+ </div>
234
+ <div class="field">
235
+ <%= f.label :stock_range_upper %><br />
236
+ <%= f.text_field :stock_range_upper %>
237
+ </div>
238
+ <div class="field">
239
+ <%= f.label :volatility %><br />
240
+ <%= f.text_field :volatility %>
241
+ </div>
242
+ <div class="field">
243
+ <%= f.label :volatility_type %><br />
244
+ <%= f.number_field :volatility_type %>
245
+ </div>
246
+ <div class="field">
247
+ <%= f.label :reference_price_type %><br />
248
+ <%= f.number_field :reference_price_type %>
249
+ </div>
250
+ <div class="field">
251
+ <%= f.label :continuous_update %><br />
252
+ <%= f.number_field :continuous_update %>
253
+ </div>
254
+ <div class="field">
255
+ <%= f.label :delta_neutral_order_type %><br />
256
+ <%= f.text_field :delta_neutral_order_type %>
257
+ </div>
258
+ <div class="field">
259
+ <%= f.label :delta_neutral_aux_price %><br />
260
+ <%= f.text_field :delta_neutral_aux_price %>
261
+ </div>
262
+ <div class="field">
263
+ <%= f.label :delta_neutral_con_id %><br />
264
+ <%= f.number_field :delta_neutral_con_id %>
265
+ </div>
266
+ <div class="field">
267
+ <%= f.label :delta_neutral_settling_firm %><br />
268
+ <%= f.text_field :delta_neutral_settling_firm %>
269
+ </div>
270
+ <div class="field">
271
+ <%= f.label :delta_neutral_clearing_account %><br />
272
+ <%= f.text_field :delta_neutral_clearing_account %>
273
+ </div>
274
+ <div class="field">
275
+ <%= f.label :delta_neutral_clearing_intent %><br />
276
+ <%= f.text_field :delta_neutral_clearing_intent %>
277
+ </div>
278
+ <div class="field">
279
+ <%= f.label :hedge_type %><br />
280
+ <%= f.text_field :hedge_type %>
281
+ </div>
282
+ <div class="field">
283
+ <%= f.label :hedge_param %><br />
284
+ <%= f.text_field :hedge_param %>
285
+ </div>
286
+ <div class="field">
287
+ <%= f.label :basis_points %><br />
288
+ <%= f.text_field :basis_points %>
289
+ </div>
290
+ <div class="field">
291
+ <%= f.label :basis_points_type %><br />
292
+ <%= f.text_field :basis_points_type %>
293
+ </div>
294
+ <div class="field">
295
+ <%= f.label :algo_strategy %><br />
296
+ <%= f.text_field :algo_strategy %>
297
+ </div>
298
+ <div class="field">
299
+ <%= f.label :leg_prices %><br />
300
+ <%= f.text_area :leg_prices %>
301
+ </div>
302
+ <div class="field">
303
+ <%= f.label :scale_init_level_size %><br />
304
+ <%= f.number_field :scale_init_level_size %>
305
+ </div>
306
+ <div class="field">
307
+ <%= f.label :scale_subs_level_size %><br />
308
+ <%= f.number_field :scale_subs_level_size %>
309
+ </div>
310
+ <div class="field">
311
+ <%= f.label :scale_price_increment %><br />
312
+ <%= f.text_field :scale_price_increment %>
313
+ </div>
314
+ <div class="field">
315
+ <%= f.label :scale_price_adjust_value %><br />
316
+ <%= f.text_field :scale_price_adjust_value %>
317
+ </div>
318
+ <div class="field">
319
+ <%= f.label :scale_price_adjust_interval %><br />
320
+ <%= f.number_field :scale_price_adjust_interval %>
321
+ </div>
322
+ <div class="field">
323
+ <%= f.label :scale_profit_offset %><br />
324
+ <%= f.text_field :scale_profit_offset %>
325
+ </div>
326
+ <div class="field">
327
+ <%= f.label :scale_init_position %><br />
328
+ <%= f.number_field :scale_init_position %>
329
+ </div>
330
+ <div class="field">
331
+ <%= f.label :scale_init_fill_qty %><br />
332
+ <%= f.number_field :scale_init_fill_qty %>
333
+ </div>
334
+ <div class="field">
335
+ <%= f.label :scale_auto_reset %><br />
336
+ <%= f.check_box :scale_auto_reset %>
337
+ </div>
338
+ <div class="field">
339
+ <%= f.label :scale_random_percent %><br />
340
+ <%= f.check_box :scale_random_percent %>
341
+ </div>
342
+ <div class="field">
343
+ <%= f.label :placed_at %><br />
344
+ <%= f.datetime_select :placed_at %>
345
+ </div>
346
+ <div class="field">
347
+ <%= f.label :modified_at %><br />
348
+ <%= f.datetime_select :modified_at %>
349
+ </div>
350
+ <div class="actions">
351
+ <%= f.submit %>
352
+ </div>
353
+ <% end %>