Announcement

Collapse
No announcement yet.

Ergodic Candlestick Oscillator

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

  • Ergodic Candlestick Oscillator

    File Name: ECO.efs

    Description:
    ECO (Blau`s Ergodic Candlestick Oscillator)

    Formula Parameters:
    Number To Calculate EMA: 32
    Number To Calculate vEMA : 12


    Notes:
    We call this one the ECO for short, but it will be listed on the indicator list
    at W. Blau╥s Ergodic Candlestick Oscillator. The ECO is a momentum indicator.
    It is based on candlestick bars, and takes into account the size and direction
    of the candlestick "body". We have found it to be a very good momentum indicator,
    and especially smooth, because it is unaffected by gaps in price, unlike many other
    momentum indicators.
    We like to use this indicator as an additional trend confirmation tool, or as an
    alternate trend definition tool, in place of a weekly indicator. The simplest way
    of using the indicator is simply to define the trend based on which side of the "0"
    line the indicator is located on. If the indicator is above "0", then the trend is up.
    If the indicator is below "0" then the trend is down. You can add an additional
    qualifier by noting the "slope" of the indicator, and the crossing points of the slow
    and fast lines. Some like to use the slope alone to define trend direction. If the
    lines are sloping upward, the trend is up. Alternately, if the lines are sloping
    downward, the trend is down. In this view, the point where the lines "cross" is the
    point where the trend changes.
    When the ECO is below the "0" line, the trend is down, and we are qualified only to
    sell on new short signals from the Hi-Lo Activator. In other words, when the ECO is
    above 0, we are not allowed to take short signals, and when the ECO is below 0, we
    are not allowed to take long signals.


    Download File:
    ECO.efs



    EFS Code:
    PHP Code:
    /*********************************
    Provided By:  
        eSignal (Copyright c eSignal), a division of Interactive Data 
        Corporation. 2008. 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:        
        ECO (Blau`s Ergodic Candlestick Oscillator)

    Version:            1.0  12/03/2008

    Formula Parameters:                     Default:
        Number To Calculate EMA              32
        Number To Calculate vEMA             12

    Notes:
        We call this one the ECO for short, but it will be listed on the indicator list 
        at W. Blau╥s Ergodic Candlestick Oscillator. The ECO is a momentum indicator. 
        It is based on candlestick bars, and takes into account the size and direction 
        of the candlestick "body". We have found it to be a very good momentum indicator, 
        and especially smooth, because it is unaffected by gaps in price, unlike many other 
        momentum indicators.
        We like to use this indicator as an additional trend confirmation tool, or as an 
        alternate trend definition tool, in place of a weekly indicator. The simplest way 
        of using the indicator is simply to define the trend based on which side of the "0" 
        line the indicator is located on. If the indicator is above "0", then the trend is up. 
        If the indicator is below "0" then the trend is down. You can add an additional 
        qualifier by noting the "slope" of the indicator, and the crossing points of the slow 
        and fast lines. Some like to use the slope alone to define trend direction. If the 
        lines are sloping upward, the trend is up. Alternately, if the lines are sloping 
        downward, the trend is down. In this view, the point where the lines "cross" is the 
        point where the trend changes.
        When the ECO is below the "0" line, the trend is down, and we are qualified only to 
        sell on new short signals from the Hi-Lo Activator. In other words, when the ECO is 
        above 0, we are not allowed to take short signals, and when the ECO is below 0, we 
        are not allowed to take long signals. 
    **********************************/

    var fpArray = new Array();
    var 
    bInit false;

    function 
    preMain() {
        
    setStudyTitle("Blau's Candlestick Indicator"); 
        
    setCursorLabelName("Blau's Candlestick Indicator",0);
        
    setDefaultBarFgColor(Color.red,0);
        
    addBand(0PS_SOLID1Color.black);
        
        var 
    x=0;
        
    fpArray[x] = new FunctionParameter("r"FunctionParameter.NUMBER);
        
    with(fpArray[x++]){
            
    setLowerLimit(1);        
            
    setDefault(32);
        }
        
    fpArray[x] = new FunctionParameter("s"FunctionParameter.NUMBER);
        
    with(fpArray[x++]){
            
    setLowerLimit(1);        
            
    setDefault(12);
        }
    }

    var 
    xEMA null;
    var 
    xvEMA null;

    function 
    main(rs) {
    var 
    nState getBarState();

        if (
    nState == BARSTATE_ALLBARS) {
            if (
    == null)    32;
            if (
    == null)    12;
        }

        if ( 
    bInit == false ) { 
            
    xEMA ema(sema(refsInternal("CloseOpen")));
            
    xvEMA ema(sema(refsInternal("HighLow")));
            
    bInit true
        } 
       
        if (
    getCurrentBarCount() < Math.max(r,s)) return;

        if(
    xvEMA.getValue(0) != 0)
            return 
    100 * (xEMA.getValue(0) / xvEMA.getValue(0));
        else
            return;
    }

    function 
    CloseOpen() {
    var 
    nRes 0;
        
    nRes close(0) - open(0);
        if (
    nRes == nullnRes 1;
        return 
    nRes;
    }

    function 
    HighLow() {
    var 
    nRes 0;
        
    nRes high(0) - low(0);
        if (
    nRes == nullnRes 1;
        return 
    nRes;

Working...
X