Loading time of Volume Profile is too slow, and get even slower as your read it.

Questions about MultiCharts .NET and user contributed studies.
Emmanuel
Posts: 355
Joined: 21 May 2009
Has thanked: 109 times
Been thanked: 28 times

Loading time of Volume Profile is too slow, and get even slower as your read it.

Postby Emmanuel » 23 Apr 2020

The instruction : vp = VolumeProfiles.ItemForBar(x) to get the volume profile is too slow

And it is even slower as you read it from the chart : (As you can read in the log attached)

Code: Select all

Current : 2000 Total Seconds / (1000 VolumeProfile request) : 5.216
It takes around 5.2 seconds to get 1000 Volume profile (on 1000 bars) if you request the first 1000 bars of your chart,

And as you request more volume profile, for a chart of 300 000 bars , is takes 40 seconds to get 1000 volume profile when your current bar is at 300000th bar, (it is 8 times slower)

Code: Select all

Current : 308000 Total Seconds / (1000 VolumeProfile request) : 40.315
And as your current bar arrive at 400 000 , is takes 50 seconds to get 1000 volume profile when your current bar is at 400000th bar.(it is 10 times slower)

Code: Select all

Current : 414000 Total Seconds / (1000 VolumeProfile request) : 50.492
Why does it take 5 seconds initially and almost 50 seconds on the last bar to get only 1000 bar of volume profile. ?

It tooks a total of 3 hours, 6 minutes , and 24 seconds to load a charts of 417 000 volume profile bars :

Code: Select all

Current : 417000 Total Seconds / (1000 VolumeProfile request) : 47.369 Total seconds: 11184.989284 Hour, Min, Sec : 03:06:24.9892840
It tooks 3 hours for only one instrument,( for one dataseries).
Usually on a charts you have at least 3 dataseries : short interval, medium interval, and long interval. It would take 9 hours just to start



I found only one way to get all the volume profile in one instruction :

Code: Select all

System.Collections.Generic.ICollection<IProfile> vp1 = _ShortTermVolumeProfiles.Items; List<IProfile> ListeProfile = new List<IProfile>(); ListeProfile.Clear(); foreach (IProfile ProfileTemp in vp1) { ListeProfile.Add(ProfileTemp); }
Then I put all the profile in a list of profile (ListeProfile)

Like that we can select directly the correct profile with :

Code: Select all

IProfile ProfileTemp1; ProfileTemp1 = ListeProfile[this.BarsOfData(X).FullSymbolData.Current - 1];
This solution is much faster, I didn't find any error. But is this correct ?
Attachments
VolumeProfiles.ItemForBar.txt
(31.24 KiB) Downloaded 181 times

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: Loading time of Volume Profile is too slow, and get even slower as your read it.

Postby Svetlana MultiCharts » 14 Aug 2020

Hello Emmanuel,

If you would like us to check it, please reproduce the issue in the simplified environment and send us the following files to our support address so that we would be able to investigate the issue:
1. The workspace where the issue is reproduced.
2. Export of used symbols (with data) from QuoteManager in .qmd archive: http://www.multicharts.com/trading-soft ... rting_Data
3. The exported scripts with all dependent functions that are used on the workspace: http://www.multicharts.com/trading-soft ... ng_Studies
4. Step-by-step instruction how to reproduce the issue.


Return to “MultiCharts .NET”