Class ImmediateFill
java.lang.Object
com.wualabs.qtsurfer.engine.strategy.backtest.simulation.ImmediateFill
- All Implemented Interfaces:
FillPolicy
The DEFAULT
FillPolicy: every signal fills on the same tick it was raised on
— reproducing today's inline fill timing byte-for-byte. The
pending queue that would call resolvePending(MarketHintSignal, Ticker) for non-immediate policies is wired in
P3, so this policy never has resolvePending(MarketHintSignal, Ticker) invoked in practice.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisImmediate(MarketHintSignal signal) Returns whether the given signal fills immediately (same tick), or must be queued and resolved against a later tick.resolvePending(MarketHintSignal signal, Ticker ticker) Resolves the price at which a queued (non-immediate) signal fills against the given ticker, ornullif it does not resolve yet.
-
Constructor Details
-
ImmediateFill
public ImmediateFill()
-
-
Method Details
-
isImmediate
Description copied from interface:FillPolicyReturns whether the given signal fills immediately (same tick), or must be queued and resolved against a later tick.- Specified by:
isImmediatein interfaceFillPolicy- Parameters:
signal- the market hint signal (buy/sell) about to be routed to an executor- Returns:
- true if the signal should fill on the current tick
-
resolvePending
Description copied from interface:FillPolicyResolves the price at which a queued (non-immediate) signal fills against the given ticker, ornullif it does not resolve yet. Only consulted for signals whereFillPolicy.isImmediate(MarketHintSignal)returned false; the pending queue that calls this is wired in P3.- Specified by:
resolvePendingin interfaceFillPolicy- Parameters:
signal- the pending market hint signalticker- the current tick being evaluated against the pending signal- Returns:
- the resolved execution price, or
nullif still pending
-