Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Trend Exploration: Count Number of New Highs for Amibroker (AFL)
This exploration identify price trends by counting the number of new highs (or lows) that a stock has made during the last 50 days and sort the result in descending order.
Indicator / Formula
LK=50; Filter = Status("lastbarinrange"); A1= IIf( L> Ref(HHV( Close,LK),-5), 1, 0 ); A2= Sum( A1, LK ) ; B1= IIf( H< Ref(LLV( Close,LK),-5), 1, 0 ); B2= Sum( B1, LK ) ; SetOption("NoDefaultColumns", True); AddTextColumn( Name(), "ticker", 1, textColor=colorBlack, bkgndColor=colorLime); AddColumn( DateTime(), "date/time", formatDateTime, colorBlack, colorLime); AddColumn( A2, "New Highs", 1.0, textColor = colorBlack, bkgndColor = colorLightOrange ); AddColumn( B2, "New Lows", 1.0, textColor = colorBlack, bkgndColor = colorLightOrange ); AddColumn( Correlation(Cum(1),Close,LK), "Correlation Trend", 1.2, textColor = colorBlack, bkgndColor = colorLightOrange ); AddColumn( ROC(C,LK), "Percentage Return", 1.0,textColor = colorBlack, bkgndColor = colorLightOrange ); AddColumn( ROC(C,LK)/StDev(ROC(C,LK),LK), "Risk Adjusted Returns", 1.0,textColor = colorBlack, bkgndColor = colorLightOrange ); SetSortColumns( -3 );
0 comments
Leave Comment
Please login here to leave a comment.
Back