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

[Metastockusers] Weekday-0f-Month seasonality indicator update



PureBytes Links

Trading Reference Links

This neater-coded version's output is identical to the original.

jose '-)


=========================
Calendar Weekday of Month
=========================
---8<---------------------------

{ Calendar-absolute, Weekday-of-Month signals }
{ Plot on separate window below chart }
{ ©Copyright 2004 Jose Silva }
{ http://users.bigpond.com/prominex/pegasus.htm }

dayChosen:=Input("day:  [1]Mon,  [2]Tue,  [3]Wed,  [4]Thu,  [5]Fri",1,
7,5);
weekChosen:=Input("[1]st  [2]nd  [3]rd  [4]th  [5]th  week in month",
1,5,1);
plot:=Input("plot:  [1]Weekday signals,  [2]Weekday count",1,2,1);

day:=DayOfWeek()=dayChosen;
d:=DayOfMonth();
signalCount:=
 If(day AND d<=7,1,
 If(day AND d>7 AND d<=14,2,
 If(day AND d>14 AND d<=21,3,
 If(day AND d>21 AND d<=28,4,
 If(day AND d>28,5,0)))));
signal:=weekChosen=signalCount;

If(plot=1,signal,signalCount)

---8<---------------------------


--- In Metastockusers@xxxxxxxxxxxxxxx, "Jose" <josesilva22@xxxx> 
wrote:
> 
> Friday was a big day in the US markets.
> 
> The released Unemployment Rate stats, as well as Total Vehicle Sales 
> and other important US economy stats, makes sure that the first
> Friday of the month should have a big red circle around it in any
> one's calendar.
> 
> There are other key US dates that may be interesting to look at,
> from a seasonality point of view.  For example, the US Consumer
> Price Index stats released in the middle of the month (2nd/3rd
> Wednesday of month).
> 
> The MetaStock indicator below can help pinpoint those important
> dates.
> Plot below the S&P500 cash index chart, and take a look at the key 
> dates and corresponding chart action.
> 
> =========================
> Calendar Weekday of Month
> =========================
> ---8<---------------------------
> 
> { Calendar-absolute Weekday-of-Month signals }
> { Plot on own window below chart }
> { ©Copyright 2004 Jose Silva }
> { http://users.bigpond.com/prominex/pegasus.htm }
> 
> dayChosen:=Input("signal  [1]Mon,  [2]Tue,  [3]Wed,  [4]Thu,  [5]
Fri",
> 1,7,5);
> WeekOfMonth:=Input("[1]st  [2]nd  [3]rd  [4]th  [5]th  week in 
month",
> 1,5,1);
> plot:=Input("[1]Weekday signals,  [2]Weekday count",1,2,1);
> 
> daySignal:=DayOfWeek()=dayChosen;
> d:=DayOfMonth();
> weekNr:=If(d<=7,1,
>  If(d>7 AND d<=14,2,
>  If(d>14 AND d<=21,3,
>  If(d>21 AND d<=28,4,5))));
> signalCount:=
>  If(weekNr=1 AND daySignal,1,
>  If(weekNr=2 AND daySignal,2,
>  If(weekNr=3 AND daySignal,3,
>  If(weekNr=4 AND daySignal,4,
>  If(weekNr=5 AND daySignal,5,0)))));
> signal:=daySignal AND weekNr=WeekOfMonth;
> 
> If(plot=1,signal,signalCount)
> 
> ---8<---------------------------
> 
> jose '-)




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/Metastockusers/

<*> To unsubscribe from this group, send an email to:
     Metastockusers-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/