Announcement

Collapse
No announcement yet.

Changing Today's High/Low OHLC efs

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

  • Changing Today's High/Low OHLC efs

    I'm wondering how I can change the efs 'Todays High', to look at the time frame from 5:00pm ET - 5:00pm ET?

    It's programmed to look at 12-12am ET right now.

    Thanks!

    /************************************************** ****************************************
    Copyright © eSignal, a division of Interactive Data Corporation. 2005. All rights reserved.
    This sample eSignal Formula Script (EFS) may be modified and saved under a new filename;
    however, eSignal is no longer responsible for the functionality once modified.
    eSignal reserves the right to modify and overwrite this EFS file with each new release.
    @version 3.0 by Alexis Montenegro for eSignal
    ************************************************** *****************************************/

    function preMain() {
    setPriceStudy(true);
    setStudyTitle("Today's High (TH)");
    setCursorLabelName("TH");

    setDefaultBarStyle(PS_DASH);
    setDefaultBarFgColor(Color.black);
    setDefaultBarThickness(2);
    setPlotType(PLOTTYPE_FLATLINES);
    }

    var bInit = false;
    var xHigh = null;

    function main() {

    if(isMonthly() || isWeekly() || isDaily())
    return;

    if(bInit == false){
    xHigh = high(inv("D"));
    bInit = true;
    }

    var vHigh = getSeries(xHigh);

    return (vHigh);
    }

  • #2
    bugscoe
    FWIW even though the plot returned by Todays High.efs starts at 00:00 (and ends at 23:59) the script is referencing the daily bar which is based on the session times of the symbol. For example in the case of the emini S&P or Nasdaq the daily bar includes data starting at 16:30 (18:00 on Sunday) and ending at 16:15 of the following day (all times Eastern). In the case of Forex the daily bar is based on data starting at 18:00 and ending at 17:59 of the following day (again all times Eastern). Because the daily bar is time stamped 00:00 the efs uses that time [or the first available time within the same date] on the intraday charts to maintain the plot synchronized.
    In order to start the plot at 17:00 (or any other user defined time) you need to use a different script that does not reference the daily bar but that keeps track of the charted High for the defined period. For an example of how to do this see the Session HiLo.efs which is posted in this thread.
    Alex

    Comment


    • #3
      Alexis - thanks for the info!

      Comment


      • #4
        bugscoe
        You are most welcome
        Alex

        Comment

        Working...
        X