Announcement

Collapse
No announcement yet.

Todays Open Yesterdays Close

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

  • Todays Open Yesterdays Close

    I couldn't find a simple way to determine the change in the ES H4 contract from the close yesterday at 1615, so I came up with this simple efs which determines the open and close as soon as the first bar of the day forms. I use a 930 to 1615 template so this works for me.

    var newDay=0;
    today = new Date;

    function main(){

    if(newDay==0 && today.getDate() == getValue("Day")){
    newDay=1;
    yestC = close(-1);
    todyO = open();
    debugPrintln(yestC, todyO);
    }

    }
Working...
X