Announcement

Collapse
No announcement yet.

High and low of the day

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

  • High and low of the day

    I've created a very simply EFS to draw a line on my chart at the day's high and low. The value reset each day to the high and low of the first bar and simply expands outwards as the day progresses.

    I'm getting my high and low values from high(inv("D")) and low(inv("D")) which, I think, is causing two problems:

    1. When I start eSignal in the middle of the day, the line is drawn horizontally at the current high all the way back to the beginning of the day and not in steps at each new high which means I can't easily see where a new high was made.

    2. I get the same problem when using bar replay in that, even at the first bar, the high is drawn at the high of the entire day and not the high at that point in the day.

    Is there an elegant solution to this or do I need to calculate and remember my own high and low each day?

    I thought about using highest() and lowest() but that would mean knowing how many bars have been drawn that day. Would this work, and if so, how do I know how many bars have been drawn so far each day?

    Thanks in advance for your help

  • #2
    Re: High and low of the day

    BerkoBob
    To do what you want you need to calculate your own ongoing High and Low of the day starting from the bar of your choice and using the charted data [instead of the external daily data].
    As an example of the logic required see the hilo_overnight.efs I posted in this thread
    Alex


    Originally posted by BerkoBob
    I've created a very simply EFS to draw a line on my chart at the day's high and low. The value reset each day to the high and low of the first bar and simply expands outwards as the day progresses.

    I'm getting my high and low values from high(inv("D")) and low(inv("D")) which, I think, is causing two problems:

    1. When I start eSignal in the middle of the day, the line is drawn horizontally at the current high all the way back to the beginning of the day and not in steps at each new high which means I can't easily see where a new high was made.

    2. I get the same problem when using bar replay in that, even at the first bar, the high is drawn at the high of the entire day and not the high at that point in the day.

    Is there an elegant solution to this or do I need to calculate and remember my own high and low each day?

    I thought about using highest() and lowest() but that would mean knowing how many bars have been drawn that day. Would this work, and if so, how do I know how many bars have been drawn so far each day?

    Thanks in advance for your help

    Comment


    • #3
      It works! Thanks as usual!

      Comment


      • #4
        BerkoBob
        You are welcome
        Alex


        Originally posted by BerkoBob
        It works! Thanks as usual!

        Comment

        Working...
        X