Hi Nugget -- Try this:
// BuyAtANewHigh.afl // // Buy if today's high is at least 1% higher than yesterday's high TargetPrice = 1.01 * Ref( H, -1 ); Buy = H > TargetPrice; BuyPrice = TargetPrice; Sell = BarsSince( Buy ) >= 2; /////////////////////////// Thanks, Howard On Thu, Jan 14, 2010 at 6:10 PM, nuggettrader <matti.vat...@yahoo.com>wrote: > > > I need to know how to specify a different buy price than C,O,H,L,AV in > Backtester AFL code. I use TeleChart end of day data. For example I want to > buy if and when a stock tops yesterday's High by 1%. In other words if > today's High is at least 1% higher than yesterday's High then I would get a > buy signal at some time during the trading day regardless if the stock > closes 1% or more higher or not. How do I code this in AFL? > > >