Support Board
Date/Time: Tue, 04 Feb 2025 10:02:07 +0000
Post From: Plot All Time High / Low
[2020-01-10 15:23:40] |
Ackin - Posts: 1865 |
User907968)
Instead of iterating through the arrays, did you consider using sc.GetHighest & sc.GetLowest? Are you sure? Look at GetLowest INSIDE (sierrachart.h): float GetLowest(SCFloatArrayRef In, int Index, int Length)
sc.Lowest it will be same or maybe other way is sort of array and get last value...from view of time isn't big difference....
{ float Low = FLT_MAX; // Get the low starting at Index going back by Length in the In array for (int SrcIndex = Index; SrcIndex > Index - Length; --SrcIndex) { if (SrcIndex < 0 || SrcIndex >= In.GetArraySize()) continue; if (In[SrcIndex] < Low) Low = In[SrcIndex]; } return Low; } Date Time Of Last Edit: 2020-01-10 15:35:00
|