Multi-Time Frame System Platform

Questions and discussion of Trading Blox and other platforms for non Trading Blox customers. Trading Blox customers should use the Trading Blox Support forum.
Post Reply
Roger Rines
Roundtable Knight
Roundtable Knight
Posts: 1946
Joined: Wed Oct 06, 2004 10:52 am
Location: San Jose, CA

Multi-Time Frame System Platform

Post by Roger Rines » Tue Mar 13, 2007 5:47 pm

For the last 15+ years TradeStation has been my primary system development tool because of its simple programming syntax and ability to easily accept DLLs for special approaches when Easy Language couldn’t make it happen. TradeStation has also been a good tool for developing successful portfolios after I added some tools to handle trade information output from the various markets.

Where TradeStation hasn’t worked well is in handling multiple time frames where a weekly or higher time series controls the actions taken on a daily data series. TradeStation does handle multiple time frames in its charts, but its performance isn’t 100% accurate for every daily bar. Where it fails is when a week is ending on a Thursday because of a market closing and the weekly bar hasn’t completed. When this happens, the signal created in the short week is lost by the following Monday’s calculation update. Some tricks can be employed to get the signal back into effect for Tuesday and the rest of week, but it doesn’t help when the Friday signal is hit on Monday and the platform doesn’t know it. Just as important, getting in late is most often not good enough to create an accurate risk protection signals.

My primary TradeStation version is TS2000i. I also have TradeStation 8.2 (Build 3862), but the current TradeStation version (8.2) stops working when a second 3rd party ASCII data stream with a different compression is used in a chart window, so newer hasn’t helped in this area. As of today, I need to find something more reliable to use as my primary trading platform. My needs aren’t vanilla as can probably been seen in how I know about the TradeStation bug that keeps me worried. I’m not worried about how complex the language for programming a system might seem as long as its syntax and command structure allows arrays, user defined functions, string handling and third party DLLs when its language just can’t make the climb.

In writing this I have the feeling I’m looking for something that might not exist and should spend my time inventing my own wheel. I sure hope that isn’t the case because that kind of activity is too distracting when trading, and more importantly, life is too short to take that on alone.

Any ideas?

Tim Arnold
Site Admin
Site Admin
Posts: 8537
Joined: Tue Apr 06, 2004 1:41 pm
Location: Boston, MA
Contact:

Post by Tim Arnold » Tue Apr 03, 2007 7:15 am

In Trading Blox version 2.2 we will have weekly bars available that are constructed automatically from the daily bars. These work correctly regardless of Monday or Friday holidays, so you won't have the issue that Trade Station has.

Roger Rines
Roundtable Knight
Roundtable Knight
Posts: 1946
Joined: Wed Oct 06, 2004 10:52 am
Location: San Jose, CA

Post by Roger Rines » Tue Apr 03, 2007 11:24 am

Hello Tim,

I haven’t finished getting through the Trading Blox documentation because of the new system work that has been distracting me, but I’ll get through it right after this fire is brought under control.

As for my comments above and your note about building weekly bars, I’ll add a little more information here to expand the issue better and to answer those who wrote directly asking about the problem.

In some of the weekly systems we trade we need the resolution of daily bars to improve our trade understanding during an active trade. In these same signals we only use completed weekly bars to do some calculations. Where this gets to be a problem in TradeStation is when a week doesn’t end on a Friday. In our case, we need to know when the week has ended because that is the trigger to update some of the logic that controls what is sent to the broker for the next week. It is also what we need to know when doing back testing so we test in the same manner that we will trade. In simple terms, if we could always depend upon a Friday date in the daily data file being available in every week, or if we could look ahead in time to know which week the next trading day would fall into, our issue would go away.

Where TradeStation fails us is in how they build their bars for each week. In every case a weekly bar record is labeled with the Friday date of that week, whether it exist or not. In fairness to TradeStation, there is no simple way of knowing which days in the future will have holidays on a Friday so their approach to building weekly bars is clumsy, but not terrible. However, if they had allowed a function in EL so that the code could look ahead to the next record in the file to see its date, that would have also solved the issue of knowing when to handle the logic updates of each week while back testing.

In almost all situations looking ahead in system testing is an exercise in painting illusions, but I can’t think of any reason why we shouldn’t be allowed to know the next date in a data file. If someone knows why this shouldn’t happen I would like to understand the problem, so please speak up so I can change my view of this issue.

A poor work around for this problem is to change the last date in any week that doesn’t end on Friday to the Friday date. This allows TradeStation to only generate one Signal on Friday that matches the weekly data bar. What TS does now is to generate a signal using the last day of the week in the daily data stream and one in the weekly data stream with a different date and then loose the signal by the first day of the following week because there isn’t a Friday in the daily data file to ID or refresh the active signal. When this happens, signals generated and sent to the broker on the last day of that last week are not in effect in TradeStation at the end the first day of the following week when TradeStation checks that date in the updated data file. This issue creates the potential for an active position in the market that won’t be active in TradeStation.

From our conversations about Trading Blox, I believe you mentioned this kind of issue isn’t a problem with Trading Blox. Is that correct?

Tim Arnold
Site Admin
Site Admin
Posts: 8537
Joined: Tue Apr 06, 2004 1:41 pm
Location: Boston, MA
Contact:

Post by Tim Arnold » Tue Apr 03, 2007 1:15 pm

That is correct, this is not an issue with Trading Blox. Particularly in the upcoming 2.2 version the automatic weekly OHLC data is synchronized to the daily data correctly, so when you place orders for Monday it will use the daily and weekly data from Thursday or Friday depending on the holiday situation.

There is also a flag to indicate the first day of the testing week, so orders can be entered or exited once a week if desired, rather than daily.

Roger Rines
Roundtable Knight
Roundtable Knight
Posts: 1946
Joined: Wed Oct 06, 2004 10:52 am
Location: San Jose, CA

Post by Roger Rines » Tue Apr 03, 2007 2:20 pm

Tim wrote:That is correct, this is not an issue with Trading Blox. Particularly in the upcoming 2.2 version the automatic weekly OHLC data is synchronized to the daily data correctly, so when you place orders for Monday it will use the daily and weekly data from Thursday or Friday depending on the holiday situation.
Good news. This is what I had remembered from our conversation.
Tim wrote: There is also a flag to indicate the first day of the testing week, so orders can be entered or exited once a week if desired, rather than daily.
This statement is confusing because it implies the first day of data of the new week is already in the data file. Do I understand this right?

If my assumption is correct, then I need to ask because we have to have our orders in the broker’s hands at least an hour before the Currency & Bond markets open on Sunday. So in historical testing the order execution needs to follow this paradigm so that our testing matches our intended trade orders.

To do this we generate all our signals for the next week after the close of the last trading day of the week that is ending. To keep our logic consistent during the week, we use a simple flag that is controlled by a “Last_Dayâ€

Tim Arnold
Site Admin
Site Admin
Posts: 8537
Joined: Tue Apr 06, 2004 1:41 pm
Location: Boston, MA
Contact:

Post by Tim Arnold » Tue Apr 03, 2007 6:12 pm

Sorry I meant "LastDayOfWeek" from the instrument perspective. So when you generate orders for the first trading day of the week, the instrument will know that it has data for the last day of the prior week.

Let's take this offline and we can discuss more specifics.

Post Reply