Announcement

Collapse
No announcement yet.

2006 May: Cross-Market Evaluations With Normalized Average True Range by John Forman

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 2006 May: Cross-Market Evaluations With Normalized Average True Range by John Forman

    File Name: Normalized_ATR.efs

    Description:
    This study is based on the May 2006 article, Cross-Market Evaluations With Normalized Average True Range, by John Forman.

    Formula Parameters:
    Periods: 14

    Notes:
    This formula requires eSignal version 7.9.1 or later. The related article is copyrighted material. If you are not a subscriber of Stocks & Commodities, please visit www.traders.com.


    Download File:
    Normalized_ATR.efs



    EFS Code:
    PHP Code:
    /***************************************
    Provided By : eSignal (c) Copyright 2006
    Description:  Cross-Market Evaluations With Normalized
                  Average True Range - by John Forman

    Version 1.0  03/03/2006

    Notes:
    * May 2006 Issue of Stocks and Commodities Magazine
    * Study requires version 7.9.1 or higher.


    Formula Parameters:                 Defaults:
    Periods                             14
    ***************************************/


    function preMain() {
        
    setStudyTitle("Normalized ATR");
        
    setCursorLabelName("N-ATR"0);
        
    setDefaultBarThickness(20);
        
        var 
    fp1 = new FunctionParameter("nPeriods"FunctionParameter.NUMBER);
            
    fp1.setName("N-ATR Periods");
            
    fp1.setLowerLimit(1);
            
    fp1.setDefault(14);
    }

    var 
    bVersion null;

    function 
    main(nPeriods) {    
        if (
    bVersion == nullbVersion verify();
        if (
    bVersion == false) return;    

        if (
    getCurrentBarCount() <= nPeriods) return null;
        
        return (
    atr(nPeriods0)/close(0))*100;
    }


    function 
    verify() {
        var 
    false;
        if (
    getBuildNumber() < 730) {
            
    drawTextAbsolute(535"This study requires version 7.9.1 or later."
                
    Color.whiteColor.blueText.RELATIVETOBOTTOM|Text.RELATIVETOLEFT|Text.BOLD|Text.LEFT,
                
    null13"error");
            
    drawTextAbsolute(520"Click HERE to upgrade.@URL=http://www.esignal.com/download/default.asp"
                
    Color.whiteColor.blueText.RELATIVETOBOTTOM|Text.RELATIVETOLEFT|Text.BOLD|Text.LEFT,
                
    null13"upgrade");
            return 
    b;
        } else {
            
    true;
        }
        
        return 
    b;

    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation
Working...
X