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

Re: [amibroker] Re: Help on conditional Buy signals



PureBytes Links

Trading Reference Links

hi,
 
not sure exactly what you mean but maybe you could use OR instead of AND, so  Buy = Cross(A1,A3) OR BarsSince(Cross(A1,A2)) <= 2;
but on an array level you can construct more detailed constraints using:
 
Buy = IIF(Cross(A1,A3) AND BarsSince(Cross(A1,A2)) <= 2,1, etc
 
or just using OR in your contraint rule Buy = (constraint rule1) OR (constraint rule 2) OR (constraint rule 3) etc;   like:
 
Buy = (Cross(A1,A3) AND BarsSince(Cross(A1,A2)) <= 2)  OR (Cross(A1,A3)) OR ()  etc;
 
if you explain in detail how your constraint should work I can write it for you.
 
regards, Ed
 
 
 
 
----- Original Message -----
From: rijnaars
Sent: Monday, October 06, 2008 9:48 AM
Subject: [amibroker] Re: Help on conditional Buy signals

Thank you very much Ed this is what i needed
maybe you can help me on another aspect as well.

if i do not want the cross signal to react if A1 crosses A3 where A3
has been going down for the last 4 days forinstance.
What condition should i then implement?
thanks in advance

--- In amibroker@xxxxxxxxxps.com, "gp_sydney" <gp.investment@...>
wrote:
>
> Ed,
>
> That's saying the A1/A3 cross must be before the A1/A2 cross, not
> after. It should be the other way around:
>
> Buy = Cross(A1,A3) AND BarsSince(Cross(A1,A2)) <= 2;
>
> Regards,
> GP
>
>
> --- In amibroker@xxxxxxxxxps.com, "Edward Pottasch" <empottasch@>
> wrote:
> >
> > this can be done like:
> >
> > buy = Cross(A1,A2) AND barssince(Cross(A1,A3)) <= 2;
> >
> > rgds,Ed
> >
> >
> >
> > ----- Original Message -----
> > From: rijnaars
> > To: amibroker@xxxxxxxxxps.com
> > Sent: Monday, October 06, 2008 8:08 AM
> > Subject: [amibroker] Help on conditional Buy signals
> >
> >
> > I want to use some conditions in a buy cross signal but i do
not know
> > how to add it.
> >
> > For instance :
> >
> > i have a buy signal buy = Cross(A1,A2)AND Cross(A1,A3)
> >
> > so in this case A1 crosses both A2 and A3
> > now i like to have a signal as well when the second cross is
made
> > within 2 days after the first cross how do i make this
condition?
> >
>

__._,_.___

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
*********************

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html

*********************************




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___