Announcement

Collapse
No announcement yet.

Request for EFS calculation of HL difference

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

  • Request for EFS calculation of HL difference

    Hello,

    I'm new to this forum and EFS tools but been using E-Signal for a while.

    My question is pretty simple: Is there a way to build an EFS to calculate the difference between the high and the low of the current bar (i.e. whichever bar the cursor is on)?

    Thanks for your help,

    Todd

  • #2
    Todd
    The enclosed script will write the value of High-Low to the Cursor Window
    Hope this helps
    Alex



    PHP Code:
    function preMain() {
        
    setPriceStudy(true);
        
    setStudyTitle("HiLo");
        
    setCursorLabelName("HiLo");
          
    }
    function 
    main() {

    var 
    formatPriceNumber(high(0)-low(0));

    return 
    x+"";

    Comment


    • #3
      Alex, you are incredible! Thank you!! This works great.

      I do have one question. I've noticed that SetStudyTitle places the name in the chart window, which I don't want. So I set the value to " ". This gets rid of the name in the chart window but now leaves a blank space for the study in the Remove and Reload menu choices. Is there any work around for this?

      Thanks again,

      Todd

      Comment


      • #4
        Todd
        The only alternative is to right click the chart, select Properties and uncheck Draw Study Titles. This however is an all or nothing solution meaning that all the study titles will be removed from the chart.
        Alex

        Comment


        • #5
          Thanks Alex.

          Comment

          Working...
          X