Announcement

Collapse
No announcement yet.

Trend Strength Indicator - Hellp

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

  • Trend Strength Indicator - Hellp

    Could some one help me in fixing the following efs code:

    var xRatio, xResult

    function preMain(){

    setPriceStudy(false);
    setStudyTitle("TrendStregthIndex");
    setShowTitleParameters(false);
    setShowCursorLabel(true);

    }

    var xRatio = false;
    var xResult = false;


    function main() {


    xRatio[0] = Math.abs((close() - (close(-10))) / atr(10));
    xResult = sma(sma(xRatio, 10), 100);

    return xResult;


    }

    ---
    Error message received is:

    line21: Parameter umber 1 of Function sma is invalid.
    line21: cant't convert sma(xRatio, 10) to an integer.

    Sample of efs is as per the attached /shown below file.
    Attached Files
Working...
X