Class: IB::ExecutionCondition
Constant Summary
OrderCondition::Subclasses
Class Method Summary
collapse
Instance Method Summary
collapse
#default_attributes, make_from, #serialize_contract_by_con_id, verify_contract_if_necessary
#==, #as_table, #content_attributes, #default_attributes, #invariant_attributes, #set_attribute_defaults, #table_header, #table_row, #to_human, #update_missing
Class Method Details
.fabricate(contract) ⇒ Object
129
130
131
|
# File 'lib/models/ib/condition.rb', line 129
def self.fabricate contract
self.new contract: verify_contract_if_necessary( contract )
end
|
.make(buffer) ⇒ Object
114
115
116
117
118
119
120
121
122
123
|
# File 'lib/models/ib/condition.rb', line 114
def self.make buffer
m =self.new conjunction_connection: buffer.read_string,
operator: buffer.read_int
the_contract = IB::Contract.new sec_type: buffer.read_string,
exchange: buffer.read_string,
symbol: buffer.read_string
m.contract = the_contract
m
end
|
Instance Method Details
#condition_type ⇒ Object
110
111
112
|
# File 'lib/models/ib/condition.rb', line 110
def condition_type
5
end
|
#serialize ⇒ Object
125
126
127
|
# File 'lib/models/ib/condition.rb', line 125
def serialize
super << contract[:sec_type] <<(contract.primary_exchange.presence || contract.exchange) << contract.symbol
end
|