Login Page - Create Account

Support Board


Date/Time: Wed, 05 Feb 2025 08:51:55 +0000



c_VAPContainerBase.GetHighAndLowPriceTicksForBarIndexRange Lacks a Working Implementation

View Count: 93

[2024-12-10 16:45:07]
Jedi Trader - Posts: 14
This undocumented minor convenience method delegates most of its implementation to GetHighAndLowPriceTicks. It seems that the latter uses a sly algorithm relying on the sequential ordering/sorting of the m_p_VAPDataElements in the array; however, upon reflection this is only suitable for a single bar. GetHighAndLowPriceTicksForBarIndexRange would need an implementation that iterates over all the bars in the range. Perhaps this implementation should either be added and the method documented or the method should be deleted. You could argue that it is more efficient to get the low and highs from sc.BaseDataIn array; however, I want to get it from the VAP data itself to guarantee consistency with the latter.

I realize that's what I get for skiing off-piste at VAPContainer.h. (I'll roll my own back inside the park boundaries rather than wait, so don't worry about me.) But you might want to ensure that there are realistic unit-tests defined for all exposed methods in your interfaces. (I recognize that it's tedious to mock-up the requisite data in a case such as this.)
Date Time Of Last Edit: 2024-12-10 17:13:33

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account