Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Double Top and Bottom Detection for Amibroker (AFL)
writing “Top and Bottom” you can view at the wall chart.
hopefully usefull.
Isfandi
Indonesia
Screenshots
Similar Indicators / Formulas
Indicator / Formula
_SECTION_BEGIN("Detecting double tops and bottoms"); /* Detecting double tops and bottoms (come into view, by Isfandi)*/ percdiff = 5; /* peak detection threshold */ fwdcheck = 5; /* forward validity check */ mindistance = 10; validdiff = percdiff/400; 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 ); Buy = doublebot; Sell = doubletop; for( i = 0; i < BarCount; i++ ) { if( Buy[i] ) PlotText( "BOT " , i, L[ i ],colorYellow ); if( Sell[i] ) PlotText( "TOP" , i, H[ i ], colorWhite ); } 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(Lowest( 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() ); _SECTION_END();
18 comments
Leave Comment
Please login here to leave a comment.
Back
Dear sir, am using AMI-5, the double top-double bottom afl not working in my system AMI-5 not supporting ?? am not know..pls help me… S.SURESH…98424 06366.
Even this AFL is not showing any top or bot in the chart it is blank, ami 5.30
Sir.. pls u put the price firsly or u grab this afl into price chart. no prob with Ami 5.3
Dear Isfandi,
I did exactly as you said, still does not display anything. using AMi 5.3,
My suggestion change your back ground with black color, so you can see it because the words in White and Yellow color. And don’t forget drag the price first. Have a nice day!
Dear Alok,
I have been change the writing color, if u use background with white color try this a part of formula (copy and paste to similar paragraf), dont forget put the price firstly and try for some stock pic until u find it.
IT NOT SHOWN IN AMI 5.
Hi,
Yes. None of us are able to see this indicator.
Also, the indicator says to look for green and red arrows.But, there is no code for plotting these arrows.
Request you to please post the working formula of this indicator once again for everyone’s benefit.
Thanks,
Gopal
Ok, hope not everyone get same problem, I dont know why can’t show wheres no prob with me, am using 5.3 too
try one’s more:
Please check afl not different, I dont know not show maybe plugins problem.
Ok, I will contribute some plugins with new title “Sharing Plugins” hope finish this problem.
sorry can not post zip file here, pls moderator help us
thanks,
Isfandi
Hello
I checked it and it works fine it doesn’t need any plugins. It certainly doesn’t work very well but it works sometimes.
sir pls help me this afl is not work on ami 5.30
yeah it is working with 5.3
not working.
i am Amibroker 5.4 ,when i inser code its come blank.
it works monthly chart
Original code is here https://aflcode.com/double-top-double-bottom-detector-2/
Confirmed working 0n Amibroker 5.6.x