Announcement

Collapse
No announcement yet.

How to show study value without chart

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

  • How to show study value without chart

    Hi, I am trying to get the 5 daily ATR value on an intraday price chart without drawing the actual line. I am guessing there is a preMain method for this....
    my current script is

    function preMain() {

    setPriceStudy(true);
    setStudyTitle("ATRDay");
    }

    function main() {
    x = atr(5,inv("D"));

    return x;
    }

    I tried setting the line color to white to match the background but that also changes the text color to white...

  • #2
    Re: How to show study value without chart

    haseko
    Use setShowSeries() [see the related article in the EFS KnowledgeBase for the syntax and examples] or alternatively convert the returned value to a string which will still display in the Data Window without actually plotting it. With regards to the latter if you search the forum you will find several ways to do this as the topic has been covered before
    Alex


    Originally posted by haseko
    Hi, I am trying to get the 5 daily ATR value on an intraday price chart without drawing the actual line. I am guessing there is a preMain method for this....
    my current script is

    function preMain() {

    setPriceStudy(true);
    setStudyTitle("ATRDay");
    }

    function main() {
    x = atr(5,inv("D"));

    return x;
    }

    I tried setting the line color to white to match the background but that also changes the text color to white...

    Comment


    • #3
      Hi Alex, thanks, I finally figured it out. I found the .toFixed() function in one of the introductory tutorials.

      Where is the best place to search for functions? I searched google, forums for a how to convert value to string and only came across .toString() initially which produced [object series]. I am sure the resources are here within support but the search results haven't been helpful.

      I also tried the setShowSeries example but it produced two sma lines, I was only looking for values and I couldn't figure out if there is a way to do this with this function.

      I am not a programmer and my knowledge on javascript and efs comes from this site alone.
      Last edited by haseko; 04-26-2012, 02:54 AM.

      Comment

      Working...
      X