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

XTL - AG -4 AmiB for Amibroker (AFL)
ajmal017
almost 13 years ago
Amibroker (AFL)

Rating:
3 / 5 (Votes 4)
Tags:
amibroker

The XTL (eXpert Trend Locator)is a study Tom Joseph developed that uses a statistical evaluation of the market that can tell the difference between random market swings (noise) and directed market swings (trends).

Similar Indicators / Formulas

Kavach Of Karna v2
Submitted by hbkwarez over 10 years ago
Advanced Elliott Waves
Submitted by MarcosEn almost 13 years ago
3_6Day GuaiLiLv
Submitted by motorfly almost 13 years ago
Williams Alligator System
Submitted by durgesh1712 about 13 years ago
*Level Breakout system*
Submitted by Tinych about 13 years ago
Horizontal Live Priceline Tool
Submitted by northstar about 13 years ago

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("xtl");
tgt = 35;
a = CCI(20) < -tgt;
b = CCI(20) > tgt;
state = IIf(a>b,-1,IIf(a==b,0,1));
Color = IIf(state == 0, colorBlack, IIf(state == 1, colorLime, IIf(state == -1, colorRed, 0)));

//Plot(state, "", color, styleHistogram);

SetChartOptions( 0, chartShowDates | chartShowArrows | chartLogarithmic | chartWrapTitle );
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", color, styleNoTitle |styleBar ); 
 
_SECTION_END();

_SECTION_BEGIN("DispMA");
P = ParamField("Field");
Type = ParamList("Type", "Simple,Exponential,Double Exponential,Tripple Exponential,Wilders,Weighted");
Periods = Param("Periods",30, 2, 300 );
Displacement = Param("Displacement", 15, -50, 50 );
m = 0;

if( Type == "Simple" ) 					m = MA( P, Periods );
if( Type == "Exponential" ) 			m = EMA( P, Periods );
if( Type == "Double Exponential" ) 	m = DEMA( P, Periods );
if( Type == "Tripple Exponential" ) 	m = TEMA( P, Periods );
if( Type == "Wilders" ) 				m = Wilders( P, Periods );
if( Type == "Weighted" ) 				m = WMA( P, Periods );

Plot( m, _DEFAULT_NAME(), ParamColor("Color", ColorCycle), ParamStyle("Style"), 0, 0, Displacement );
_SECTION_END();

_SECTION_BEGIN("DispMA1");
P = ParamField("Field");
Type = ParamList("Type", "Simple,Exponential,Double Exponential,Tripple Exponential,Wilders,Weighted");
Periods = Param("Periods",30, 2, 300 );
Displacement = Param("Displacement", 15, -50, 50 );
m = 0;

if( Type == "Simple" ) 					m = MA( P, Periods );
if( Type == "Exponential" ) 			m = EMA( P, Periods );
if( Type == "Double Exponential" ) 	m = DEMA( P, Periods );
if( Type == "Tripple Exponential" ) 	m = TEMA( P, Periods );
if( Type == "Wilders" ) 				m = Wilders( P, Periods );
if( Type == "Weighted" ) 				m = WMA( P, Periods );

Plot( m, _DEFAULT_NAME(), ParamColor("Color", ColorCycle), ParamStyle("Style"), 0, 0, Displacement );
_SECTION_END();

3 comments

1. ajmal017

From ADGET Help:

General Description: The XTL (eXpert Trend Locator)is a study Tom Joseph developed that uses a statistical evaluation of the market that can tell the difference between random market swings (noise) and directed market swings (trends).

Recommended Usage: The XTL is a simple but powerful tool that is not complicated to use. If the bars are blue in color, then the trend is up. If the bars are red in color, then the trend is down. When you have a bar turn from its normal color to blue or black, this first signal is called a Break Out Bar. An entry is taken when the bar following the Break Out Bar is the same trend color as the Break Out Bar, and the range exceeds 150% of the Break Out Bar in the direction of the trend. You would place a stop below the low of the Break Out Bar if the trend is up, and you would place a stop above the high of the Break Out Bar if the trend is down. As the market moves in the direction of the trend, you would use a trailing stop to follow the trend. To find an exit, you can use a variety of exit methods, but we recommend using the Regression Trend Channels or an optimized DMA. Please note that the XTL not a mechanical trading system. The XTL is one of the many studies (methods) available in GET.

2. szgolyas

error in line 3

3. Tinych

Code is right, no error.

Leave Comment

Please login here to leave a comment.

Back