You need to use loops There is a good explanation here
http://www.amibroker.com/kb/2007/03/24/how-to-plot-a-trailing-stop-in-the-price-chart/
Thanks Billyb
Isn't that for a trailing stop? I'm trying to plot a stop loss in addition to a trailing stop