Unnecessary data requests in Portfolio Trader?  [SOLVED]

Questions about MultiCharts and user contributed studies.
Xyzzy
Posts: 162
Joined: 19 Mar 2011
Has thanked: 43 times
Been thanked: 79 times

Unnecessary data requests in Portfolio Trader?

Postby Xyzzy » 24 Mar 2016

I have a project that trades ETFs using the Portfolio Trader with data from IQFeed. For each symbol, I have two instruments:

1. A one-second bar as Data 1. (This is so that I can simulate IOG using Portfolio Trader.)
2. A one-day bar as Data 2.

I have the "Data Range" setting in Portfolio Trader set to "201 bars back" (rather than "days back").

When I enable automatic order execution, QuoteManager attempts to download the data. However, it seems to be attempting to download 201 days worth of tick data. IQFeed won't provide that much historical tick data, so the Portfolio Trader eventually reports that it's unable to download the data.

You can see this in the attached screenshot. On the right-hand side, you can see the QuoteManager requests for historical tick data for various symbols, including FJP. It's asking for tick data from FJP going back to January 2016 (and earlier).

This seems to be unnecessary. For Data1, I only need 201 seconds of tick data -- i.e., at most, historical tick data from two days back (today and yesterday). Is there a reason that MultiCharts is requesting so much historical tick data here, or is this a bug? Is there any way to fix this?

Thanks much for any clarification.
Attachments
ScreenHunter_69 Mar. 24 11.54.gif
(418.29 KiB) Downloaded 715 times

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Unnecessary data requests in Portfolio Trader?

Postby Henry MultiСharts » 30 Mar 2016

Hello Xyzzy,

That is expected behavior.
If you want to minimize the amount of data loaded just to start the auto trading - you need to supply the number of bars that will cover the max bars back value on both data series. You can set the data range to max bars back + 1.

Xyzzy
Posts: 162
Joined: 19 Mar 2011
Has thanked: 43 times
Been thanked: 79 times

Re: Unnecessary data requests in Portfolio Trader?

Postby Xyzzy » 30 Mar 2016

Thanks very much, Henry. However, I'm still confused about why this is the expected behavior. Could you clarify this?

I would expect this behavior if I had set the data range to "201 days back." However, in this case, I've set it to "201 bars back." My strategy doesn't need more than 201 bars for either data series.

For Data2 (one-day bars), I need 201 days of data to determine the historical moving average. However, for Data1 (one-second bars), it seems that I should only need two days of tick data (i.e., enough to provide 201 seconds of data). The extra tick data should be superfluous.

no erocla
Posts: 134
Joined: 31 May 2013
Has thanked: 60 times
Been thanked: 7 times

Re: Unnecessary data requests in Portfolio Trader?

Postby no erocla » 31 Mar 2016

Im interested too, i would like to use a lowest time frame (1 sec/5 sec) to give a certain delay to executions, or anyway to simulate IOG behaviour.

The idea is to download just a little portion of Seconds bars data like data1 (with bars back option), something already possible in MC platform (example attached).

Otherwhise, if you want use daily trading system with Seconds data1 format, you have to download tons of data uselessly :)

No Erocla
Attachments
example.png
(145.79 KiB) Downloaded 710 times

Xyzzy
Posts: 162
Joined: 19 Mar 2011
Has thanked: 43 times
Been thanked: 79 times

Re: Unnecessary data requests in Portfolio Trader?  [SOLVED]

Postby Xyzzy » 04 Apr 2016

As a follow-up, this approach seems to be working now. I configured it to have a MaxBarsBack of 205 (the strategy needs 200 bars). With that change, it now only downloads the second data that it actually needs.

I'm guessing that the problem above was just a random glitch. I'll keep an eye on it going forward.


Return to “MultiCharts”