I have a simple algorithm to define a intra-day high (swing) - in the course of 2 to 3 days, I may have 5 - 50 of them depending on the time frame of my chart. I would like to write a study to alert me as to which swing high, the current price is closest to at current time.
The historical bar info efs was very helpful, but i am unsure on how to write code to compare a series of values to current price (O/H/L/C) and return the one closest either above or below.
Thanks in advance.
Alex.
The historical bar info efs was very helpful, but i am unsure on how to write code to compare a series of values to current price (O/H/L/C) and return the one closest either above or below.
Thanks in advance.
Alex.
Comment