Try something like this: YesterdayHigh = Ref(High, -1); Threshold = YesterdayHigh * 1.01; Buy = High >= Threshold; BuyPrice = max(Open, Threshold);
Mike --- In [email protected], "nuggettrader" <matti.vat...@...> 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? >
