TradeStation Help

Advanced Chart Types - Strategy Back-testing & Automation

The Advanced Chart Types, with the exception of Range Bar and Momentum Bar charts, do not include the highs and lows that occurred during the time period charted.  For this reason, stop and limit orders cannot be used in the back-testing or automation of Advanced Chart Types that are constructed using an underlying interval other than 1-tick. In addition, only those charts constructed using a 1-tick underlying interval will have actual share or contract volume data available. For these reasons, the comments below are limited to charts built from 1-tick underlying data.

By default, TradeStation provides 6 months of historical tick data, so the back-testing of the Advanced Chart Types using a 1-tick underlying interval is limited to a 6 month historical period.

The Advanced Chart Types, with the exception of Kase Bars constructed from 1-tick data, use synthetic data to fill price gaps. In back-testing and in automation, then, fills can appear on prices that did not actually occur in the market.

Look-inside-bar back-testing is not available for the Advanced Chart Types. For this reason, an assumed price path is used to determine all strategy order fills historically. The presumed price path is high-to-low (for down bars) or low-to-high (for up bars) for the following chart types: Kagi, Line Break, Point & Figure, and Renko.

The Kagi and Point & Figure chart types require price movement of a certain "reversal amount" before a bar closes. This means that at the time that a strategy runs on a bar, prices have already moved away from the closing price by at least the reversal amount. For this reason, "this bar on close" and "next bar market" orders cannot be used with these types of charts. Also, the user must take precautions to avoid placing stop or limit orders that would be filled within the "reversal range."

Bars on Kagi, Point & Figure, Renko, and Line Break charts, bars do not form until prices have moved a certain amount. For this reason, when back-testing, it is possible to know the direction of the bar, and to guarantee that the bar is of a certain size, before initiating a trade. To illustrate this effect, the following strategy can be placed on a P&F, Renko or Line Break Chart and will show 100% profitability in back-testing:

Sell short next bar low stop ;

Buy to cover this bar close ;

Buy next bar high stop ;

Sell this bar close ;

On a Kagi chart, the following code will illustrate the same effect (100% profitable):

Buy next bar High + Minmove / PriceScale stop ;

Sell short next bar Low - MinMove / PriceScale stop ;

Sell this bar Close ;

Buy to cover this bar Close ;

In real-time, bars, or "ticks," on some of the new charts may appear at prices where bars or ticks will not appear when the same data is loaded historically. This applies to Line Break, Renko, and Point & Figure Charts, as well as to any of the Advanced Chart Types that is constructed using an underlying interval greater than 1-tick. For this reason, stop, limit, and market orders cannot be used with these types of charts in back-testing or automation unless it is known that prices could not have traded at the stop or limit price without forming a new bar. On Line Break and Renko charts, however, "this bar on close" orders can be used, as long as it is understood that when automated, such orders will be filled at the next available price after the bar's close, rather than at the bar's closing price and that, should a gap occur, the fill price will be created from synthetic price data.

Since bars on the Advanced Chart Types are not time-based, they are not forced to close at the end of a session. For this reason, SetExitOnClose does not work with these types of charts. Currently, there is no way to force an end-of-day or end-of-session exit either back-testing or automation.  

The above comments apply only to Advanced Chart Types built using 1-tick underlying data. Additional precautions would apply if any other underlying bar building interval is used.