Automated-trading engineering FAQ

Questions that begin where the trading signal ends.

A strategy can decide what position it wants. Live automation must still manage orders, fills, timing, connectivity, actual positions, and the unexpected. These answers explain how David Cohn approached those problems in Xtreme Auto Trader.

01

How can protective orders remain active if the computer or internet connection fails?

A strategy running on a trader’s computer normally depends on that computer, its internet connection, and the trading platform remaining operational. If the computer shuts down before a locally generated protective order is transmitted, the position may be left without the intended protection.

Xtreme Auto Trader addresses this by placing a protective One-Cancels-Other order on the TradeStation order server. The bracket contains both a profit-target limit order and a stop-loss order. Once the orders have been transmitted and accepted, they can remain active if the local computer, internet connection, or strategy subsequently goes down. If either exit fills, the other is automatically cancelled to help prevent an unintended re-entry.

No order arrangement eliminates every risk. The orders must first reach and be accepted by the server, and brokerage, exchange, routing, liquidity, and market conditions still matter.

02

How can a system recognize that the strategy position and actual brokerage position do not match?

The strategy position represents what the strategy theoretically intends to hold. The actual position represents what the brokerage account is presently holding. Xtreme Auto Trader displays both and compares them continuously.

Its Position Match display changes color when the theoretical and actual positions disagree and shows how long the mismatch has persisted in milliseconds. A brief mismatch is expected while an order is being transmitted and filled. If the mismatch continues beyond a user-defined period, the system can issue a message and an audible alert. For example, a strategy position of 100 shares long and an actual position of only 50 shares long would be identified as a mismatch requiring attention.

03

How can several strategies trading the same symbol be combined?

Xtreme Auto Trader uses aggregation. It adds the positions requested by the participating strategies and trades the resulting net position through a primary chart.

Suppose one strategy is 500 shares short, a second is 200 shares short, and a third is 600 shares long. Their combined instruction is 100 shares short. The individual strategies may use different bar types and intervals, while the console shows both their separate theoretical positions and the aggregate position that should be reflected in the account.

The manual requires each participating chart to have a unique combination of bar type, bar interval, surrogate symbol, strategy configuration, or inversion setting so the system can distinguish the contributing strategies correctly.

04

How can a strategy using Renko or another price-based bar exit at a precise time?

A price-based bar may not complete at a predictable clock time. If an exit depends only on the strategy evaluating at the close of a Renko, Kagi, Range, Momentum, Line Break, Point & Figure, or similar bar, a time-based exit could occur late.

Xtreme Auto Trader provides entry and exit time controls that operate across both time-based and non-time-based bars. Two separate entry-and-exit windows can be defined, which is useful for futures and foreign-exchange markets with long or multiple sessions. A separate setting can stop additional strategy position changes shortly before the required exit time, then halt trading and flatten the position at the designated time.

05

What can be done when a limit price is reached but the order does not fill?

Touching a limit price does not guarantee a fill. Orders already waiting at that price generally have priority, and the market can move away before a later order reaches the front of the queue.

For its protective profit-target order, Xtreme Auto Trader can convert the unfilled limit order to a market order after the limit price has been touched. The conversion can be triggered by elapsed milliseconds, a specified price pullback, trading volume at the limit price, a bid-and-ask size relationship, or a combination of those conditions.

The tradeoff is important: a market order is intended to obtain execution, not a particular price. Converting the order may produce a fill below the original profit-target price, particularly in a fast or illiquid market.

06

How can one strategy generate signals while another symbol is traded?

This is surrogate trading. The original chart and strategy continue to generate the theoretical long, short, or flat position, but Xtreme Auto Trader sends the corresponding orders for a separately specified surrogate symbol.

The surrogate must be a valid symbol available to the selected trading account. This separates the source of the trading signal from the instrument used for execution and also supplies the foundation for the system’s pairs- and options-trading features.

07

How can long signals be converted into short trades?

The system’s Invert Entries setting reverses the strategy’s intended direction. When the original strategy goes long, the executed position is short; when the strategy goes short, the executed position is long.

Inversion can be used with the original symbol or combined with surrogate trading. The strategy continues producing its ordinary signals—the execution layer performs the directional conversion.

08

How can an ordinary strategy be adapted for pairs trading?

Pairs trading requires coordinated positions in two instruments, commonly long one and short the other. Xtreme Auto Trader applies the same underlying strategy in two rows: one trades the original symbol, while the other trades a surrogate symbol with its entries inverted.

David’s manual illustrates this with EURUSD and AUDJPY. A long signal can produce a long position in one pair and, through surrogate trading plus inversion, a short position in the other. When the signal reverses, both sides reverse together. The suitability of the symbols, position sizes, relationship between them, and trading logic remains the trader’s responsibility.

09

How can strategy signals be translated into calls or puts?

Xtreme Auto Trader can treat an option as the surrogate instrument for the underlying symbol. In the documented version, a long strategy signal selects and purchases a call, while a short signal selects and purchases a put. If entries are inverted, a long signal purchases a put and a short signal purchases a call.

The interface documented options for choosing weekly contracts, the number of expiration dates from the nearest expiration, and the number of strikes from the at-the-money strike. Because option symbols, platform capabilities, expirations, and market conventions change, the current availability and compatibility of this historical feature must be confirmed before any contemplated use.

10

How can strategies be selected and started according to indicator values and relative rankings?

The Auto Start feature evaluates three types of criteria: a permitted time window, an indicator value within a specified range, and a symbol’s relative position after the symbols have been ranked. The documented default trigger used a Relative Strength Index calculation, while other calculations could be developed.

The system can start a defined number of the highest- or lowest-ranked symbols when the required criteria are satisfied, or start individual rows as each one qualifies. It can also stop considering additional symbols after the selected group has begun trading. This turns selection rules into explicit, repeatable conditions rather than requiring the trader to watch and start every chart manually.

11

How can these capabilities be added without rewriting the original strategy?

Xtreme Auto Trader is not the trading strategy. The original strategy continues to calculate its own theoretical long, short, or flat position. A companion indicator communicates that position to the Xtreme Auto Trader execution and control layer.

That separation allows the system to work with ordinary TradeStation strategies—including, in the documented version, certain black-box strategies whose source code cannot be viewed—without converting their internal logic. Xtreme Auto Trader then handles supported functions such as order placement, protective brackets, position comparison, aggregation, timing, inversion, and surrogate execution outside the original strategy.

Some specialized capabilities had product-specific limitations, and the historical software was written for an earlier TradeStation environment. Present compatibility would need to be evaluated before the product could be used again.

From documentation to conversation

This is the foundation for Ask Emerald.

A future Ask Emerald assistant could use David’s manuals and technical explanations to help a visitor identify the relevant concept, understand the terminology, and formulate a better question—while leaving trading decisions and live-system changes under human control.

Ask David about an engineering problem ↗