PureBytes Links
Trading Reference Links
|
Keith,
You may use barssince function for both Buy, Sell lines.
Simply redefine Buy after Sell line.
Buy = Cross(x,y);//the sell line does not exist yet
Sell = Cross(y,x) AND BarsSince(Buy)>3;
Buy=Buy AND BarsSince(Sell)>3;//now you have defined sell in the
previous line.
DT
--- In amibroker@xxxx, "Keith Bennett" <kbennett@xxxx> wrote:
> Hi,
>
> Could someone please help me with this problem:
>
> Buy = Cross(x,y);
> Sell = Cross(y,x);
> Short = Sell; Cover = Buy;
>
> In order to survive whipsaws I want to reject Sell signals which
> occur within three bars of a Buy, and Buy signals which occur
within
> three bars of a Sell.
>
> I am trying to use Barssince(Sell,3) etc. but I still have all the
> Buy/Sell signals, or none at all :-(
>
> Keith (B)
|