Announcement

Collapse
No announcement yet.

PrevHHLL.efs & getPrevDaysOHLC.efs

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

  • PrevHHLL.efs & getPrevDaysOHLC.efs

    Hi
    I would be obliged for any assistance.
    When i load and try to run this EFS i get the message PrevHHLL.efs, line 39 Can not find formula.
    I have saved the getPrevDaysOHLC.efs as instructed to formula/ohlc file and just tried just about everywhere else but to no avail.
    Any idea's would be appreciated.
    Best Regards
    Ray

  • #2
    Ray
    If you right click the chart and from the context menu select Formulas->OHLC is the getPrevDaysOHLC.efs listed in that folder?
    Alex

    Comment


    • #3
      Hi Alexis

      No it wasn't i moved it and now it works fine, thank you.

      If its possible could you suggest a way to modify this as i would like to have the high / low of the first hour plotted for me as i often scan multiple charts and to keep re drawing it is a pain.

      Much obliged
      Ray

      Comment


      • #4
        Ray
        The formula can't be modified to do what you ask as it uses the daily values to plot the high and low lines. However Jay or Jason wrote another efs, that I am attaching here, that will plot the lines at the high/low of the first nn minutes of the current day. The number of minutes is set by default at 60 but can be modified through Edit Studies
        Alex
        Attached Files

        Comment


        • #5
          Many Thanks

          Ray

          Comment


          • #6
            Alexis or any other kind sole:

            Hi i have just found having been pointed by Alexis the OHLC functions which are great but is there any way to have for eg the Todays High efs update on the completion of every bar.
            I typically trade of 10 or 15 min charts and it would be helpful if the high / low updated itself to stop having to re load the function.

            I have tried adding setPlotOnClose(true) but this has not helped.

            Any ideas suggestions greatly appreciated.

            Regards

            Ray

            Comment


            • #7
              Hello Ray,

              We've actually been discussing these formulas recently and will be creating some new versions that will update in real time without having to reload the formulas to update today's high for example. Stay tuned.
              Jason K.
              Project Manager
              eSignal - an Interactive Data company

              EFS KnowledgeBase
              JavaScript for EFS Video Series
              EFS Beginner Tutorial Series
              EFS Glossary
              Custom EFS Development Policy

              New User Orientation

              Comment


              • #8
                Ray,

                Are you wanting to be able to see the high and low of the day in continous realtime?

                Fibbgann
                Excellent book on JavaScript for beginners

                Comment


                • #9
                  Ray
                  While waiting for Jason to revise the various efs in the OHLC folder you have two solutions readily available to you to plot Today's High/Low in real time.

                  The first one is using the attached efs. Unlike TodayHigh.efs and TodayLow.efs that plot the lines also for past days this will only plot the lines for the current day and will not return the values in the Cursor Window. However as new highs/lows are posted it will update in real time.
                  NOTE: To run this efs you will need to have getTodayOHLC1.efs in the OHLC folder (please note the 1 in the file name). This file can be downloaded here.



                  The other solution is to run a second copy of firstXminsHL.efs that you already have and to set the minutes to the total for the trading day. For stocks for example that would be 390 minutes.
                  Alex
                  Attached Files

                  Comment


                  • #10
                    this may help...

                    function preMain() {
                    setStudyTitle("Day High/Low");
                    setCursorLabelName("Day's High", 0);
                    setCursorLabelName("Day's Low", 1);
                    setPriceStudy(true);
                    //setStudyMax(20);
                    //setStudyMin(0);
                    }

                    var vFlag = true;
                    var vHigh = null;
                    var vLow = null;
                    var vDay1 = null;
                    var vDay2 = null;

                    function main() {
                    var nState = getBarState();


                    if (nState == BARSTATE_NEWBAR) {
                    if (vDay1 == null) {
                    vDay2 = getDay();
                    } else {
                    vDay2 = vDay1;
                    }
                    vDay1 = getDay();
                    if (vDay1 != vDay2) {
                    vHigh = null;
                    vLow = null;
                    vFlag = true;
                    }
                    var vHour = getHour();
                    if (vHour >= 16) {
                    vFlag = false;
                    }
                    }

                    if (vFlag == true) {
                    if (vHigh == null) {
                    vHigh = high();
                    }
                    if (vLow == null) {
                    vLow = low();
                    }
                    vHigh = Math.max(high(), vHigh);
                    vLow = Math.min(low(), vLow);
                    }

                    drawTextRelative(-35, vHigh, "High is " + vHigh + " Low is " + vLow, Color.black, Color.red, Text.FRAME | Text.ONTOP | Text.BOLD | Text.CENTER | Text.RELATIVETORIGHT, null, null, "OS");
                    return new Array(vHigh, vLow);
                    }
                    Michael

                    Comment


                    • #11
                      Thank you all it works wonderfully now

                      Best regards
                      Ray

                      Comment

                      Working...
                      X