PureBytes Links
Trading Reference Links
|
"going down for the last five days" is a bit vague and could be
interpreted a number of ways. For example, you could require every day
to close lower than the previous day, or just to have the last day
lower than 5 days before, or to have the last day lower than any of
the previous 5 days, etc. Alternatively, you could specify the slope
of a moving average to be negative (eg. a 5 day MA). There are
numerous ways to indicate "going down", so you need to be more specific.
As far as coding it goes, once you have the condition, then you would
add it like this:
cond1 = <A2 going down condition>;
buy = Cross(A1, A2) AND NOT cond1;
That way a buy signal will only be generated if the going down
condition is not true.
Regards,
GP
--- In amibroker@xxxxxxxxxxxxxxx, "rijnaars" <rijnaa@xxx> wrote:
>
> I would like to add a condition to a by signal.
>
> For instance buy = Cross(A1,A2)
>
> now i do not want this signal to be affective if A2 has been going down
> the last 5 days for instance.
> How do i add 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
*********************************
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|