Support Board
Date/Time: Wed, 15 Jan 2025 09:59:26 +0000
Post From: Check for Range (Highs-Lows)
[2017-06-13 16:51:49] |
rhovega - Posts: 279 |
Presume outside support, but any chance you could tell me why the following two statements to not yield the same result? if (sc.GetHighest(sc.High, 10) - sc.GetLowest(sc.Low, 10) > 3) do something; vs int x, z; for (x = 0, z = 0; x <= 9, z <=9; x++, z++) { if (sc.High[sc.Index-x] - sc.Low[sc.Index-z] > 3) do something; } The for loop should be doing "(any High in last 10 bars - any Low in last 10 bars) > 3 then do something". Which should is the same as doing "(Highest High in last 10 bars - Lowest Low in last 10 bars) > 3 then do something". But it is not. If not SC if anyone could shed I light I'd greatly appreciate it. This should be very simple yet I'm stuck. Date Time Of Last Edit: 2017-06-13 16:55:14
|