Announcement

Collapse
No announcement yet.

Inside Bar Study & Alert

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

  • Inside Bar Study & Alert

    Hi everyone, I'm looking for a study that will indentify 'inside bars' defined as a bar whose high/low range is inside that of the previous bars high/low. I'm looking to do this on 60 minute bars. Does anyone have a study that can show this, and is it possible to get some kind of alert by email / popup / sound when this condition is generated?
    I'm extremely grateful for any help.
    Best regards,
    Joe

  • #2
    any ideas where I can find this study? if not freely available I can pay for it, need to id inside bars preferably with an email / sound alert. I have this working in Multi Charts as it comes already programmed, but I don't have forex data in Multi Charts and need to get this working in Esignal Forex. Is there anywhere / anyway I can get this to work in Esignal?
    Many thanks.

    Comment


    • #3
      J123,

      Check this post which discusses an inside bar efs.

      Comment


      • #4
        inside bar efs

        I need an inside bar efs, I read the post, made the changes as per Alexis's instructions. I get an error, I called tech support & the rep said sure we can do it for ya no problem. The rep couldn't get the code to work either. Help please!

        Comment


        • #5
          Re: inside bar efs

          Hi
          stevetaylor,

          Please post your code. If your having problems doing that, take a look at the FAQs link and the Posting Guidelines link below. You'll get more people willing to help if you post your code.


          Originally posted by stevetaylor
          I need an inside bar efs, I read the post, made the changes as per Alexis's instructions. I get an error, I called tech support & the rep said sure we can do it for ya no problem. The rep couldn't get the code to work either. Help please!

          Comment


          • #6
            I attached the file the tech support rep copied & pasted from the inside bar post from the link below, the efs includes the fixes per Alexis's instructions. The rep tried 3 times to get it to work & I am not tek savy enough to do this, I'm a trader, not a software guru... Jason has an outside bar efs. You have the code, why not post an inside bar efs? Inside bars have a much higher winning % & risk/reward ratio than outside bars.
            Thanks for your help...ST
            Attached Files

            Comment


            • #7
              Hi stevetaylor,

              I looked at the efs, one of the reasons it did not work was because the first line was not commented out as per Alex's instructions.

              I did not modify the Alerts, but did modify how the chart was marked. I also cleaned the efs up a bit, but otherwise left it similar to your uploaded version. The efs as-modified is posted below

              Hope this helps.

              Steve

              Originally posted by stevetaylor
              I attached the file the tech support rep copied & pasted from the inside bar post from the link below, the efs includes the fixes per Alexis's instructions. The rep tried 3 times to get it to work & I am not tek savy enough to do this, I'm a trader, not a software guru... Jason has an outside bar efs. You have the code, why not post an inside bar efs? Inside bars have a much higher winning % & risk/reward ratio than outside bars.
              Thanks for your help...ST
              PHP Code:
              /*Provided By: eSignal(c) Copyright 2007*/  // note, commented out using 'stream' comment technique

              //~ Another one-day pattern is the “inside bar” -- the high is below the previous high, and the low is 
              //~ above the previous low. These tend to occur in quieter periods of price consolidation and are sometimes associated 
              //~ with symmetrical triangles when no compelling force has yet been identified that will take the market in either direction.

              //~ Partially modified by S.Hare on 5 17 2010 from a file posted in the forum here 
              //~ ==>> "http://forum.esignal.com/showthread.php?threadid=32140&goto=newpost"

              function preMain() {
               
              setPriceStudy(true);
               
              setStudyTitle("Insidebar");
               
              setShowCursorLabel(false);
               
              setShowTitleParameters(false);
               
              setPlotType(PLOTTYPE_CIRCLE0);
               
              setDefaultBarThickness(10);
               var 
              fp1 = new FunctionParameter("cColor"FunctionParameter.COLOR);
               
              fp1.setName("Color");
               
              fp1.setDefault(Color.blue);
               var 
              fp2 = new FunctionParameter("nSize"FunctionParameter.NUMBER);
               
              fp2.setName("Size");
               
              fp2.setDefault(4);
               var 
              fp3 = new FunctionParameter("bEnable"FunctionParameter.BOOLEAN);
               
              fp3.setName("Enable Alerts");
               
              fp3.setDefault(true);
              }

              var 
              bInit false;
              var 
              bAlert false;
              function 
              main(cColornSizebEnable) {
               if (
              bInit == false) {
                
              setDefaultBarThickness(nSize0);
                
              setDefaultBarFgColor(cColor0);
                
              bInit true;
               }
               if (
              getBarState() == BARSTATE_NEWBAR) {
                if (
              bAlert==true){
                 if(
              bEnable==true){
                  
              Alert.playSound("pop.wav");
                  
              Alert.addToList(getSymbol(), "Insidebar"cColorColor.white);
                 }
                 var 
              range=formatPriceNumber((high(-1)-low(-1))/2)*1;
                 var 
              above=Math.max(high(-2),high(-1),high(0))+range;
                 var 
              below=Math.min(low(-2),low(-1),low(0))-range;
                 
              drawShapeRelative(-1aboveShape.DOWNTRIANGLEnullColor.blue, (Shape.ONTOP,Shape.TOP),getCurrentBarCount()+"a");
                 
              drawShapeRelative(-1belowShape.UPTRIANGLEnullColor.blue, (Shape.ONTOP,Shape.TOP),getCurrentBarCount()+"b");
                }
               }
               
              bAlert=(high(0) < high(-1) && low(0) > low(-1));
               
               if(
              bAlert){
                return 
              close(0);
               }

              Comment


              • #8
                It works, nice study, I like it.... Thank you

                Comment


                • #9
                  Hi stevetaylor,

                  Your welcome.

                  Steve

                  Comment


                  • #10
                    Great study, Steve. Is it possible to have the circles show up on a range chart instead of a minute chart?
                    Thanks,
                    Diane

                    Comment


                    • #11
                      Diane
                      FWIW range bars by definition should not have any inside bars since the Open of a bar must be [at least] one tick higher than the previous bar's High or lower than the previous bar's Low
                      Alex


                      Originally posted by Diane P
                      Great study, Steve. Is it possible to have the circles show up on a range chart instead of a minute chart?
                      Thanks,
                      Diane

                      Comment


                      • #12
                        Thanks, Alex. I appreciate the info.
                        Diane

                        Comment


                        • #13
                          Diane
                          My pleasure
                          Alex


                          Originally posted by Diane P
                          Thanks, Alex. I appreciate the info.
                          Diane

                          Comment


                          • #14
                            inside bar efs

                            Hello Steve
                            The blue up & down triangles are no longer showing up on my charts, only blue dots, the only triangle is just after settlement on the ES around 16:30. All other inside bars only have the dot. I copied & pasted the code again several times, but for some odd reason the triangles are no longer there, they just vanished today & aren't in the prior days like they had been....Any suggestions? This is what I have



                            /*Provided By: eSignal(c) Copyright 2007*/ // note, commented out using 'stream' comment technique

                            //~ Another one-day pattern is the “inside bar” -- the high is below the previous high, and the low is
                            //~ above the previous low. These tend to occur in quieter periods of price consolidation and are sometimes associated
                            //~ with symmetrical triangles when no compelling force has yet been identified that will take the market in either direction.

                            //~ Partially modified by S.Hare on 5 17 2010 from a file posted in the forum here
                            //~ ==>> "http://forum.esignal.com/showthread.php?threadid=32140&goto=newpost"

                            function preMain() {
                            setPriceStudy(true);
                            setStudyTitle("Insidebar");
                            setShowCursorLabel(false);
                            setShowTitleParameters(false);
                            setPlotType(PLOTTYPE_CIRCLE, 0);
                            setDefaultBarThickness(1, 0);
                            var fp1 = new FunctionParameter("cColor", FunctionParameter.COLOR);
                            fp1.setName("Color");
                            fp1.setDefault(Color.blue);
                            var fp2 = new FunctionParameter("nSize", FunctionParameter.NUMBER);
                            fp2.setName("Size");
                            fp2.setDefault(4);
                            var fp3 = new FunctionParameter("bEnable", FunctionParameter.BOOLEAN);
                            fp3.setName("Enable Alerts");
                            fp3.setDefault(true);
                            }

                            var bInit = false;
                            var bAlert = false;
                            function main(cColor, nSize, bEnable) {
                            if (bInit == false) {
                            setDefaultBarThickness(nSize, 0);
                            setDefaultBarFgColor(cColor, 0);
                            bInit = true;
                            }
                            if (getBarState() == BARSTATE_NEWBAR) {
                            if (bAlert==true){
                            if(bEnable==true){
                            Alert.playSound("pop.wav");
                            Alert.addToList(getSymbol(), "Insidebar", cColor, Color.white);
                            }
                            var range=formatPriceNumber((high(-1)-low(-1))/2)*1;
                            var above=Math.max(high(-2),high(-1),high(0))+range;
                            var below=Math.min(low(-2),low(-1),low(0))-range;
                            drawShapeRelative(-1, above, Shape.DOWNTRIANGLE, null, Color.blue, (Shape.ONTOP,Shape.TOP),getCurrentBarCount()+"a");
                            drawShapeRelative(-1, below, Shape.UPTRIANGLE, null, Color.blue, (Shape.ONTOP,Shape.TOP),getCurrentBarCount()+"b");
                            }
                            }
                            bAlert=(high(0) < high(-1) && low(0) > low(-1));

                            if(bAlert){
                            return close(0);
                            }
                            }

                            Comment


                            • #15
                              Hi stevetaylor,

                              The arrows are still there, they are just off the charts. I should not have used the formatPriceNumber() method in my range calculation. This caused what you observed and since it was not required, I removed it. The efs now works as expected.

                              I also revised the efs to minimize the number of triangles drawn on the chart. This is an efficiency consideration as the more drawing objects you have on the chart, more computer resources are required to refresh them. See the attached file. I am also placing a copy in my fileshare.
                              Attached Files

                              Comment

                              Working...
                              X