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

Thermometer 2 for eSignal (EFS)

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

Thermometer 2 Indicator

Indicator / Formula

Copy & Paste Friendly
/*********************************************************
Alexis C. Montenegro © December 2004                      
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() {
    setPriceStudy(true);
    setStudyTitle("Thermometer2");
    setShowCursorLabel(false);
    var x=0;
    fpArray[x] = new FunctionParameter("Interval", FunctionParameter.STRING);
	with(fpArray[x++]){
        setDefault();
    }
    fpArray[x] = new FunctionParameter("Lookback", FunctionParameter.NUMBER);
	with(fpArray[x++]){
        setLowerLimit(0);
        setDefault(0);
    }
    fpArray[x] = new FunctionParameter("Params", FunctionParameter.BOOLEAN);
	with(fpArray[x++]){
        setName("Show Parameters");
        setDefault(false);
    }
}

var bInit = false;
var vInterval = null;
var xOpen = null;
var xHigh = null;
var xLow  = null;
var xClaose = null;

function main(Interval,Lookback,Params) {
    if(bInit == false){
        if(isIntraday() && Interval == null) Interval = "D";
        else if(isDaily() && Interval == null) Interval = "W";
        else if(isWeekly() && Interval == null) Interval = "M";
        else if(Interval == null) Interval = getInterval();
        vInterval = Interval;
        xOpen  = open(inv(vInterval));
        xHigh  = high(inv(vInterval));
        xLow   = low(inv(vInterval));
        xClose = close(inv(vInterval));
        setShowTitleParameters(eval(Params));
        bInit = true;
    }
    drawLineRelative(5,xClose.getValue(-Lookback),5,xHigh.getValue(-Lookback),PS_SOLID,5,Color.red,1);
    drawLineRelative(5,xClose.getValue(-Lookback),5,xLow.getValue(-Lookback),PS_SOLID,5,Color.lime,2);
    drawShapeRelative(4,xOpen.getValue(-Lookback),Shape.RIGHTTRIANGLE,null,Color.blue,null,3);
    return null;
}

0 comments

Leave Comment

Please login here to leave a comment.

Back