TradeStation matching trades, Trend Following

As I do a lot of TradeStation code testing to verify that it is matching SQX TradeStation engine, I found many mismatches. So I decided to test methodically. first I am testing TrendFollowing so as to have fewer trades.

  • In SQX:
  • Tradestation engine
  • trend-following default settings (didn't change anything)
  • ES.D daily bars (imported from TradeStation) (2003 - 2019)
  • commissions, slippage, spread, min distance = 0
  • In TradeStation:
  • loaded same strategy with ES.D daily bars, same dates 2013 -2019, Commissions = Slippage = Interest = 0

In SQX, the strategy test engine always leaves first 15 months without trade, on the other hand, the same code in TradeStation needs 3 months to start trading. after 15 months the strategy needs 12 months to sync with TradeStation.


If you retest with date >= 3 (2005 and above) years after start date then engine always needs 2-10 trades to sync with TradeStation.
If you import a new set of data that starts let's say 2010. The same strategy will need 15 months for the first trade to appear. on that same set of data if you retest starting after 3 years, then it will trade right away, but still needs 2-10 trades to sync with TradeStation.

Attachments
SQX Strategy 0625.txt
(7.57 KiB)
Strategy 0625.xlsx
(102.91 KiB)
SQX Strategy 0625.sqx
(46.77 KiB)
Strategy 0625 tradestation report.mht
(2.01 MiB)
  • Votes +1
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

ac
#1

statoasis

05.05.2019 02:26

Task created

RL
#2

rickliao

05.05.2019 06:50
Voted for this task.
TB
#3

Tomas Brynda

21.05.2020 09:08

Status changed from New to Fixed

Hi Statoasis,

we have made a lot of changes since the time the task was created.


I have backtested the attached strategy in TS and there are just a few trades at the beginning until the trades match.


If you need anything else or have further questions, let me know.


Best regards,

Tomas



Votes: +1

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please