[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re:New indicator



PureBytes Links

Trading Reference Links

I tried your sell formula and none of the below works.

Condition1=ref(randy,-2) < ref(low,-2);
Condition2=ref(randy,-1) < ref(low,-1);
buy=Iff(Condition1 AND Condition2);
sell = barssince(buy) == 4;

All I get is "Iff(unknown)" and
"barssince(buy) unknown"

Any help appreciated.
Randy

----- Original Message -----
From: <tom_supera@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, August 09, 2001 4:54 PM
Subject: [amibroker] Re:New indicator


> Hi,
> What's the problem?
>
> I always use: sell = barssince (buy) == 3; (3 days for example)
>
> Tom Supera
>
>
>
>
>
> --- In amibroker@xxxx, Frank <fesnay@xxxx> wrote:
> > Hi,
> > How about - -
> >
> > SellSignal = barsince(buy);
> > sell = iif(SellSignal == 5,1,0);
> >
> > This would give you a sell signal on the fifth day since the buy.
> > Frank
> >
> > At 03:33 PM 8/9/01 -0400, you wrote:
> > >Greetings,
> > >Let me make sure I understand this. If I want to sell on the 5th
> day after
> > >a buy occurs, I would use:
> > >sell=ref(buy,-5)?
> > >
> > >In order to sell after a certain condition is true for the two
> days prior, I
> > >would use:
> > >If Condition1 and Condition2, buy on open next day?
> > >
> > >How would I code this since it also references yesterday and the
> day before?
> > >
> > >Randy
> > >
> > >> And back to your request: if you want to sell after 5 bars from
> buy
> > >> what you really want is a NEGATIVE offset:
> > >> sell = ref( buy, -5 );
> > >> this is so because you want to generate a sell signal knowing
> that 5 bars
> > >ago
> > >> a buy occurred. You don't need to look into the future because
> buy aleady
> > >> happened.
> > >> Best regards,
> > >> Tomasz Janeczko
> > >> ===============
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> > >
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>