Announcement

Collapse
No announcement yet.

DSS Bressert (Double Smoothed Stochastic)

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

  • DSS Bressert (Double Smoothed Stochastic)

    File Name: DSS_Bressert.efs

    Description:
    DSS Bressert (Double Smoothed Stochastic)

    Formula Parameters:
    pds : 10
    TriggerLen : 5
    Overbought : 80
    Oversold : 20
    EMAlen : 9


    Notes:
    Double Smoothed Stochastics (DSS) is designed by William Blaw.
    It attempts to combine moving average methods with oscillator principles.


    Download File:
    DSS_Bressert.efs



    EFS Code:
    PHP Code:
    /*********************************
    Provided By:  
        eSignal (Copyright c eSignal), a division of Interactive Data 
        Corporation. 2009. All rights reserved. This sample eSignal 
        Formula Script (EFS) is for educational purposes only and may be 
        modified and saved under a new file name.  eSignal is not responsible
        for the functionality once modified.  eSignal reserves the right 
        to modify and overwrite this EFS file with each new release.

    Description:        
        DSS Bressert (Double Smoothed Stochastic)
        
    Version:            1.0  04/10/2009

    Formula Parameters:                     Default:
        pds                                 10
        TriggerLen                          5
        Overbought                          80
        Oversold                            20
        EMAlen                              9

    Notes:
        Double Smoothed Stochastics (DSS) is designed by William Blaw. 
        It attempts to combine moving average methods with oscillator principles. 
    **********************************/
    var fpArray = new Array();
    var 
    bInit false;

    function 
    preMain() {
        
    setStudyTitle("DSS Bressert");
        
    setCursorLabelName("DSS"0);
        
    setCursorLabelName("Trigger"1);
        
    setDefaultBarFgColor(Color.brown0);
        
    setDefaultBarFgColor(Color.red1);
        
    setStudyMax(101);
        
    setStudyMin(-1);
        var 
    0;
        
    fpArray[x] = new FunctionParameter("pds"FunctionParameter.NUMBER);
        
    with(fpArray[x++]) {
            
    setLowerLimit(1);
            
    setDefault(10);
        }
        
    fpArray[x] = new FunctionParameter("TriggerLen"FunctionParameter.NUMBER);
        
    with(fpArray[x++]) {
            
    setLowerLimit(1);
            
    setDefault(5);
        }
        
    fpArray[x] = new FunctionParameter("Overbought"FunctionParameter.NUMBER);
        
    with(fpArray[x++]) {
            
    setLowerLimit(1);
            
    setDefault(80);
        }
        
    fpArray[x] = new FunctionParameter("Oversold"FunctionParameter.NUMBER);
        
    with(fpArray[x++]) {
            
    setLowerLimit(1);
            
    setDefault(20);
        }
        
    fpArray[x] = new FunctionParameter("EMAlen"FunctionParameter.NUMBER);
        
    with(fpArray[x++]) {
            
    setLowerLimit(1);
            
    setDefault(9);
        }   
    }

    var 
    xDSS null;
    var 
    xTrigger null;

    function 
    main(pdsTriggerLenEMAlenOverboughtOversold){
    var 
    nBarState getBarState();
        if (
    nBarState == BARSTATE_ALLBARS) {
            if (
    pds == nullpds 10;
            if (
    TriggerLen == nullTriggerLen 5;
            if (
    Overbought == nullOverbought 80;
            if (
    Oversold == null)    Oversold 20;
            if (
    EMAlen == nullEMAlen 9;
        }
        if (
    bInit == false) {
            
    addBand(OverboughtPS_SOLID1Color.blue0);
            
    addBand(OversoldPS_SOLID1Color.blue1);            
            
    xDSS ema(EMAlen,stochK(pds,1,1,ema(EMAlenstochK(pds,1,1))));
            
    xTrigger ema(TriggerLen,xDSS);
            
    bInit true;
        }
        var 
    nDSS xDSS.getValue(0);
        var 
    nTrigger xTrigger.getValue(0);
        if(
    nDSS==null||nTrigger==null) return;
        return new Array(
    nDSS,nTrigger);

Working...
X