Support Board
Date/Time: Wed, 27 Nov 2024 16:52:41 +0000
Post From: vegasfoster, crazybears, ACSIL coders: convert spreadsheet studies to ACSIL sudies
[2014-09-03 10:17:22] |
tobi - Posts: 351 |
Hi Crazybears, not sure if i understand your question correctly. I'll try to explain (for swing highs => swing lows vice versa): First, the code should look for: H(3)>H(1) And H(3)>H(2) And H(3)>H(4) And H(3)>H(5) If this is the case, we do have a (simple) swing high. But in case there is an equal high (H(3)=H(4)) the code has to look one step further left, meaning: If H(3)>H(1) And H(3)>H(2) And H(3)=H(4) And H(3)>H(5) And H(3)>H(6) is the case, then we have a swing high. ... in case there is another equal high (H(3)=H(4) And H(3)=H(5)) the code has to look even one step further left, meaning: If H(3)>H(1) And H(3)>H(2) And H(3)=H(4) And H(3)=H(5) And H(3)>H(6) And H(3)>H(7) is the case, them we have a swing high. ... and so on. Ideally, the code looks so far left, until there is no further equal high to the left (followed by two lower highs). In the spreadsheet study I only look left for max. four equal highs (or the formular would get too long). Have you looked into the spreadsheet study yet? Is the general logic clear? I would assume, that it's easier to build this in ACSIL using some kind of "loop" to look for equal highs!? Hope it is more clear now!? P.S. you only have to look for equal highs left of H(3), because if H(1) and H(2) are not lower than H(3) in the first place, H(3) can not be a swing high point. Date Time Of Last Edit: 2014-09-03 10:28:04
|