Money Flow Indicator (Chaikin Oscillator)

ICE Data Services -


Chaikin.efs  EFSLibrary - Discussion Board
  

File Name: Chaikin.efs


Description:
Money Flow Indicator (Chaikin Oscillator)


Formula Parameters:
Fast : 3
Slow : 10

Notes:
Indicator plots Money Flow Indicator (Chaikin). This indicator looks
to improve on Larry William's Accumulation Distribution formula
The indicator subtracts a 10 period exponential moving average of the
AccumDist function from a 3 period exponential moving average of the
AccumDist function.

Download File:
Chaikin.efs




EFS 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:            Money Flow Indicator (Chaikin Oscillator)    Version:            1.0  04/20/2009    Formula Parameters:                     Default:    Fast                                3    Slow                                10    Notes:    Indicator plots Money Flow Indicator (Chaikin). This indicator looks     to improve on Larry William's Accumulation Distribution formula     The indicator subtracts a 10 period exponential moving average of the     AccumDist function from a 3 period exponential moving average of the     AccumDist function.**********************************/var fpArray = new Array();var bInit = false;function preMain() {    setStudyTitle("Money Flow Indicator (Chaikin Oscillator)");     setCursorLabelName("Chaikin Oscillator");    var x = 0;    fpArray[x] = new FunctionParameter("Fast", FunctionParameter.NUMBER);    with(fpArray[x++]) {        setLowerLimit(1);        setDefault(3);    }    fpArray[x] = new FunctionParameter("Slow", FunctionParameter.NUMBER);    with(fpArray[x++]) {        setLowerLimit(1);        setDefault(10);    }}var xemaMax = null;var xemaMin = null;function main(Fast, Slow) {var nBarState = getBarState();var nMFI_Chaikin = 0;    if (nBarState == BARSTATE_ALLBARS) {        if (Fast == null) Fast = 3;        if (Slow == null) Slow = 10;    }    if (bInit == false) {        xemaMax = ema(Fast, accDist());        xemaMin = ema(Slow, accDist());        bInit = true;    }       nMFI_Chaikin = xemaMax.getValue(0) - xemaMin.getValue(0);    if (nMFI_Chaikin == null) return;    return nMFI_Chaikin;}