Announcement

Collapse
No announcement yet.

StochDoubleD.efs

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

  • StochDoubleD.efs

    File Name: StochDoubleD.efs

    Description:
    Stochastic study with two %D lines.

    Formula Parameters:
    nKLength: Default is 14
    nKsmoothing: Default is 1
    nDlength1: Default is 9
    nDlength2: Default is 18
    nUpperBand: Default is 80
    nLowerBand: Default is 20

    Notes:
    The two stochastic studies use the same inputs for nKLength and nKsmoothing.

    Download File:
    StochDoubleD.efs




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

    function preMain() {
        
    setStudyTitle("Stochastic Double %D ");
        
    setCursorLabelName("\%D1"0);
        
    setCursorLabelName("\%D2"1);
        
    setDefaultBarFgColor(Color.blue0);
        
    setDefaultBarFgColor(Color.navy1);
    }

    var 
    study1 null;
    var 
    study2 null;

    function 
    main(nKLengthnKsmoothingnDlength1nDlength2nUpperBandnLowerBand) {
        if (
    nKLength == nullnKLength 14;
        if (
    nKsmoothing == nullnKsmoothing 1;
        if (
    nDlength1 == nullnDlength1 9;
        if (
    nDlength2 == nullnDlength2 18;
        if (
    nUpperBand == nullnUpperBand 80;
        if (
    nLowerBand == nullnLowerBand 20;
        
        if (
    study1 == null || study2 == null) {
            
    study1 = new StochStudy(nKLengthnKsmoothingnDlength1);
            
    study2 = new StochStudy(nKLengthnKsmoothingnDlength2);
            
    addBand(nUpperBandPS_SOLID1Color.lightgrey"upper");
            
    addBand(nLowerBandPS_SOLID1Color.lightgrey"lower");
        }
        
        var 
    vD1 study1.getValue(StochStudy.SLOW);
        if (
    vD1 == null) return;
        var 
    vD2 study2.getValue(StochStudy.SLOW);
        if (
    vD2 == null) return;
        
        return new Array(
    vD1vD2);

    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