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

Tick Line Momentum Oscillator for eSignal (EFS)

Rating:
0 / 5 (Votes 0)
Tags:
eSignal, oscillator

Excerpt taken from Stocks & Commodities, V. 12:1 (42-44):Using The Tick In A Short-Term Indicator by Daniel E. Downing

The tick index, the net difference of the numbers of stocks last traded on an uptick from those last traded on a downtick , is a well-known indicator, but it’s got a problem. The raw number result is volatile, perhaps too volatile for some. What to do? here, then, is a way to smooth out the noise to identify short-term trading opportunities.

The tick is a basic unit for the markets, watched with fascination during periods of turmoil and periods of enthusiasm. It is quoted throughout the day on most quote services. In addition, the closing tick value can be found on the market statistics pages of financial newspapers such as Barron’s and The Wall Street Journal. Let me present, then, the tick line momentum oscillator, which is based on the closing value for the New York Stock Exchange (NYSE) tick indicator. The oscillator has been shown to have a good track record of determining when the NYSE is overbought or oversold on a short-term basis.

Indicator / Formula

Copy & Paste Friendly
/*********************************************************
Alexis C. Montenegro © December 2005                      
Use and/or modify this code freely. If you redistribute it
please include this and/or any other comment blocks and a 
description of any changes you make.                      
**********************************************************/

var fpArray = new Array();

function preMain() {
    setStudyTitle("Tick Line Momentum Osc.");
    setCursorLabelName("TLMO", 0);
    setDefaultBarFgColor(Color.blue, 0);
    setPlotType(PLOTTYPE_LINE,0);
    setDefaultBarThickness(1,0);
    var x=0;
    fpArray[x] = new FunctionParameter("Length", FunctionParameter.NUMBER);
	with(fpArray[x++]){
        setLowerLimit(1);		
        setDefault(10);
    }
    fpArray[x] = new FunctionParameter("Momentum", FunctionParameter.NUMBER);
	with(fpArray[x++]){
        setLowerLimit(1);		
        setDefault(5);
    }
    fpArray[x] = new FunctionParameter("Smooth", FunctionParameter.NUMBER);
	with(fpArray[x++]){
        setLowerLimit(1);		
        setDefault(5);
    }
    fpArray[x] = new FunctionParameter("Source", FunctionParameter.STRING);
	with(fpArray[x++]){
        addOption("open"); 
        addOption("high");
        addOption("low");
        addOption("close");
        addOption("hl2");
        addOption("hlc3");
        addOption("ohlc4"); 
        setDefault("close"); 
    }
    fpArray[x] = new FunctionParameter("Symbol", FunctionParameter.STRING);
    with(fpArray[x++]){
        setDefault();
	}
	fpArray[x] = new FunctionParameter("Interval", FunctionParameter.STRING);
	with(fpArray[x++]){
        setDefault();
    }
    fpArray[x] = new FunctionParameter("Params", FunctionParameter.BOOLEAN);
	with(fpArray[x++]){
        setName("Show Parameters");
        setDefault(false);
    }
}

var bInit = false;
var xTLMO = null;

function main(Length,Momentum,Smooth,Source,Symbol,Interval,Params){
    if(bInit==false){
        if(Symbol == null) Symbol = getSymbol();
        if(Interval == null) Interval = getInterval();
        var vSymbol = Symbol+","+Interval;
        xTLMO = getSeries(ema(Smooth,mom(Momentum,efsInternal("calc",Length,eval(Source)(sym(vSymbol))))));
        addBand(0,PS_SOLID,1,Color.black,"Centerline");   
        setShowTitleParameters(eval(Params));
        bInit=true;
    }
    return xTLMO;
}

var xInit = false;
var xMA = null;
var xClose = null;
var Cum = 0;
var Cum1 = 0;

function calc(length,source){
    var nVal = 0;
    if(xInit==false){
        xMA = ema(length,source);
        xClose = source;
        xInit=true;
    }
    if(getBarState()==BARSTATE_NEWBAR){
        Cum1 = Cum;
    }
    var nClose = xClose.getValue(0);
    var nMA = xMA.getValue(-1);
    if(nClose==null || nMA==null) return;
    if(nClose>nMA) nVal = 1;
    else if(nClose<nMA) nVal = -1;
    else nVal = 0;
    Cum = Cum1+nVal;
    return Cum;
}

0 comments

Leave Comment

Please login here to leave a comment.

Back