SetTimeOfDayPriority error
Author: Nadja
Creation Date: 4/19/2012 8:41 AM
profile picture

Nadja

#1
Hello all
I have developed a daily strategy which works with Limit Orders for the entries. Because I cannot know which orders are filled first on the daily scale, I tried to implement the SetTimeOfDayPriority method to backtest correctly.
To learn how this can be done, I started with Cone's sample script, modified slightly (see below). In the debug window, I receive the following error message:

Dow 30 (1Min) not a WealthLab.BarDataStore. Priorities cannot be set.

Why is this? I have bought my 1 Min Intraday Data at PiTrading, which is supported by Wealth Lab.

The most important line in the code is the last one, I suppose. What is wrong there?

Thank you in advance for your help.
Kind regards
Andreas
CODE:
Please log in to see this code.
profile picture

Eugene

#2
If you bought your 1-minute data at PiTrading, then it must came in a CSV/ASCII format. Pardon my geek speak, but "Dow 30 (1Min)" is really not a WealthLab.BarDataStore. The BarDataStore is an interface implemented by some data providers like Fidelity or IQFeed. Simply put, it's a hierarchical file database controlled by Wealth-Lab. By design, the ASCII provider is not based on the BarDataStore so SetTimeOfDayPriority is not compatible with the ASCII provider (see Usage Notes #3).

I could think of a really cumbersome workaround but for any practical purposes, why not give LimitPriorityLong/IntradayFillPriorityEstimate a try?
profile picture

Nadja

#3
Hello Eugene

Yes, the PiTrading data are in ASCII format, so this will not work.

Do you have any link where the providers who offer the WealthLabBarDataStore-data are listed? I was unable to find any information about it.

For the moment, I would like to work with the IntradayFillPriorityEstimate method that you mentioned, I have tried to put it in the Code, but it still doesn't run. I know that it's not your job to give programming lessons to beginners, but maybe you could have a quick look. I would appreciate this very much. It's the same code as before, only the last two lines are changed.

I can't see why the computer says that he doesn't know the IntradayFillPriorityEstimate Method in this context.

CODE:
Please log in to see this code.
profile picture

Eugene

#4
QUOTE:
Do you have any link where the providers who offer the WealthLabBarDataStore-data are listed? I was unable to find any information about it.

Not sure how it's going to be useful, but the Wiki page for the Data Tool lists both compatible and incompatible providers - because the Data Tool will only function if a provider supports the BarDataStore.
QUOTE:
I can't see why the computer says that he doesn't know the IntradayFillPriorityEstimate Method in this context.

It's not your fault - the Wiki online help page wasn't making it clear. Here's your code:
CODE:
Please log in to see this code.
profile picture

Nadja

#5
Now it works! Thanks a lot!

Kind regards

Andreas
profile picture

Nadja

#6
Hello all

I'm still working on a strategy which is similar to the strategy from above.

Now I opt to switch to the SetTimeOfDayPriority method, but have still some questions on this subject.

1) The usage notes say that that the SetTimeOfDayPriority method only works for scripts that trade 1 symbol.

Does this mean that it will not work on a strategy which runs on a portfolio of stocks?
Or does this mean that it will not work for strategies that take more than 1 positions in the same stock?

2) The usage notes say that the data must be in WealthLab.DataStore format.

Are there any historical intraday Data in this format on a DVD?
Or do I need an intraday data provider?

Thank you in advance for your help.

Andreas
profile picture

Eugene

#7
Hi Andreas,
QUOTE:
Does this mean that it will not work on a strategy which runs on a portfolio of stocks?
Or does this mean that it will not work for strategies that take more than 1 positions in the same stock?

Cone will correct me if I'm wrong, but I think this limitation applies to strategies a) using DataSetSymbols + SetContext and/or b) using SetContext to enter trades.
QUOTE:
2) The usage notes say that the data must be in WealthLab.DataStore format.

It means that the following static providers, implementing so called BarDataStore, are supported for pulling intraday data from: Fidelity, Finam, Forexite, Google, IQFeed, and Random (plus any appropriate 3rd party provider that may exist). Others (Metastock, ASCII etc.) and EOD-only BarDataStore-supporting providers (BBFree, CBOE, Market Sentiment, MSN, QuoteMedia, PiTrading, TradingBlox, Yahoo) are not.

profile picture

Cone

#8
1. Eugene is correct as usual.
profile picture

Nadja

#9
Hello Eugene and Cone

Just one last question concerning the WealthLab.DataStore format.

Does the 1-minute data from QuantQuote static provider support the format?
So would it be possible to work with the SetTimeofDayPriority with Quantquote data?

Thank you in advance for your help.

Kind regards

Andreas
profile picture

Eugene

#10
No idea what this QuantQuote provider is. You better ask the developer/vendor.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).