Mike,
Just add the following code to the very bottom of your AFL and it will work. Make sure in Parameters you have Show Trading Arrows set to Yes. Buy = ExRem( Buy, Sell ); Sell = ExRem( Sell, Buy ); PlotShapes(Buy*shapeUpArrow,5); PlotShapes(Sell*shapeDownArrow,4); I'll warn you in advance, even with the ExRem statements this code generates a LOT of arrows. Maybe Tomasz knows how to tighten up the code. Don Lindberg _____ From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mikedostal24 Sent: Thursday, July 05, 2007 7:43 PM To: amibroker@yahoogroups.com Subject: [amibroker] buy/sell arrows Hello, Tomasz provided code for the July issue of Technical Analysis of Stock & Commodities magazine along with a picture of a chart. In the picture there are buy/sell arrows which don't seem to be in the code. I am wondering how I would plot this - do I need to write a seperate code to plot the arrows as seperate overlay? Below is the code Any help is appreciated. Thanks in advance! mike // Volume Price Confirmation Indicator (VCPI) CODE // volume weighted MA function VWMA( array, period ) { return Sum( array * V, period ) / Sum( V, period ); } // Volume Price Confirmation Indicator function VPCI( speriod, Lperiod ) { Vw = VWMA( C, lperiod ); Vpc = Vw - MA( C, lperiod ); Vpr = VWMA( C, speriod ) / MA( C, speriod ); Vm = MA( V, speriod ) / MA( V, Lperiod ); return Vpc * Vpr * Vm; } // plot VPCI speriod = Param("Short period", 5, 1, 50, 1 ); lperiod = Param("Long period", 20, 1, 100, 1 ); Vp = VPCI( speriod, Lperiod ); Plot( Vp, "VPCI"+ _PARAM_VALUES(), colorRed ); // and VPCI smoothed aperiod = Param("Smoothing period", 20, 1, 30, 1 ); Vps = MA( Vp, aperiod); Plot( Vps, "MA("+aperiod+")", colorBlue ); // simple trading system follows Buy = Vp > Vps AND ADX( 7 ) > 10 AND MACD( 12, 26 ) > Signal( 12, 26, 9 ); Sell = Vps < Vp;