Announcement

Collapse
No announcement yet.

OBV Donchian

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

  • OBV Donchian

    Hello All;
    Is there a way to put a Donchian channel over an OBV indicator?
    I'm just looking to see if the OBV is hitting a NEW high.
    Thanks for your time...Greg

  • #2
    Re: OBV Donchian

    Greg
    You can do that using the Donchian Channel functions to which you pass the obv() function as the source.
    In the EFS KnowledgeBase article on the Donchian Channels you will find a specific example for a single line study on study indicator. Just replace the hl2() function shown in that example with obv()
    Hope this helps
    Alex


    Originally posted by gwika
    Hello All;
    Is there a way to put a Donchian channel over an OBV indicator?
    I'm just looking to see if the OBV is hitting a NEW high.
    Thanks for your time...Greg

    Comment


    • #3
      OBV Donchian

      Alex;
      WOW fast response, Thank you.
      I did what you said but the formula comes up empty.
      Here is the formula.
      What am I doing wrong?
      Greg
      //{{EFSWizard_Description
      //
      // This formula was generated by the Alert Wizard
      //
      //}}EFSWizard_Description


      //{{EFSWizard_Declarations
      var vOBV = new OBVStudy();
      var vDonchian = new DonchianStudy(20, 0);
      var vLastAlert = -1;
      //}}EFSWizard_Declarations


      function preMain() {
      /**
      * This function is called only once, before any of the bars are loaded.
      * Place any study or EFS configuration commands here.
      */
      //{{EFSWizard_PreMain
      setPriceStudy(false);
      setStudyTitle("");
      setCursorLabelName("obv", 0);
      setDefaultBarStyle(PS_SOLID, 0);
      setDefaultBarFgColor(Color.red, 0);
      setDefaultBarThickness(1, 0);
      setPlotType(PLOTTYPE_LINE, 0);
      //}}EFSWizard_PreMain

      }

      function main() {
      /**
      * The main() function is called once per bar on all previous bars, once per
      * each incoming completed bar, and if you don't have 'setComputeOnClose(true)'
      * in your preMain(), it is also called on every tick.
      */

      //{{EFSWizard_Expressions
      //{{EFSWizard_Expression_1
      //}}EFSWizard_Expression_1

      //}}EFSWizard_Expressions


      //{{EFSWizard_Return
      return ;
      //}}EFSWizard_Return

      }

      function postMain() {
      /**
      * The postMain() function is called only once, when the EFS is no longer used for
      * the current symbol (ie, symbol change, chart closing, or application shutdown).
      */
      }

      //{{EFSWizard_Actions
      //{{EFSWizard_Action_1
      function onAction1() {
      vLastAlert = 1;
      }
      //}}EFSWizard_Action_1

      //}}EFSWizard_Actions

      Comment


      • #4
        Re: OBV Donchian

        Greg
        Click on the Donchian Channel link I provided in my previous reply. In that article of the EFS KnowledgeBase you will find a specific (and complete) example of a single line study on study indicator using the Donchian Channels.
        Copy it to the Formula Editor (not the Formula Wizard) and follow the instructions I provided earlier then save the efs.
        Alex


        Originally posted by gwika
        Alex;
        WOW fast response, Thank you.
        I did what you said but the formula comes up empty.
        Here is the formula.
        What am I doing wrong?
        Greg
        //{{EFSWizard_Description
        //
        // This formula was generated by the Alert Wizard
        //
        //}}EFSWizard_Description


        //{{EFSWizard_Declarations
        var vOBV = new OBVStudy();
        var vDonchian = new DonchianStudy(20, 0);
        var vLastAlert = -1;
        //}}EFSWizard_Declarations


        function preMain() {
        /**
        * This function is called only once, before any of the bars are loaded.
        * Place any study or EFS configuration commands here.
        */
        //{{EFSWizard_PreMain
        setPriceStudy(false);
        setStudyTitle("");
        setCursorLabelName("obv", 0);
        setDefaultBarStyle(PS_SOLID, 0);
        setDefaultBarFgColor(Color.red, 0);
        setDefaultBarThickness(1, 0);
        setPlotType(PLOTTYPE_LINE, 0);
        //}}EFSWizard_PreMain

        }

        function main() {
        /**
        * The main() function is called once per bar on all previous bars, once per
        * each incoming completed bar, and if you don't have 'setComputeOnClose(true)'
        * in your preMain(), it is also called on every tick.
        */

        //{{EFSWizard_Expressions
        //{{EFSWizard_Expression_1
        //}}EFSWizard_Expression_1

        //}}EFSWizard_Expressions


        //{{EFSWizard_Return
        return ;
        //}}EFSWizard_Return

        }

        function postMain() {
        /**
        * The postMain() function is called only once, when the EFS is no longer used for
        * the current symbol (ie, symbol change, chart closing, or application shutdown).
        */
        }

        //{{EFSWizard_Actions
        //{{EFSWizard_Action_1
        function onAction1() {
        vLastAlert = 1;
        }
        //}}EFSWizard_Action_1

        //}}EFSWizard_Actions

        Comment


        • #5
          OBV Donchian

          Alex;
          Got it to work, many thanks....
          Now how do I thicken the Donchian Line???
          I promise this will be my last question ;o)
          Greg

          Comment


          • #6
            Re: OBV Donchian

            Greg
            To do that you will need to add to the script a preMain() function in which you set all the study properties such as the title, the names for the labels of the Cursor Window, the color, thickness, style of the plot(s), etc. As an example see the basicDonchian.efs which is in the EFS2 Basic subfolder of Formulas located in your eSignal directory.
            For detailed information (complete with examples) on how to format a study see the section 3.3 in the Beginner's Tutorial 3 which is available here. I would also suggest reviewing the other Tutorials available at the same link.
            Alex


            Originally posted by gwika
            Alex;
            Got it to work, many thanks....
            Now how do I thicken the Donchian Line???
            I promise this will be my last question ;o)
            Greg

            Comment

            Working...
            X