Announcement

Collapse
No announcement yet.

KeltnerMCEmaBandsAdj.efs

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

  • KeltnerMCEmaBandsAdj.efs

    File Name: KeltnerMCEmaBandsAdj.efs

    Description:
    Keltner study with bands based on a fixed multiplier constant expressed as a percentage of the basis line above and below the basis line.

    Formula Parameters:
    nInputLength: Default is 8 (length for EMA).
    nMultiplierConstant: Default is 0.013 (number may also be entered as 1.3).

    Notes:


    Download File:
    KeltnerMCEmaBandsAdj.efs




    EFS Code:
    PHP Code:
    /*********************************
    Provided By : eSignal. (c) Copyright 2003
    *********************************/

    function preMain() {
        
    setPriceStudy(true);    
        
    setStudyTitle("EMA Keltner w/ Constant Bands");
        
    setCursorLabelName("K-Upper"0);
        
    setCursorLabelName("K-Basis"1);
        
    setCursorLabelName("K-Lower"2);

        
    setDefaultBarFgColor(Color.blue0); // upper
        
    setDefaultBarFgColor(Color.red1); // basis
        
    setDefaultBarFgColor(Color.blue2); // lower
    }


    function 
    main(nInputLengthnMultiplierConstant) {
        if(
    nInputLength == null)
            
    nInputLength 8;
        if(
    nInputLength <= 0)
            
    nInputLength 8;
        if (
    nMultiplierConstant != null) {
            if (
    nMultiplierConstant 1nMultiplierConstant /= 100;
            
    nMultiplierConstant nMultiplierConstant*1;
        } else {
            
    nMultiplierConstant 0.013;
        }

        var 
    dKeltnerBasiscall("/Library/KeltnerEMA.efs"nInputLength);
        if(
    dKeltnerBasis == null) return;

        return new Array(
    dKeltnerBasis + (nMultiplierConstant dKeltnerBasis), dKeltnerBasisdKeltnerBasis - (nMultiplierConstant dKeltnerBasis));

    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