Announcement

Collapse
No announcement yet.

get time of specific high low

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

  • get time of specific high low

    Is there a simple command to find out when the high or low
    of a chart bar occured.

    For example;
    I beleive this will indentify the time the current bar started or open at the current chart interval;
    sTime = (getHour()*100) +getMinute();

    I was mostly hoping I would not have to comb through
    a lower intervals databars to get an approximation of
    when a high or low occurred on a particular bar.

    -Terry

  • #2
    Re: get time of specific high low

    Terry

    Is there a simple command to find out when the high or low of a chart bar occured.
    There isn't a specific function that will do that. You will need to write the necessary logic.

    I beleive this will indentify the time the current bar started or open at the current chart interval;
    sTime = (getHour()*100) +getMinute();
    That retrieves the time stamp of the bar which is not necessarily when the bar was created.
    For example assume you have a 5 minute chart and the first trade after 10:00 am is at 10:03 the bar will be time stamped 10:00 regardless of the fact that the bar opened at 10:03 because that bar covers the time frame between 10:00:00 and 10:04:59.
    With tick based intervals instead the time stamp corresponds to the time of creation of the bar.

    I was mostly hoping I would not have to comb through a lower intervals databars to get an approximation of
    when a high or low occurred on a particular bar.
    In order to do what you want you will need to drill down through the data of a lower interval to find the time at which the High or Low occurred (the approximation will depend on the granularity of the external interval used).
    I believe this subject has been discussed in the past so try running some searches and you should find some specific examples of the necessary logic
    Alex


    Originally posted by thaynes
    Is there a simple command to find out when the high or low
    of a chart bar occured.

    For example;
    I beleive this will indentify the time the current bar started or open at the current chart interval;
    sTime = (getHour()*100) +getMinute();

    I was mostly hoping I would not have to comb through
    a lower intervals databars to get an approximation of
    when a high or low occurred on a particular bar.

    -Terry

    Comment


    • #3
      Thanks

      Thanks Alexis,

      I kind of figured that I would have to write the logic,
      searching did get some near hits. I will look a little more
      and think I can modify some of the high/low of x to get
      the job done. My largest concern was getting the bar index
      from the hhv/llv to use as my bar pointer for the get time.

      Mostly this is just an exercise in programming, I figured
      I would paint the top wick on the candle green if the high
      occured last, red if the low. Not sure there is any value in
      the info ... but one never knows.


      -Terry

      Comment

      Working...
      X