Announcement

Collapse
No announcement yet.

Live Price Indicator - Extending the right margin price across the page

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

  • Live Price Indicator - Extending the right margin price across the page

    Hi All!

    Its my very first post/question and I hope someone can help. I was sent here by eS tech support.

    The requirement is fairly simple:
    On the live chart, as price (forex) is diplayed in the right margin, is there a way I can have the price 'connected' to a dot/dash line that is extended from the right margin across the page? Not just limted to the right margin?

    The reason is that with using a very large, very high res screen, I am able to fit a number of charts onto the same screen, but with them scaled/zoomed back to view enough of the chart, making a quick visual reference to the price and the position on the chart, is sometimes tricky. A line across would help.

    Any help/guidance appreciated.

    HP

  • #2
    HP
    Assuming I understood you correctly that can be easily done using the addBand() function as you can see in the very basic example illustrated in the image enclosed below (see the linked article in the EFS KnowledgeBase for the description and syntax of this function) which you can modify to suit your needs.
    Also search the forum and you will find other examples/ways of accomplishing this as the topic has been covered before
    Alex




    Originally posted by HedgePig View Post
    Hi All!

    Its my very first post/question and I hope someone can help. I was sent here by eS tech support.

    The requirement is fairly simple:
    On the live chart, as price (forex) is diplayed in the right margin, is there a way I can have the price 'connected' to a dot/dash line that is extended from the right margin across the page? Not just limted to the right margin?

    The reason is that with using a very large, very high res screen, I am able to fit a number of charts onto the same screen, but with them scaled/zoomed back to view enough of the chart, making a quick visual reference to the price and the position on the chart, is sometimes tricky. A line across would help.

    Any help/guidance appreciated.

    HP

    Comment


    • #3
      Hi Alexis and thank you for the quick reply.
      That is exactly what I am after, but having not ever scripted my own EFS before is there a step-by-step guide I can look out for? I will assume its in here and will start my search, but any pointers will be well received thank you.

      Neil

      Comment


      • #4
        Neil
        Copy the contents of the following PHP box, then open the Script Editor and paste the contents in it.
        Save the file with a name of your choice and apply it to the chart
        PHP Code:
        function preMain(){
            
        setPriceStudy(true);
        }
        function 
        main(){
            
        addBand(close(0), PS_DOT2Color.red"Close");

        If - as you indicate - you are unfamiliar with programming in EFS then you may want to review the JavaScript for EFS video series and the Core JavaScript Reference Guide. These will provide you with a thorough introduction to programming in JavaScript which is at the foundation of EFS. Then go through the EFS KnowledgeBase and study the Help Guides and Tutorials which will provide you with the specifics of EFS.
        Alex


        Originally posted by HedgePig View Post
        Hi Alexis and thank you for the quick reply.
        That is exactly what I am after, but having not ever scripted my own EFS before is there a step-by-step guide I can look out for? I will assume its in here and will start my search, but any pointers will be well received thank you.

        Neil

        Comment


        • #5
          Legend,
          I just wrote my first script!
          (How the hell these guys write some of the stuff is nothing short of miraculous)
          I don't know what I am searching for is the trouble.
          In other studies, by double-clicking them I get to bring up an edit screen where I can change line style/thickness/colour etc.
          In this case I now have a dotted grey line, which is 'fine', except I would like to be able to modify its look on the fly.

          Where is the tutorial on creating a colour/line/pattern script please?

          Neil

          Comment


          • #6
            Neil
            The simplest way to add the options to change the parameters is to use the Function Parameter object (see the link to the related article in the EFS KnowledgeBase for the description, syntax and examples)
            The following image illustrates the steps to add an option to change the color



            The following image illustrates the steps to add an option to control the thickness



            The following image illustrates the steps to add the option to change the pen style (refer to the addBand article I indicated in a prior reply)



            I have already pointed you to the locations where you can find the tutorials on JavaScript and EFS (although these will not necessarily be on a specific topic as you asked).
            There is nothing "miraculous" about any of this. JavaScript (and EFS as a consequence) is just a language with is own set of rules and exceptions and logic. Spend some time learning it - starting from the basics and preferably by concept rather than content - and you will be able to code in less time than you think
            Alex


            Originally posted by HedgePig View Post
            Legend,
            I just wrote my first script!
            (How the hell these guys write some of the stuff is nothing short of miraculous)
            I don't know what I am searching for is the trouble.
            In other studies, by double-clicking them I get to bring up an edit screen where I can change line style/thickness/colour etc.
            In this case I now have a dotted grey line, which is 'fine', except I would like to be able to modify its look on the fly.

            Where is the tutorial on creating a colour/line/pattern script please?

            Neil

            Comment

            Working...
            X