[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: AFL syntax question



PureBytes Links

Trading Reference Links

One Last Revision - Compacting some of the code for even smaller AFL. // Find BarNumber for Highest High in Last 50 Bars. // // Michael.S.G. Color = IIf(O > C, colorBlack, colorYellow); Plot( Close, "Price", color, styleCandle ); BC=BarCount-1; BuyBar = BC-50; ThisIsBuyBar = BarIndex() == BuyBar;    // Boolean TrailPeak = BC-(LastValue(HighestSinceBars(ThisIsBuyBar,High,1))); ThisIsTrailPeak = BarIndex() == TrailPeak;      // Boolean Plot (ThisIsBuyBar ,"BuyBar", colorBlue, styleHistogram | styleOwnScale,0,1); Plot (ThisIsTrailPeak ,"TrailBar", colorYellow, styleHistogram | styleOwnScale,0,1); _N(Title = "\\c29"+ "Highest Bar x50 "+ "\\c32"+ Date()+ "\\c38 BarSelected \\c24"+BarIndex()+ "\n"+ "\\c38 TrailPeak \\c01"+TrailPeak+ ""); Send BUG REPORTS to bugs@xxxxxxxxxxxxx Send SUGGESTIONS to suggest@xxxxxxxxxxxxx ----------------------------------------- Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: http://groups.yahoo.com/group/amiquote/messages/) -------------------------------------------- Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/  To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.