Announcement

Collapse
No announcement yet.

trying to compare current price to historical (intra-day)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • trying to compare current price to historical (intra-day)

    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.

  • #2
    Hi Alex,

    What you are referring to is fairly advanced, but can be done. Right now, your idea needs refining a little bit, such as what about low swings, and when alerting you to a swing , what kind of information would you like to be alerted of.

    Another thing to consider is how would you define a swing. There is one efs that you may want to use to try and figure out how to define a swing and the associated parameters to use in determining the swings. You may want to check realtimeswings.efs that JasonK wrote and use that as the base for what you want to do. I would recommend varying the parameters to see their effect .

    Once you have a handle on how you want to handle the swings, and the other information I talked about, either myself or other board members may be able to help you put something together.

    Comment

    Working...
    X