Reply

Trade opening/closing times mismatching between SQX and Tradestation

4 replies

Rafael Ferreira Munhoz

Subscriber, bbp_participant, customer, community, sq-ultimate, 4 replies.

Visit profile

1 year ago #281063

I’m having some issues trying to reconciliate/validate the trades between algos mined in SQX and their performance report in Tradestation. For the time being i verified the issue in the 60m timeframe, in sqx the algo opens a trade at 11h while the same trade is taken 10h30 in Tradestation. When you look in the entire log, the same issue happens – trades in sqx are taken always in the begining of the hour whereas in TS they happen always in X:30h. Attached the print of their logs.

 

In SQX I have regular US stocks section configured (MON-FRI, 9:30 till 16h) and in TS I’m using exchange hours Session Hours to build bars and Exchange timezone (first bar is built at 10h30 in the 60m timeframe).

I already tried to change TS to use “Natural Hours” to build bars, but by doing so the first bar happens 10:00 and I still see a 1h difference between trades in TS vs Sqx.

Attachments:
You must be logged in to view attached files.

0

James Colton

Subscriber, bbp_participant, sq-ultimate, customer, community, 9 replies.

Visit profile

1 year ago #281069

TradeStation allows you to set timezone to Local or to exchange time under:

Timeframe/Settings/Display/Time Zone/ (Local or Exchange) in the Chart.

I do recall a discussion regarding time being the end of the bar for some platforms and beginning of the bar for others. Just can’t find it presently.

Does your Profit factor, number of trades, Sharpe ratio or other compiled results vary significantly from SQX to TradeStation in back-testing? Or are you simply focusing on the matter as a detail-oriented issue?

Was your SQX back-test done in TradeStation mode or some other mode and then code output in Easy language?

0

Rafael Ferreira Munhoz

Subscriber, bbp_participant, customer, community, sq-ultimate, 4 replies.

Visit profile

1 year ago #281071

Yes, backtest vs reality results are quite significant. And the issue is only verified in the 60m timeframe apparently, algos running in the 30m presented similar results between TS and SQX.

– All SQX tests were running in TS engine;

– All ticker data in SQX came from TS

– Data Manager: bar type in SQX is configured correct (timestamp represents end of bar time (NinjaTrader, Tradestation,) and timezone  is set as “(EST+07) New York Trading hours, US DST, DST: Yes”, which is the same of the Exchange (used in TS).

0

James Colton

Subscriber, bbp_participant, sq-ultimate, customer, community, 9 replies.

Visit profile

1 year ago #281072

You are trading AMD stock in a Long Only strategy?

Time in trade is showing even hour multiples with no added minutes. Are your stop loss orders not placed unless the open or close is at or past the stop rather than when the stop price is touched?

You TradeStation data shows a 60-minute chart. But AMD is an individual stock and it trades in a market that opens at 8:30 AM rather than on the hour. I anticipate this market opening time could be a significant cause of your data mismatch. I do not know for certain.

If you were to drop to the M30 timeframe and perform a sequential optimization of your indicators from 70% below to 200% above in 28 to 56 steps (more if you want) variables that should be adjusted (Length of lookbacks and averages) would be, and those that are stable as is (static stop loss and take profits) would remain stable unless the optimization provided better results.

Have you considered trading Exchange Traded Funds or Market Indices rather than individual stocks? Of course your strategies may need to be different. But general advice from SQX and numerous professional traders seems to follow a pattern of preferring to trade:

  1. Futures including futures indices and select commodities.
  2. Forex including any pair with EUR, GBP, JPY, and USD in each side of the pair.
  3. Equities ETFs or Indices
  4. preferred in the order listed above.

There are lots of reasons including favorable capital gains taxes for item 1 and for item 2 if traded on the futures market rather than the spot market if you are a US resident. Beware the futures market will allow you to dangerously over leverage so you must manage position sizes conservatively.

 

0

James Colton

Subscriber, bbp_participant, sq-ultimate, customer, community, 9 replies.

Visit profile

1 year ago #281073

Trading with stops that only trigger on the bar ends can provide a very false sense of security. Trading a vast array of uncorrelated tiny positions without stops might be preferable.

0

Viewing 4 replies - 1 through 4 (of 4 total)