Announcement

Collapse
No announcement yet.

Previous Day High-low.efs

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

  • Previous Day High-low.efs

    Hello

    I have modified this previous day high low to show only yesterdays high/low bar after configuring it.

    How can I extend the "plotlines" out 3-5 digits to the right so that a solid line projects to the right. On a minute chart the lines will extend to the right as a new bar is formed. However, on a daily chart it stays just for that day. Can this be done??

    Any tips?

    TIA

    Pogman

    Attached Files
    Last edited by Pogman; 11-13-2007, 11:17 AM.

  • #2
    Re: Previous Day High-low.efs

    Pogman
    You can do that using the drawLineRelative() function (see the link to the EFS KnowledgeBase article for the complete syntax of the function)
    You can find a complete example in this thread. In your case you would simply need to substitute the y1 and y2 parameters with nHigh [for the line at the High) and with nLow [for the line at the Low)
    Alex



    Originally posted by Pogman
    Hello

    I have modified this previous day high low to show only yesterdays high/low bar after configuring it.

    How can I extend the "plotlines" out 3-5 digits to the right so that a solid line projects to the right. On a minute chart the lines will extend to the right as a new bar is formed. However, on a daily chart it stays just for that day. Can this be done??

    Any tips?

    TIA

    Pogman

    Comment


    • #3
      Thanks for your help Alex.

      I found another efs that I have attached. it is the PreviousDayDailyBars found in the formula folder.

      Does anyone know if this one be refigured to do Daily, Weekly lines or is there another efs that already does the Previous Day OHLC and plots it on the DAILY? I have searched the forums and cannot find an OHLC for the Daily efs.

      Thanks again.

      Pogman
      Attached Files

      Comment


      • #4
        Pogman
        With regards to the formula you posted you can change the following sections of code to adapt it to your needs
        PHP Code:
        if(isMonthly() || isWeekly() || isDaily())
            return; 
        This section checks if the interval of the chart is Daily or Weekly or Monthly and if any one condition evaluates to true it stops the script from running any further. You can remove any one (or all) of those conditions as needed.
        Once you have done that to change the external interval that is being referenced by the script replace the "D" in each of the following
        PHP Code:
        xOpen  open(inv("D"));
        xHigh  high(inv("D"));
        xLow   low(inv("D"));
        xClose close(inv("D")); 
        with either "W" for Weekly or "M" for Monthly.
        You can also use as examples the w_PivotPointAll.efs and m_PivotPointAll.efs scripts in the Pivots folder which are specific for Weekly and Monthly pivots.
        Alex

        PS. When starting a new subject please create a new thread.



        Originally posted by Pogman
        Thanks for your help Alex.

        I found another efs that I have attached. it is the PreviousDayDailyBars found in the formula folder.

        Does anyone know if this one be refigured to do Daily, Weekly lines or is there another efs that already does the Previous Day OHLC and plots it on the DAILY? I have searched the forums and cannot find an OHLC for the Daily efs.

        Thanks again.

        Pogman

        Comment


        • #5
          HI Alex

          Thanks for the tips. It worked. I have attached it for anyone who wants it. Sorry about posting a new thread with the old one but I thought they were close .

          One other question on the attached efs.


          In the image I get multiple OHLC bars. If I scroll an advanced chart to show more data the efs will automatically switch to all bars. If I leave everything and touch nothing the efs works perfectly. How can I anchor it only to the previous last bar on the daily so that it works all the time???

          Thanks

          Pogman

          Attached Files
          Last edited by Pogman; 11-13-2007, 03:47 PM.

          Comment


          • #6
            Pogman
            Add the following line of code
            PHP Code:
            if(getBarState()==BARSTATE_ALLBARSbCurrentDay false
            as the first line of the main function and it should solve your problem.
            Alex



            Originally posted by Pogman
            HI Alex

            Thanks for the tips. It worked. I have attached it for anyone who wants it. Sorry about posting a new thread with the old one but I thought they were close .

            One other question on the attached efs.


            In the image I get multiple OHLC bars. If I scroll an advanced chart to show more data the efs will automatically switch to all bars. If I leave everything and touch nothing the efs works perfectly. How can I anchor it only to the previous last bar on the daily so that it works all the time???

            Thanks

            Pogman

            Comment


            • #7
              HI Alex

              Worked as you said. Thanks. And have a great day.

              Pogman
              Attached Files

              Comment


              • #8
                Pogman
                You are most welcome and thank you for letting me know it worked.
                Alex


                Originally posted by Pogman
                HI Alex

                Worked as you said. Thanks. And have a great day.

                Pogman

                Comment

                Working...
                X