Reload data of chart  [SOLVED]

Questions about MultiCharts and user contributed studies.
evdl
Posts: 401
Joined: 19 Jan 2011
Location: Netherlands
Has thanked: 85 times
Been thanked: 124 times

Reload data of chart

Postby evdl » 27 Aug 2013

How to reload data of one specific chart.

I have multiple tick charts of the same custom future symbol.

One chart is 43ticks (10 days back) and one chart is 220ticks (10 days back).

The code I used:

Code: Select all

CommandLine(".rld int = 1 day, res=43 tick");


With this code it will reload all the tick / seconds charts of the same custom future symbol and also it will reload not 1 day but all days.

How to reload the data of 1day of only the 43tick chart?

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

Re: Reload data of chart

Postby Henry MultiСharts » 27 Aug 2013

Hello evdl,

All chart types and resolutions are plotted out of 3 base data types that are provided by data vendor:
Tick, Minute and Daily data.
All charts are getting the data from the same source and storing it in the same place - in the QuoteManager. By reloading one chart - all resolutions using the base resolution of the reloaded chart and refreshed with the new data as well.

.rld interval command should be used with no equals sign:

Code: Select all

CommandLine(".rld int 1 day, res=43 tick");

evdl
Posts: 401
Joined: 19 Jan 2011
Location: Netherlands
Has thanked: 85 times
Been thanked: 124 times

Re: Reload data of chart

Postby evdl » 27 Aug 2013

Thanks for the quick response Henry.

So if I reload the 43 tick chart of symbol X, then it will also reload the 233 tick chart of symbol X because the data is ofcourse in the same base resolution "tick".

Is it then necessary to use the number of ticks in the code or can I also use this for example:

Code: Select all

CommandLine(".rld int 1 day, res=tick");
But I first tried the code you suggested to reload 1 day. In QM I can see that the data is requested. And after that 1 day is reloaded, the "reloading" text in the upper left corner of the chart, disappears but it will keep requesting also the rest of the days that are on the chart in QM. Resulting in pacing violations. Is this supposed to work this way?

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

Re: Reload data of chart

Postby Henry MultiСharts » 28 Aug 2013

So if I reload the 43 tick chart of symbol X, then it will also reload the 233 tick chart of symbol X because the data is ofcourse in the same base resolution "tick".
It will reload only the 43 tick chart. The 233 tick chart will be refreshed with the new data as well, but nor reloaded. So there will data requests to the data provider from one chart only.
Is it then necessary to use the number of ticks in the code or can I also use this for example:
Code:
CommandLine(".rld int 1 day, res=tick");
If you specify number of ticks in the code then only a tick chart with the specified resolution will be reloaded. If you specify just "res=tick", then it won't do anything, the study will be able to reload any chart.
But I first tried the code you suggested to reload 1 day. In QM I can see that the data is requested. And after that 1 day is reloaded, the "reloading" text in the upper left corner of the chart, disappears but it will keep requesting also the rest of the days that are on the chart in QM. Resulting in pacing violations. Is this supposed to work this way?
I was unable to replicate this behavior on our end. Plese let me know if you are able to replicate it on a constant basis.

evdl
Posts: 401
Joined: 19 Jan 2011
Location: Netherlands
Has thanked: 85 times
Been thanked: 124 times

Re: Reload data of chart

Postby evdl » 29 Aug 2013

First I did a test with only one 20 tick chart of symbol X (datarange 10 days back).

This code I used:

Code: Select all

CommandLine(".rld int 1 day, res=20 tick");
and it worked. It only loads 1 day back.

Then I did a test with two charts of symbol X but with a different barinterval and datarange. A 20 tick (10 days datarange) and a 60 tick chart (20 days datarange).

Same code used and applied the indicator to the 20 tick chart. Then it will reload all days in the datarange of the 20 tick chart.

I believe if you use two charts of the same symbol, that the code is not working.

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

Re: Reload data of chart  [SOLVED]

Postby Henry MultiСharts » 29 Aug 2013

Hello evdl,

I have double checked it - you need to specify the equals sign with the interval, sorry for misinformation:

Code: Select all

.rld int=5 day
If equals sign is not specified - all chart data can be reloaded.
The code you have posted will not reload a 60 tick chart as "res=20 tick" is specified.
When your 20 tick chart is relaoded you will see Reloading and Backfilling messages on a 60 tick chart as well. If there is auto trading running on this chart - it will be stopped. That is expected behavior.

evdl
Posts: 401
Joined: 19 Jan 2011
Location: Netherlands
Has thanked: 85 times
Been thanked: 124 times

Re: Reload data of chart

Postby evdl » 29 Aug 2013

Hello Henry,

The equal sign did the trick.

Code: Select all

CommandLine(".rld int=1 day, res=20tick");
It works now. It will only load 1 day back. Problem solved.

Thank you.


Return to “MultiCharts”