Announcement

Collapse
No announcement yet.

new study help

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

  • new study help

    I'm been fooling around with the prior day's closing (PDC) price and would like to know if in the Wizard is it possible to create a study that would show me if the PDC price was overlapped by the next days price movement. Bruce

    P.S. using RTH data on the indices and maybe paint the bar if it overlapped the PDC.

  • #2
    Hello InvGrp2,

    Yes this should be possible. The condition in the wizard might look like the following.

    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


    • #3
      Thanks for the info and I did create the study but it paints ALL the bars red including the bars that didn't met the criteria.

      Any suggestions?

      Bruce

      P.S. I even tired doing one for when the PDC was lower than the H/L and one for when it was higher than both (H/L) but its painted some of the bars black.
      Attached Files

      Comment


      • #4
        I played with it again and it works now but the bars that don't overlap are now black.

        How do I get these bars to be the default color of lime?

        If I could get the bars to appear that should do it.

        Bruce
        Attached Files

        Comment


        • #5
          Bruce
          Add a Set2 with the condition shown below. That will paint the price bar in lime whenever the condition in Set1 returns false
          Alex

          Comment


          • #6
            Its great now.

            One last question, how do I change the color of the bars can't find it anywhere).

            Bruce

            Comment


            • #7
              I figured it out........it was in the edit/studies and not in the properties.

              Thanks again.

              bruce

              Comment


              • #8
                Sorry, one more thing.

                Is it possible to create a back-test that would count the number of days the PDC was overlapped?

                It could even be as simple as placing and order and exiting at the same time....just would like to know the number of days the PDC was hit.

                Bruce

                Comment


                • #9
                  Hello Bruce,

                  This could be done, but not through the wizard. You would need to modify the formula in the EFS Editor. Add a global variable and set it's initial value to 0. Then inside your overlap condition you would increment this variable by a value of 1 for each bar where the overlap of the PDC was true.

                  PHP Code:
                  var nCntr 0;  // global var

                  function onAction1() {
                      
                  setPriceBarColor(Color.RGB(155,0,0));
                      
                  vLastAlert 1;
                      
                  nCntr++;

                  You could then use nCntr for additional conditions. Keep in mind that if you use this logic for real time processing it will get incremented on each tick where the condition is true. If you want to prevent that, then you should modify the study to only check the overlap condition at BARSTATE_NEWBAR and change the condition to look at the previous bar's (bar -1) high and low relative to the PDC from bar -2.
                  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

                  Working...
                  X