READ-ONLY

The forum is now a read-only archive.

For bug reports & platform questions → [email protected]

Our community lives on Discord and YouTube — come join us!

Custom Shift Not staying set

1 replies

Jason

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

Visit profile

1 year ago #289391

I have been frustrated by the lack of matchup between Tradestation and SQx backtests. I think I’ve finally narrowed it down. When I build a strategy in AlgoWizard I can get them to match within 1 trade when I set the shift to 1. In Builder under # of conditions, period settings I can only set a maximum lookback period, which is frustrating. Can you change this to min and max?
Finally, under custom parameters I can set the shift to 1, but when I build a program the shift is 0. Please fix this. I’m almost positive the entire problem with strategies not matching is down to the shift and if you can’t specify the exact shift in the builder, then it will eventually pick 0 and throws off all my Tradestation programs.

0

Emmanuel

Customer, bbp_participant, community, sq-ultimate, 3 replies.

Visit profile

1 year ago #289456

Hello Jason,

When SQX uses the TradeStation engine, it builds strategies with shift = 0. This is not an issue because the rule is executed on a closed bar.

However, when SQX uses the MT5 engine, it produces strategies with shift = 1, since the rule is executed on an open bar.

In the example using shift = 0, we can see identical trades between MultiCharts (which behaves similarly to TradeStation) and StrategyQuantX.

In AlgoWizard, shift[0] is working correctly.

Each indicator requires a certain number of bars (or “reserved bars”) to function accurately.
For example, a pivot indicator may require one day or one week of data, depending on its settings.

It is important to start your strategy or template in SQX only after a sufficient number of bars have loaded, depending on the timeframe and the type of indicator used.

If you look at the attached strategy, you’ll see that the entry condition includes a check like Bar Date > GetDate(…).
This ensures that both SQX and TS/MC have enough historical data before the strategy starts executing.

In TradeStation, we need the minimum reserved bars for non recursive calculation like SMA, and then we need an additional period after the reserved bars per for the recursive calculation like EMA.

We are currently working on improving indicator accuracy and minimizing the reserved bar requirements per indicator. These improvements will be available in the next build.

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

1

Viewing 1 replies (of 1 total)