Announcement

Collapse
No announcement yet.

Daily Open Globex 8.30 am

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

  • Daily Open Globex 8.30 am

    Hi,

    is there any possibility to get the open price at 8.30 am (when the Globex starts).

    xDailyOpen = rnd( open( 0 , inv("D") ) ,iDecimals) ;

    This open price shows the price at 3.30 pm the day before.

    Thanks.

    rol

  • #2
    not sure this will help

    But, you might try this to lookup the price on the chart..

    PHP Code:

    function FindTimeOpen(nTime) {  // nTime should be entered as 830 or 1030 or 1530

      
    var x;
      var 
    nTimefound false;
      var 
    vTime getValue("Time",0);  // gets the current bar time
      
    var vBarTime = (vTime.getHours()*100)+vTime.getMinutes();
      
    //  this returns a number equaling a time of the current bar - like 854 for 8:54 am

      
    if (vBarTime nTime) { // it is currently past nTime on the chart
        
    x=0;  //sets x to point to bar 0
        
    while (!nTimeFound) {
          
    x--;
          
    vTime getValue("Time",x);  // gets the x bar time
          
    vBarTime = (vTime.getHours()*100)+vTime.getMinutes();
          if (
    vBarTime == nTime) {  // exactly nTime - get the open
             
    nTimeFound true;
          }
          if (
    vBarTime nTime) {  // prior to nTime - get the ASSUMED open
             
    nTimeFound true;
             
    x++;
          }
        }
      }

      if (
    nTimeFound) {  return open(x);
      } else {  return 
    null;  }


    WARNING.. This code COULD loop forever because it assumes it will either find the EXACT nTime or any time PRIOR TO nTime. So, if you open a chart and ask it to find 0 (zero), it will probably loop forever.

    Hope this helps.
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      rol
      If you are referring to the equity index futures on Globex (such as ES, NQ, AB) then the Open of those markets is at 15:30 CT of the day prior to the trade date. Those contracts trade in one single Globex session that starts at 15:30 CT and ends at 15:15 CT of the following day and there is no opening price at 8:30 CT.
      Having said that eSignal provides some symbols for these futures that track only the pit session of the equivalent full size contracts (ie from 8:30 CT to 15:15 CT). To access these symbols add an =2 extension to the original symbol. For example the symbol for the September 07 contract of ES is ES U7 and its "pit session" (or RTH) equivalent symbol is ES U7=2.
      Based on the above you can very easily access the Open at 8:30 of those symbols by calling them in your line of code. To do this you just replace inv() with sym() which allows you to define both an external symbol and interval as shown in the example enclosed below.
      Hope this helps
      Alex

      PHP Code:
      xDailyOpen   =   rndopensym("ES U7=2, D")  ) ,iDecimals) ; 

      Comment

      Working...
      X