Login Page - Create Account

Support Board


Date/Time: Sat, 28 Dec 2024 09:25:01 +0000



Post From: Unexepected values in GetPersistent when using sc.MaintainVolumeAtPriceData

[2016-03-30 08:23:45]
gomifromparis - Posts: 244
Hi,

I'm encountering a case where GetPersistentInt doesn't give the expected value.
To test, I use a static counter, and increment PersistentInt(0) on each call of sc.Index ==0.

To encounter the problem, all the following must be true :
* the study must use sc.MaintainVolumeAtPriceData = 1
* it must be the first study of the chart using the VAPContainer(sc.MaintainVolumeAtPriceData =1)
* on instantiation, the user must click Apply, then OK

If all the above are true, here's what happens

Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | Begin Proc | 2016-03-30 10:16:24 *
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | Current persistent : 0 | 2016-03-30 10:16:24 *
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | Persistent is now : 1 | 2016-03-30 10:16:24 *
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | End Proc | 2016-03-30 10:16:24 *
CL-201605-NYMEX 5 Min #1 | Reloading chart. | 2016-03-30 10:16:24
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | Begin Proc | 2016-03-30 10:16:25 *
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | Current persistent : 1 | 2016-03-30 10:16:25 *
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | Persistent is now : 2 | 2016-03-30 10:16:25 *
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | End Proc | 2016-03-30 10:16:25 *
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | Begin Proc | 2016-03-30 10:16:26 *
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | Current persistent : 1 | 2016-03-30 10:16:26 *
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | Persistent is now : 3 | 2016-03-30 10:16:26 *
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | End Proc | 2016-03-30 10:16:26 *


You can see the persistent being set to 2, and on the next call, it's back to 1


In all the other cases, here's what happens. (for instance, here's a test without clicking on Apply before OK)

Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | Begin Proc | 2016-03-30 10:19:07 *
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | Current persistent : 0 | 2016-03-30 10:19:07 *
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | Persistent is now : 1 | 2016-03-30 10:19:07 *
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | End Proc | 2016-03-30 10:19:07 *
CL-201605-NYMEX 5 Min #1 | Reloading chart. | 2016-03-30 10:19:07
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | Begin Proc | 2016-03-30 10:19:08 *
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | Current persistent : 1 | 2016-03-30 10:19:08 *
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | Persistent is now : 2 | 2016-03-30 10:19:08 *
Chart: CL-201605-NYMEX 5 Min #1 | Study: Persistent test | End Proc | 2016-03-30 10:19:08 *


This is the expected result
attachmenttestalloc.cpp - Attached On 2016-03-30 08:23:25 UTC - Size: 714 B - 384 views