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 ....
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Double Top Detection for Amibroker (AFL)
Rating:
3 / 5 (Votes 3)
Tags:
amibroker, exploration, pattern
Detect double top double bottom
Similar Indicators / Formulas
Butterfly Pattern
Submitted
by asdaf1 over 14 years ago
Double Top and Bottom Detection
Submitted
by isfandi about 14 years ago
Pennant Chart Pattern Exploration
Submitted
by kaiji almost 15 years ago
Head & Shouders
Submitted
by pvsy over 14 years ago
Harmonic pattern detection
Submitted
by Yaaad over 14 years ago
Candlestick Pattern Finder
Submitted
by theone3000 over 14 years ago
Indicator / Formula
Copy & Paste Friendly
/* Detecting double tops and bottoms*/ percdiff = 5; /* peak detection threshold */ fwdcheck = 5; /* forward validity check */ mindistance = 10; validdiff = percdiff/10; PK= Peak( H, percdiff, 1 ) == High; TR= Trough( L, percdiff, 1 ) == Low; x = Cum( 1 ); XPK1 = ValueWhen( PK, x, 1 ); XPK2 = ValueWhen( PK, x, 2 ); xTR1 = ValueWhen( Tr, x, 1 ); xTr2 = ValueWhen( Tr, x, 2 ); peakdiff = ValueWhen( PK, H, 1 )/ValueWhen( PK, H, 2 ); Troughdiff=ValueWhen( tr, L, 1 )/ValueWhen( tr, L, 2 ); doubletop = PK AND abs( peakdiff - 1 ) < validdiff AND (Xpk1 -Xpk2)>mindistance AND High > HHV( Ref( H, fwdcheck ), fwdcheck - 1 ); doubleBot=tr AND abs( troughdiff - 1 ) < validdiff AND (Xtr1 -Xtr2)>mindistance AND Low < LLV( Ref( L, fwdcheck ), fwdcheck - 1 ); Sell = doubletop; Buy = doublebot; WriteIf( Highest( doubletop ) == 1, "AmiBroker has detected some possible double top patterns for " + Name() + "\nLook for green arrows on the price chart.", "There are no double top patterns for " + Name() ); WriteIf(Highest( doublebot)==1,"AmiBroker has detected some possible double bottom patterns for " + Name() + "\nLook for red arrows on the price chart.", "There are no double bottom patterns for " + Name() ); Filter=Sell OR Buy ; AddColumn( IIf( doubletop , 88, 01), "Double TOP", formatChar ); AddColumn( IIf( doublebot , 88, 01), "Double BOT", formatChar );
4 comments
Leave Comment
Please login here to leave a comment.
Back
Dear sir, am using AMI-5, the double top..double bottom AFL not shown anything, pls…clarifty the above…thx for ur interest..(s.suresh..9842406366.)
Dear Friend,
The double top and bottom does not show it is blank on EOD data. Also on RT.
Thanks and Regards
Alok
Hello
It’s only an exploration doesn’t actually plot the pattern.
it`s search only, not find any