Trait barter::portfolio::allocator::OrderAllocator
source · pub trait OrderAllocator {
// Required method
fn allocate_order(
&self,
order: &mut OrderEvent,
position: Option<&Position>,
signal_strength: SignalStrength
);
}
Expand description
Allocates an appropriate OrderEvent
quantity.
Required Methods§
sourcefn allocate_order(
&self,
order: &mut OrderEvent,
position: Option<&Position>,
signal_strength: SignalStrength
)
fn allocate_order( &self, order: &mut OrderEvent, position: Option<&Position>, signal_strength: SignalStrength )
Returns an OrderEvent
with a calculated order quantity based on the input order,
SignalStrength
and potential existing Position
.