Buy = Status("firstbarinrange");
Sell = Status("lastbarinrange"); // vs. BarsSince(Buy) >= ...;

http://www.amibroker.com/guide/afl/afl_view.php?id=141
http://www.amibroker.com/guide/afl/afl_view.php?name=barssince

Mike

--- In [email protected], "rise_t575" <ris...@...> wrote:
>
> Hi all,
> 
> I am looking for a way to...
> 
> 1) Generate entry signals ON DAY ONE OF THE BACKTESTING PERIOD ONLY for 
> stocks that fulfill one (or various) criteria on that day.
> 
> 2) Hold all of these positions until the end of the backtesting period (or 
> alternatively, for a specific number of bars).
> 
> 3) I'd like to run optimization runs on a) the selection criteria, and b) the 
> holding time.
> 
> Could someone give me a pointer into the right direction how I could 
> accomplish this (especially how I limit the generation of entry signals to 
> day one)?
> 
> Thank you very much in advance!
>


Reply via email to