PureBytes Links
Trading Reference Links
|
Stephane,
Thanks for the reply. It still does not work since it will generat
buy signal in a row. I just want to take the first buy signal. I used
something like this:
sell=barssince(buy==1 and ref(buy, -1)==0)>5;
But a result check did not indicate it matches with what I expect. -
that is to count the days that position has been long or short.
Thanks
--- In amibroker@xxxx, "Stephane Carrasset" <nenapacwanfr@xxxx> wrote:
> Hi,
>
> with hold(buy,period), you have the number of days you want to keep
> the trade.
>
> stephane
>
> > I use the following to count bars since entry and it did not work.
> > Is there any function in AFL that refers to position?
> >
> > sell=barssince(buy=1)>5;
|