Support Board
Date/Time: Tue, 04 Mar 2025 07:40:54 +0000
Post From: Finding Previous High Behind Latest High
[2019-06-24 20:27:05] |
User439067 - Posts: 48 |
Hello. I'm using sc.GetIndexofHighestValue to get the index. I need the high immediately preceding that. How can I manual loop backwards starting from GetIndexofHighestValue to find the previous high? //for(auto index = index_of_highest_value - 1; counter != 2; --index)
//{ // if (sc.High[index - 1] > sc.High[index] && counter == 0) // { // counter = 1; // } // if (sc.High[index - 1] < sc.High[index] && counter == 1) // { // counter = 2; // index_of_highest_value = index; // } //} The code results in an endless loop. |