Autospreader Rules

Autospreader Rules

Autospreader Rules reference

Leg attributes

Enter a leg identifier (ThisLeg / Leg / Leg#) followed by a "." in the Condition or Action text box to access the following leg attributes.

Attribute Name Description
BidQuantity
AskQuantity
Market data. The current bid or ask quantity of the given leg's market.
AvailableLeanQuantity Autospreader-calculated numeric value that represents the sum of market quantity all the way to the determined lean price.
BidQuantityAtIndex(#)
AskQuantityAtIndex(#)
Market data. Enter a numeric value to specify the level of depth of either side, where "1" indicates the inside market. For example, BidQuantityAtIndex(1) = the quantity of the inside market on the buy side, or BidQuantityAtIndex(2) = the quantity of the second level of depth on the buy side, etc.
BidPrice
AskPrice
The current bid or ask price of the given leg's market.
BidPriceAtIndex(#)
AskPriceAtIndex(#)
Enter a numeric value to define the level of depth of either side of the trade, where "1" indicates the inside market. For example, BidPrice(1) = the price of the inside market on the buy side, or AskPriceAtIndex(2) = the quantity of the second level of depth on the sell side, etc. The attribute ignores gaps at any level of depth. The value you enter is defined as the number of "ticks" away from the best bid/ask.
CurrentQuoteOrderWorkingPrice The working order price of the quote order on the given leg. Note that there can only be one quote order at a time for any given leg. As determined by Autospreader, this attribute can represent the price that is either queued by Autospreader, in-flight to the exchange, or acknowledged by the exchange.
CurrentQuoteOrderWorkingQuantity The working order quantity of the quote order on the given leg. Note that there can only be one quote order at a time for any given leg. As determined by Autospreader, this attribute can represent the quantity that is either queued by Autospreader, in-flight to the exchange, or acknowledged by the exchange.
CurrentQuoteOrderFillQuantity The fill quantity associated with the quote order on the given leg.
DirectBidQuantityAtIndex(#)
DirectAskQuantityAtIndex(#)
Enter a non-implied bid quantity at a level of market depth for either side of the trade, where "1" indicates the inside market. For example, DirectBidQuantityAtIndex(1) = the quantity of the inside market on the buy side, or DirectAskQuantityAtIndex(2) = the quantity of the second level of depth on the sell side, etc. The value you enter is defined as the number of "ticks" away from the best bid/ask.
DirectBidPrice
DirectAskPrice
Bid/Ask price at the specified level of depth, taking into account only the levels where there is at least one non-implied bid/ask (if depth is not specified, it's the highest bid/ask price where there is a non-implied bid/ask).
DirectBidPriceAtIndex(#)
DirectAskPriceAtIndex(#)
Enter a value to define the Direct Bid/Ask price, where "1" indicates the inside market. For example, DirectBidPriceAtIndex(1) = the price at the inside market on the buy side, or DirectAskPriceAtIndex(2) = the price at the second level of depth on the sell side, etc. The value you enter is defined as the number of "ticks" away from the best bid/ask.
DirectBidQuantity
DirectAskQuantity
Non-implied bid or ask quantity at the specified market depth (if market depth is not provided, it's the non-implied bid/ask quantity at the highest bid/ask price where there is at least one non-implied bid/ask).
High/Low High and low prices of the current trading or clearing session.
LeanPrice Current cached lean price for the given leg. Autospreader estimates a lean price before placing a quote order. For example, if the quantity is not available for the lean price, Autospreader will select the price at the last level of depth.
MinimumLeanQuantity Numeric value that determines how deep Autospreader should walk the depth of the given leg's market when calculating the price/quantity for quote orders pertaining to other legs. Note: this is the only user-controlled value for an Autospreader attribute. All others are generated by the Autospreader Server.
LastTradedPrice Last traded price of the specified instrument.
LastTradedQuantity Either accumulated or the last quantity traded at the last traded price.
MinimumPriceIncrement Minimum trade-able increment for the specified instrument.
PreviousSettlePrice Settled price from the previous trading session.
Ratio Numeric value that defines the number of contracts needed on a given leg to comprise a single full unit of the spread. Note that this value is defined in the associated synthetic instrument definition.
TotalDesiredQuantity Numeric value that depicts how many contracts are needed in total on the given leg to satisfy the total desired spread quantity.
TotalRemainingQuantity Numeric value of the total remaining quantity needed on a given leg to satisfy the total desired spread quantity. This field is calculated as follows: (TotalDesiredQuantity) - (TotalFilledQuantity).
TotalHedgesSent Numeric value that shows the sum of the order quantity for all hedge orders submitted. Post hedge rules changing the quantity on resting hedge orders will not affect/change the value of the TotalHedgesSent value.
TotalHedgesFilled Cumulative number of hedge order quantity filled.
PreviousQuoteOrderWorkingPrice The cached price that the quote order of the given leg was previously working.
PreviousQuoteOrderWorkingQuantity The cached quantity that the quote order of the given leg was previously working.
Side Buy/Sell value that determines whether the given leg should be bought or sold. Note that this value is defined in the associated synthetic instrument definition. The values returned by the Autospreader Server per leg based on your spread configuration: "1" indicates Sell, "2" indicates Buy.
SpreadDisclosedQuantity The disclosed quantity of the spread order when using Reload functionality.
Volume The total volume traded for the contract.

Spread-only

The leg attributes in the following table are not specific to a single leg, but pertain to the entire spread (you do not need to prepend the leg identifier keywords (ThisLeg / Leg / Leg ##) to access these attributes).

Attribute Name Description
DesiredSpreadPrice The price at which you entered the spread order using the Autospreader spread pane or Market Grid.
DesiredSpreadQuantity The quantity of the spread order entered using the Autospreader spread pane or Market Grid.
CompletelyFilledSpreadUnits The fill quantity of the spread order based on "matching" filled quote and hedge leg quantities that complete a single spread unit. A spread "unit" (as defined in the spread configuration) is not completely filled until the corresponding quote and hedge legs are completely filled.
NumberOfLegs The number of leg instruments in the synthetic spread.
NumberOfQuotingLegs The number of legs with Active Quoting enabled in the spread configuration.
User-Defined Variable Supported as launch-time-only variables, meaning that these variables may not change in value dynamically. Explain how to declare user-defined variables and set values for them. Refer to Custom Variable from more details about declaring and using a user-defined variable setting in your rules and Autospreader configuration.

Quoting and Pre-Hedge rules only

The attributes in the following tables appear only for quoting and pre-hedge rules and are specific to the leg to which the rule is being applied.

Note: You must prepend the leg identifier keyword ThisLeg to access these attributes.

For quoting rules:

Attribute Name Description
CalculatedQuoteOrderQuantity The quote order quantity calculated by Autospreader before evaluating the user-defined rule.
CalculatedQuoteOrderPrice The quote order price calculated by Autospreader before evaluating the user-defined rule.

For pre-hedge rules:

Attribute Name Description
TriggeringFillPrice For a pre-hedge rule to be evaluated, there must have been a quote order fill. This field specifies that quote order's fill price.td>
TriggeringFillQuantity For a pre-hedge rule to be evaluated, there must have been a quote order fill. This field specifies that quote order's fill quantity.
CalculatedHedgeOrderQuantity The hedge order quantity that calculated by Autospreader before evaluating the user-defined rule.
CalculatedHedgeOrderPrice The hedge order price calculated by Autospreader before evaluating the user-defined rule.
Delta Upon receiving a fill for a given leg, Autospreader calculates Delta as the number of contracts that the leg is off from being perfectly hedged when compared to another leg. The Delta of a given leg can be calculated only when compared to another single leg, and is continuously recalculated by the Autospreader as long as the spread legs are working in the market.

Post-Hedge rules only

The following properties appear only for post-hedge rules and are specific to the hedge order to which the post-hedge rule is being applied. Note that, unlike quoting orders, there can be multiple hedge orders resting in a single leg.

Note: You must prepend the leg identifier keyword ThisLeg to access these attributes.

Attribute Name Description
CurrentHedgeOrderWorkingPrice The price of the hedge order on the given leg that has been acknowledged by the exchange.
CurrentHedgeOrderWorkingQuantity The quantity of the hedge order on the given leg that has been acknowledged by the exchange; compare this field to InitialHedgeOrderQuantity, which is a static value set at submission time.
PreviousHedgeOrderWorkingPrice The cached price that the hedge order was working previously.
PreviousHedgeOrderWorkingQuantity The cached quantity that the hedge order was working previously.
InitialHedgeOrderQuantity The quantity at which the hedge order was originally submitted; compare this field to CurrentHedgeOrderWorkingQuantity, which is continuously updated as the hedge order is modified.
InitialHedgeOrderPrice The price at which the hedge order was originally submitted; compare this field to CurrentHedgeOrderWorkingPrice, which is continuously updated as the hedge order is modified.
TimeElapsedSinceHedgeAddOrChange (in ms) Numeric value that depicts how many milliseconds have elapsed since the previous acknowledgement of the hedge order modification.
TimeElapsedSinceHedgeOrderAdd (in ms) Numeric value that depicts how many milliseconds have elapsed since the submission of a hedge order.
NumberOfReQuotes Total number of messages sent for the hedge leg.

TT Autospreader rules

TT provides a set of Autospreader rules commonly used when trading spreads.

Rule Description
(TT) All or None [Pre-Quote] If the hedge market quantity drops below the required hedge quantity, the quoting order will be pulled from the market. The quote order will be resubmitted when sufficient hedge market quantity returns.
(TT) Basic Slop [Pre-Quote] Create a price range above and/or below the quote order entry price at which you are willing to be filled. Because Autospreader® will not reprice the quoted outright legs while your spread price remains within the Slop range, Slop can minimize the excessive quoting that occurs in the individual legs of a working spread order.

For the following variables, enter values or use the default values:
  • InsideSlopTicks: The number of ticks representing the worst price you will accept for the spread.
  • OutsideSlopTicks: The number of ticks representing the best price you will accept for the spread.
(TT) Cancel/New Quote [Pre-Quote] This rule is designed to send a cancel request followed by a new order instead of a Cancel/Replace message. This is required on any exchange that does not support amending a working order.
(TT) Hedge Price Limit [Pre-Hedge] If the calculated hedge order price is greater than the user-defined number of ticks through the opposite inside market, submit the hedge order at the user-defined limit. This rule is designed for spreads with unequal multipliers to ensure that hedge orders are not rejected by exchange price bands.

For the following variable, enter a value or use the default value:
  • TickLimit: The maximum number of ticks the hedge order can be submitted through the opposite inside market.
(TT) Hedge Round [Pre-Hedge] By default Autospreader® will send a hedge when it calculates that it needs at least one whole contract in the hedge leg. Hedge Round allows you to specify an unhedged delta above which you would like to send the hedge order. If you are unhedged by "HedgePercent" of a full contract, then go ahead and send a new hedge order.

For the following variable, enter a value or use the default value:
  • HedgePercent: The percentage of a full contract at which to send a new hedge order.
(TT) Inside Smart Quote [Pre-Quote] Suppress changing the quote order if: (1) Moving toward the inside market, and, (2) New order price is not sufficiently close to the inside market price.

For the following variable, enter a value or use the default value:
  • distFromInside: The number of ticks away from the inside market after which you want to prevent re-quoting toward the market.
(TT) Inside Smart Quote with LIMIT [Pre-Quote] Suppress changing the quote order if: (1) Moving toward the inside market, (2) New order price is not sufficiently close to the inside market price, and, (3) Current order price is not too far away from inside market price.

For the following variables, enter values or use the default values:
  • distFromInside: The number of ticks away from the inside market after which you want to prevent re-quoting toward the market.
  • limit: The number of ticks away from the inside market after which you want to resume re-quoting toward the market.
(TT) Liquidity Based Backoff Tick [Pre-Hedge] If the market quantity at the calculated hedge price is greater than or equal to "QtyThreshold", then back off one tick from the calculated hedge price. Commonly used in conjunction with the [Post-Hedge] Rule "(TT) Liquidity Based Payup Tick".

For the following variable, enter a value or use the default value:
  • QtyThreshold: The quantity at which this rule would allow a backoff tick to be taken when submitting a new hedge order.
(TT) Liquidity Based Payup Tick [Post-Hedge] If the volume on the opposite side of the market at the price level one tick from your working hedge price dips below "QtyThreshold", then pay up one tick from the current hedge order price. Commonly used in conjunction with the Pre-Hedge Rule "(TT) Liquidity Base Backoff Tick". The "NumberOfPayups" is how many times to execute the payup logic, and will be executed from the initial hedge price.

For the following variables, enter values or use the default values:
  • QtyThreshold: The minimum quantity at which this rule would allow a pay-up tick to be used.
  • NumberOfPayups: How many times to execute the payup logic.
(TT) Max Order Move [Pre-Quote] This rule sets a restriction on how far a quoting order can move in one action. If triggered, it will pull the working order until the next order action comes back into range, where the valid range is specified by 'MaxOrderMoveThreshold'.

For the following variable, enter a value or use the default value:
  • MaxOrderMoveThreshold: The maximum number of price levels a quoting order can move in one action.
(TT) Prevent Overfill with Reload [Pre-Quote] When using Autospreader Reload, this rule will quote all legs of the spread with Active Quoting enabled until there is the possibility of being overfilled. At that point, the rule will suppress quoting on all but the first leg until the order is fully filled.
(TT) Quote Throttle [Pre-Quote] Suppress changing the quote order price and/or quantity if the order was already changed within the specified throttle in milliseconds. The rule allows users to specify a separate value for 'InsideThrottle' (change quote order price toward market or increasing quantity) and 'OutsideThrottle' (change quote order price away from market or decreasing quantity).
(TT) Quote Best Bid/Ask [Pre-Quote] Cancels a quote order if the price is outside the user-defined number of ticks from the inside Bid/Ask. The default value is to only quote at the inside Bid/Ask price.
(TT) Send Hedge as Market Order [Pre-Hedge] When enabled for a leg of a spread, this rule sends all hedge orders as market orders, which can help prevent getting legged.
(TT) Ticks Away Based Go To Market [Post-Hedge] If the hedge order exceeds the user-defined ticks away from the opposite inside market, this rule changes the hedge order to cross the market.

For the following variables, enter values or use the default values:
  • TicksAway: Number of ticks away from the opposite inside market.
  • MarketTicks: Number of ticks to price the hedge order through the opposite inside market.

Note: Negative tick values set the hedge price to the number of ticks away from opposite market; 0 sets the hedge price equal to opposite market; positive values set the hedge price to the number of ticks into opposite market.
(TT) Time Based Go To Market [Post-Hedge] If the hedge order is legged for more than the user-defined number of milliseconds, this rule changes the hedge order to cross the market. A market update must occur for the rule to be evaluated.

For the following variables, enter values or use the default values:
  • TimeInMS: Number of milliseconds the legged hedge order is allowed to work.
  • MarketTicks: Number of ticks to price the hedge order through the opposite inside market.
(TT) Minimum Increment Quote [Pre-Quote] Ensures that Autospreader rounds down the quote order quantity to the nearest multiple of the user-defined minIncrement value. This rule is needed on contracts that have a round lot value to ensure Autospreader submits a valid quantity.

For the following variable, enter a value or use the default value:
  • minIncrement: The minimum allowed order quantity.
(TT) Minimum Increment Hedge [Pre-Hedge] Ensures that Autospreader rounds down the hedge order quantity to the nearest multiple of the user-defined minIncrement value. This rule is needed on contracts that have a round lot value to ensure Autospreader submits a valid quantity.

For the following variable, enter a value or use the default value:
  • minIncrement: The minimum allowed order quantity.
(TT) Prevent Quote Cross

[Pre-Quote] Prevents a quote order from intentionally crossing the market. However, the market could move while the order is in-flight to the exchange resulting in the order being immediately filled.

When the quote order is a Buy and the calculated quote price would cross the Ask price, this rule adjusts the quote price to one tick from the Ask price.

When the quote order is a Sell and the calculated quote price would cross the Bid price, this rule adjusts the quote price to one tick from the Bid price.

(TT) Prevent Hedge Cross

[Pre-Hedge] Prevents a hedge order from intentionally crossing the market. However, the market could move while the order is in-flight to the exchange resulting in the order being immediately filled.

When the hedge order is a Buy and the calculated hedge price would cross the Ask Price, the rule adjusts the hedge price to one tick from the Ask price.

When the hedge order is a Sell and the calculated hedge price would cross the Bid price, the rule adjusts the hedge price to one tick from the Bid price.