Announcement

Collapse
No announcement yet.

Placing an arrow on price bar

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

  • Placing an arrow on price bar

    Can someone please show me the code that is needed to place a green arrow above the high or a red arrow below the low if a certain condition is met.
    Thanks
    Yoda
    P.S.
    i dont neccesarily need an arrow it can be a letter or an x

  • #2
    function preMain(){
    setPriceStudy(true);
    }

    function main(){

    drawShapeRelative(0, high(), Shape.DOWNARROW, "", Color.red, Shape.TOP);
    return;
    }

    Comment


    • #3
      Thanks dloomis,
      Can you please give me a small list of the shapes that are available and their symbols such as circle and box
      does shape.top refer to the fact that the arrow is shaped like a top?

      Once again thanks for all your help. the people here are truly outstanding when it comes to helping others out.
      Yoda

      Comment


      • #4
        I just noticed myself that in the EFS Reference Guide forum that Matt Gunderson has listed the shapes available in the first post under the thread "Drawing Images, Shapes, and Text with EFS ".

        This should provide you with a good reference point.

        Comment


        • #5
          yoda
          Also a complete EFS help file is available - courtesy of Chris Kryza - in both HTML format (CHM) or in Standard Windows Help format (HLP) at the following link

          Alex

          Comment


          • #6
            Thanks guys

            Comment


            • #7
              Whenever i place an arrow or shape statement in my efs the shape gets contiually put below or above my bar while the bar is forming. Isthere a way for this just to print one time at the end of the bar. Obviuosly when you first add the efs to a chart for all previous bars it will print it just once but during any live bars it keeps putting the arrow below my symbol everytimr i get get a new low tick for the bar so sometimes i vave 5-6 arrows below when all i want is one.
              Thanks
              yoda

              Comment


              • #8
                Re: Reply to post 'Placing an arrow on price bar'

                yoda
                Have you tried giving it an ID flag.
                The other solution would be to set it to compute on close only.
                Alex

                Comment


                • #9
                  alexis,
                  What exactly is an id flag and what statement would i use use to tell it it to compute on close only which is actually all i need since everything else works fine. The efs was so busy printing arrows that it actually slowed down my entire esignal platform.
                  Thanks

                  Comment


                  • #10
                    yoda
                    the compute on close statement is
                    setComputeOnClose()
                    and should be put in premain().

                    As to the ID you may want to look at the EFS help file compiled by Chris as it provides all the necessary information (and examples) regarding shapes, images, text and their placement on the chart.

                    Alex

                    Comment


                    • #11
                      thanks alexis,
                      right nowmy efs also does color coding of bars and i would still like that to compute during the bar. Is there any way i can do both in the same efs or do i need 2 separate studies
                      yoda

                      Comment


                      • #12
                        yoda
                        Here is what I mean with using an ID (or TagName). The following should draw a blue up arrow above the high of the current bar.

                        drawShapeRelative(0, high(), Shape.UPARROW , null, Color.blue, Shape.TOP,1);

                        The last value ie ,1); is the ID. As new highs get posted the arrow will redraw but because it uses the same ID as the previous one(s) it will only draw the last one.

                        For a down arrow you could then use the following

                        drawShapeRelative(0, low(), Shape.DOWNARROW , null, Color.red, Shape.BOTTOM,2);

                        The ID here is different from the one above so that you can have plotted at the same time an up and down arrow.
                        This way you should not need to setComputeOnClose or have a separate efs.
                        Hope this resolves your problem

                        Alex
                        Last edited by ACM; 03-19-2003, 01:37 PM.

                        Comment


                        • #13
                          thanks alexis,
                          would there be any reason when i apply the shape text to my efs that it would slow up my esignal. My cursor moves slower over the charts and its hard to drag my charts. Maybe its just my computer
                          yoda

                          Comment


                          • #14
                            Re: Reply to post 'Placing an arrow on price bar'

                            yoda
                            Not that I know of. I have a number of efs all plotting arrows, shapes and
                            text on the same chart and I have not seen any performance penalty.
                            Alex

                            Comment


                            • #15
                              Originally posted by yodajudge
                              Whenever i place an arrow or shape statement in my efs the shape gets contiually put below or above my bar while the bar is forming. Isthere a way for this just to print one time at the end of the bar. Obviuosly when you first add the efs to a chart for all previous bars it will print it just once but during any live bars it keeps putting the arrow below my symbol everytimr i get get a new low tick for the bar so sometimes i vave 5-6 arrows below when all i want is one.
                              Thanks
                              yoda
                              you have to set it to compute on the close of the bar, right now your EFS is computing on every tick and that is why you are getting all the arrows

                              I know this is an old post and don't know if you will see this but just wanted to help others with it if they search on arrows

                              Comment

                              Working...
                              X