Login Page - Create Account

Support Board


Date/Time: Tue, 25 Feb 2025 20:14:27 +0000



Post From: Inconsistent data from VolumeByPrice study when back-testing

[2021-04-21 07:54:19]
Ernie Doo - Posts: 46
I get very inconsistent data from the VbP study using sc.GetVolumeAtPriceDataForStudyProfile and sc.GetNumPriceLevelsForStudyProfile when back-testing.

The VbP study is the first one I load with StudyID 1 and the study I developed has StudyID 2. Those are the only 2 studies I have loaded in my chart. Inside my code I added "sc.CalculationPrecedence = LOW_PREC_LEVEL;" to ensure VbP is calculated first.

Now, when I back-test at speed 1 everything is consistent and I get same results at the same times. The problem comes when I start increasing the Replay speed. But even as low as a speed of 120 the data starts getting inconsistent. I start getting different volumes. When I increase the replay speed above 120 so does the inconsistency. If I dare to go to the max replay speed all hell brakes lose; I get big volume differences and I even start getting huge different values for Price Levels (sc.GetNumPriceLevelsForStudyProfile) at a same given time (eg. I could be getting a Price Level of 100 and the next run I would get 30 at the same time/bar).

The replay mode I use is "Accurate Trading System Back TestMode" which was recommended by you guys in other posts.

How can I get more consistency when back-testing at high speeds? The VbP profile is of great value to my trading but not if I have to back-test at very low speeds. I don't even need it to be that accurate, I just need a lot of consistency/repeatability. If somehow I could have a snapshot of last bar's VolumeByPrice, or something like that, I could make some decisions.

I am certain my computer's cpu is not overloaded. When back-testing my cpu load is always around 10%. I am running an Intel 6 core i7-8700 @3.2Ghz with 32 GB RAM. Besides, I have tested so many functions developed by you guys (TPO Profiles, Moving Averages, Bollinger, True Range, etc...) and everything has been running flawlessly at max speeds, until now.

Thanks,
Ernesto