PureBytes Links
Trading Reference Links
|
Dear Johan,
Your question is clear. The answer is somewhat tricky
because sometimes a holiday happens from Monday to Friday
and there is no simple formula to check it.
*IF* we assume that stock has to be traded for Monday to Friday
(no special holidays) the solution can be
tradedeveryday = LastValue( Sum( DayOfWeek(), 10 ) ) == 30;
buy = buy AND tradedeveryday;
As DayOfWeek returns 1 for Monday and 5 for Friday
a one-week sum of it should be 15 if the stock was traded every
week day, so two week sum should be 30.
Hope this helps.
Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com
----- Original Message -----
From: <GEERTS.JOHAN@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Saturday, August 25, 2001 11:43 AM
Subject: [amibroker] 2° try : date in formula
> Hello,
>
> Isn't it possible what I want to do or is the question not clear
> enough, please let me know?!
>
> I only want to scan or back-test stocks that where traded every day
> for the last 10 days. So, there may be no gap in the date for the
> last 10 days, except on weekends. Is this possible?
> For example:
>
> buy = ... and "traded every day for the last 10 days";
> sell = ...;
>
> Or maybe in a filter:
>
> ...;
> filter = "stocks traded every day for the last 10 days";
> buy = ...;
> sell = ...;
>
> Johan
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
|