TS 2000i Periodicity

bdholmes

Junior member
Messages
34
Likes
1
2000i will only re-calculate a strategy at the end of each bar. This means if you want TS to precisely keep to your strategy and to prevent the market going against you mid-bar you have to use tick charts.

However, tick charts can only display a maximum of 10 days data, so backtesting is impossible. So if you are automatically trading by sending your 2000i trading signals to IB, you have a dilemma.

The way I see it, you have 2 choices:
- You can use 1 minute charts for backtesting and live trading. This allows your live trading to be faithful to the backtesting you have done. But it also means you are only in control of your trading destiny once a minute - there will be mid-bar slippage.

-You could use 1 minute charts for backtesting, and tick charts for live-trading.
This allows your live trading to be faithful to your strategy, and there will be no mid-bar slippage. But your backtesting won't accurately reflect what will happen in real life.

Is anyone else in this situation? What have you done?

Perhaps the solution is to not use 2000i for backtesting at all, can anyone recommend a good product for backtesting? Do Tradestion 6, 7, and 8 also have this problem?

Thanks,

Brendan
 
Brendan,

Yes TS2000i can be a pain in some circumstances, but I would point out that if you use Stop or Limit orders, these are properly handled during back-testing provided you use market data of the correct resolution AND you set your strategy resolution appropriately. Market orders, as you say, are only sent at the end of each bar.

An example where this can work is a breakout system, for instance. If your strategy issues Stop entry orders at the end of each bar, then these will correctly taken in real-time if you are using a real-time data-feed (eg eSignal or IB).

The entries will also be correctly taken and reflected in the back-test results if you keep tick-data or 1-minute data in GlobalServer. GlobalServer gives you a choice of what data to keep for each symbol - Tick, 1-min and Daily, or any combination thereof.

If you do keep tick-data, then that can be played through the strategy even though you may be using 5, 10 or 30 min bars, or whatever. To do this you need to choose "Tick" in the strategy resolution properties. I very rarely use Tick as back-testing becomes very slow and find that 1-min resolution gives almost identical results.

Obviously you can't choose a setting of Tick or 1-min if you only collect daily data. In this case TS makes certain assumptions about how prices moved during the daily bar (ie whether the High came before the Low etc), and generally the results are unrealistic.

Regardless of what resolution you use for back-testing, the reports will show the Stop and Limit orders being taken at the end times of each bar, not at the real time they would have occurred, which is somewhat confusing if you don't know it does this.

There is still a problem though - if your breakout strategy entered a position via a Stop order, then it seems that the first chance it gets to issue a protective stop or take-profit limit order, will be at the end of the bar. You just have to hope the price doesn't move outside your intended stop before the bar completes. I use 1-minute bars for this reason and synthesise longer bars in code, as required.

Hope this is of use,
Paul
 
Last edited:
Just a quick note to thank you for your detailed and pertinent reply Paul. I'm sure I won't be the only one who will find it helpful. All the literature I've ever read says TS can only make a decision at the end of each bar, so I'm delighted to discover that if you use stop-entries, it will work in real time no matter what bar-compression you use, and have updated my trading strategies accordingly.

Given that even if you use stop-entries "the reports will show the Stop and Limit orders being taken at the end times of each bar", performance problems aside, what is the point of changing backtesting resolution to tick? Do you mean just the list of trades on the performance report are shown as having occurred end-of-bar, and the overall net profit, drawdown, return on account, etc are all still accurate to the tick?

My stops are wide enough that I'd have to be v. unlucky to be affected by the problem you refer to in your last paragraph, but I will use 1 minute charts also.

Thanks again,

Brendan
 
Last edited:
Brendan,

Do you mean just the list of trades on the performance report are shown as having occurred end-of-bar, and the overall net profit, drawdown, return on account, etc are all still accurate to the tick?

Yes, that's what I meant. The trades will look as though they executed at the end of bar. All the stats will be Ok though.

I have found that setting to either "Tick" or "1-minute" generally gives similar results but it is best if you experiment for yourself to get a feel for how strategy results change as you fiddle with the various parameters.

For instance, create yourself a strategy that works on, say 60 min bars, and then vary the strategy resolution to see what happens - 60 min, 30 min, .... down to 1 min and Tick. Sometimes doesn't make much difference, sometimes a lot.

Paul
 
bdholmes said:
2000i will only re-calculate a strategy at the end of each bar. This means if you want TS to precisely keep to your strategy and to prevent the market going against you mid-bar you have to use tick charts.

However, tick charts can only display a maximum of 10 days data, so backtesting is impossible. So if you are automatically trading by sending your 2000i trading signals to IB, you have a dilemma.

The way I see it, you have 2 choices:
- You can use 1 minute charts for backtesting and live trading. This allows your live trading to be faithful to the backtesting you have done. But it also means you are only in control of your trading destiny once a minute - there will be mid-bar slippage.

-You could use 1 minute charts for backtesting, and tick charts for live-trading.
This allows your live trading to be faithful to your strategy, and there will be no mid-bar slippage. But your backtesting won't accurately reflect what will happen in real life.

Is anyone else in this situation? What have you done?

Perhaps the solution is to not use 2000i for backtesting at all, can anyone recommend a good product for backtesting? Do Tradestion 6, 7, and 8 also have this problem?

Thanks,

Brendan

Edit your History to Save in Globalserver and you can have more tick data.
Paul
 
I observe first hand and trade discretionary first and make market context dictate the selection of indicators and strategies, then I try to automate. I think that's the most sensable way to do it. For example I discovered that stop management is crucial on intraday and everything rotates around it., then I start selecting right indicators and frames for the job and built system around . it does very well

I see some people try to go other way around - substitute lack of live market experience with some presupposed system or indicator often written by non trader. I see it as hiding behind indicators, expecting indicators trade instead of you and some really believe they can buy such system or set of indicators. I haven't seen anything good for sale. (you can do well with the set of real simple ones, but you have to set periods and logical conditioning yourself, they don't come with the package)

"Trade the best, sell the rest" is still the motto. Don't decieve yourself on that.
But chatting on boards about programming language is a very beneficial excercise for everybody.

Tick charts are very important for intraday and make all the difference. Some programs have smaller time increments in secnds. I think this is the future. You can't seriously do anything real time without those. I have all my trail stops on tick charts and 1 min charts, I start with close stop in scalping mode and if market moves enough I move stop to broader trading trail mode. That's the best approach, you risk very little and upgrade positions in the process to higher status when they qualify, if they don't you scalp a bit and if wrong loose very little if any that way. But it took a while to come up with right criteria and implement the concept . i struggled before with losses on broad stops. Also analisys go from higher frames to smaller, but trade and stop management starts from smaller frames and expands into bigger ones. So analisys and money management are two opposites, i's good to remember and not to mix logical sets.
I trade primarily from 1 minute and tick charts and use the rest for potential position status upgrades.
Good luck.
Greg.
 
Resolution

TS8 has something called intrabar persist - which means you can enter stop order/limit orders, etc as the bar is forming and your condition is met rather than wait for the end of the bar like 2000i.

2000i was a great product ( I sitll use it everyday) but its a steam engine competing in a formula 1 race nowadays!
 
Top