Announcement

Collapse
No announcement yet.

get open() from 6hours ago, how?

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

  • get open() from 6hours ago, how?

    Hi,

    I start trading at 8:00am and need in my *.efs the open() from 1:00am as comparison.

    How can I use the open() function to get the 1:00am open() ?


    Is this possible: ?

    if (getHour()==8 && getMinute()==0) {
    myVar1am = open(-7, inv(60) ) }




    Torso
    Last edited by Torso; 10-04-2009, 01:41 PM.

  • #2
    Why don't you simply have your efs record the open at 1am??

    if (getHour()==1 && getMinute()==0) {
    myVar1am = open()
    }

    It would make more sense to have your efs record this price as it works thru the bars than to wait for a later time and try to go back and find the 1am price.

    Hope this helps.
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Hi Torso,

      Yes it is possible using your technique and as Brad described.

      You have to be careful such that your chart has a time template that will support the opening price at 0100 hours. ( i.e. - you will want to have a 24 hour or similar template.)

      I'd also recommend that you place index values in your getHour() and getMinute() methods to get their value and not also retrieve the hour and minute series objects.

      if (getHour(0)==8 && getMinute(0)==0) {
      myVar1am = open(-7, inv(60) ) }

      Hope this helps.


      Originally posted by Torso
      Hi,

      I start trading at 8:00am and need in my *.efs the open() from 1:00am as comparison.

      How can I use the open() function to get the 1:00am open() ?


      Is this possible: ?

      if (getHour()==8 && getMinute()==0) {
      myVar1am = open(-7, inv(60) ) }




      Torso

      Comment


      • #4
        Hi Doji, Hi Stevehare,

        thanks for answers, it works fine.



        Torso

        Comment

        Working...
        X