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

TREND DETECTOR WITH VARIABLE PERIOD for Amibroker (AFL)
walid
over 14 years ago
Amibroker (AFL)

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

TREND DETECTOR by using DEMA – Double Exponential Moving Average of the Stochastic by D. Tsokakis, Apr2003

Similar Indicators / Formulas

Kavach Of Karna v2
Submitted by hbkwarez over 10 years ago
Advanced Elliott Waves
Submitted by MarcosEn about 13 years ago
3_6Day GuaiLiLv
Submitted by motorfly about 13 years ago
Williams Alligator System
Submitted by durgesh1712 about 13 years ago
Interactive Linear Regression Channel
Submitted by InternetWorm about 13 years ago
*Level Breakout system*
Submitted by Tinych about 13 years ago

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Unnamed 32");
/*TREND DETECTOR WITH VARIABLE PERIOD, by D. Tsokakis, Apr2003*/
t=Param("f",20,1,60,1);
// fast period
x=DEMA(StochD(40),t);
Plot(x,"",1,8);// fast trend detector
tA=Param("movcc",50,1,60,1);
// slow period
xA=DEMA(StochD(40),tA);
Plot(xA,"",7,8);// slow trend detector
Cond1=Ref(x,-1)==LLV(x,3);
Plot(50*Cond1,"",5,2);// the start of the fast uptrend
Cond2=Ref(x,-1)==HHV(x,3);
Plot(50*Cond2,"",4,2);// the end of the fast uptrend
k1=BarsSince(Cond1);// uptrend bar counter
k2=BarsSince(Cond2);// downtrend bar counter
Plot((k2>k1)*10,"",5,2);
Plot((k2<k1)*10,"",4,2);
t1=IIf(k2>k1,t+k1,t+k2);// the variable period
x1=DEMA(StochD(40),t1);// the variable trend detector
Plot(x1,"",(x1>Ref(x1,-1))*5+(x1<Ref(x1,-1))*4,8);
GraphXSpace=1; 
_SECTION_END();

0 comments

Leave Comment

Please login here to leave a comment.

Back