Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Awesome Oscillator for eSignal (EFS)

Rating:
4 / 5 (Votes 3)
Tags:
oscillator, eSignal
This indicator plots the oscillator as a histogram where blue denotes periods suited for buying and red . for selling. If the current value of AO (Awesome Oscillator) is above previous, the period is considered suited for buying and the period is marked blue. If the AO value is not above previous, the period is considered suited for selling and the indicator marks it as red.

Similar Indicators / Formulas

Accerelation and Speed Ver 1.1
Submitted by nativeman over 14 years ago

Indicator / Formula

Copy & Paste Friendly
/*********************************
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:        
    Bill Williams. Awesome Oscillator (AC)

Version:            1.0  03/27/2009

Formula Parameters:                     Default:
    nLengthSlow                         34
    nLengthFast                         5

Notes:
    This indicator plots the oscillator as a histogram where blue denotes 
    periods suited for buying and red . for selling. If the current value 
    of AO (Awesome Oscillator) is above previous, the period is considered 
    suited for buying and the period is marked blue. If the AO value is not 
    above previous, the period is considered suited for selling and the 
    indicator marks it as red.
**********************************/

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

function preMain() {
    setStudyTitle("Average Bill Williams AC");
    setCursorLabelName("ABillW AC", 0);
    setDefaultBarThickness(2,0);
    setPlotType(PLOTTYPE_HISTOGRAM);
    var x=0;
    fpArray[x] = new FunctionParameter("nLengthSlow", FunctionParameter.NUMBER);
	with(fpArray[x++]){
        setLowerLimit(1);		
        setDefault(34);
    }
    fpArray[x] = new FunctionParameter("nLengthFast", FunctionParameter.NUMBER);
	with(fpArray[x++]){
        setLowerLimit(1);		
        setDefault(5);
    }   
}

var xCalc_hl2 = null;
var xAC = null;

function main(nLengthFast, nLengthSlow) {
var nBarState = getBarState();
var nAC = 0;
var nAC1 = 0;

    if (nBarState == BARSTATE_ALLBARS) {
        if (nLengthSlow == null) nLengthSlow = 34;
        if (nLengthFast == null) nLengthFast = 5;
    }

    if (bInit == false) {
        xCalc_hl2  = efsInternal("CalcSMA1_SMA2", nLengthFast, nLengthSlow);
        xAC = efsInternal("Calc_AC", nLengthFast, xCalc_hl2, sma(nLengthFast, xCalc_hl2))
        bInit = true;
    }

    nAC = xAC.getValue(0);
    nAC1 = xAC.getValue(-1);
    if (nAC1 == null) return;
    if (nAC > nAC1) setBarFgColor(Color.blue);
        else setBarFgColor(Color.red);
    return nAC;
}

var bSecondInit = false;
var xSMA1_hl2 = null;
var xSMA2_hl2 = null;

function CalcSMA1_SMA2(nLengthFast, nLengthSlow) {
var nRes = 0;
var SMA1 = 0;
var SMA2 = 0;
    if (bSecondInit == false) {
        xSMA1_hl2 = sma(nLengthFast, hl2());
        xSMA2_hl2 = sma(nLengthSlow, hl2());
        bSecondInit = true;
    }
    SMA1 = xSMA1_hl2.getValue(0);
    SMA2 = xSMA2_hl2.getValue(0);
    if (SMA1 == null || SMA2 == null) return;
    nRes = SMA1 - SMA2;
    return nRes;
}

function Calc_AC(nLengthFast, xCalc_hl2, xSMA_hl2) {
var nRes = 0;
    if (xSMA_hl2.getValue(0) == null) return;
    nRes = xCalc_hl2.getValue(0) - xSMA_hl2.getValue(0);
    return nRes;
}

2 comments

1. sudhir12192

var fpArray = new Array();
itt is giving syntax error
administrator pl verify
also let me know when ur launching amibroker toolbox
regards
sudhir anand

2. administrator

Hi sudhir12192 this formula is for eSignal. The AmibrokerToolbox will go live in the next few days :).

Leave Comment

Please login here to leave a comment.

Back