PureBytes Links
Trading Reference Links
|
Indicator variable inputs that change chart Experts, Explorations and
other indicators can be coded by using Mark Pyle's GV.dll
(GlobalVariable.dll):
===========================
Calendar Weekday of Month(2)
===========================
---8<----------------------
{ Calendar-absolute, Weekday-of-Month signals }
{ Plot on separate window below chart }
{ Refresh chart after changing inputs }
{ GV.dll must be in
...\MetaStock\External Function DLLs\ folder }
{ Download GV.dll from:
http://users.bigpond.com/prominex/MetaStock/GV.dll }
{ ©Copyright 2004 Jose Silva }
{ josesilva22@xxxxxxxxx }
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;
x:=ExtFml("GV.SetVar","WoMsignal",signal);
If(plot=1,signal,signalCount)
---8<----------------------
====================
Explorer/Expert code
====================
---8<----------------------
x:=ExtFml("GV.GetVar","WoMsignal");
x
---8<----------------------
Don't forget to refresh chart after changing inputs in "Calendar
Weekday of Month(2)" indicator.
jose '-)
--- In Metastockusers@xxxxxxxxxxxxxxx, Dominick <Dom2000@xxxx> wrote:
> Jose you are something else. I believe the first words out of your
> mouth as an infant wasn't ma ma or da da, it most likely some
> programming code. :))
>
> I was able to select the days etc using Expert advisor. This
> highlighted the each day with it's own color as opposed to spikes on
a
> chart.
>
> I was wondering could you do the highlighting using "input" in an
> indicator, if not in Expert advisor?
>
> TIA,
>
> Dominick
>
> Jose wrote:
> >
> > 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.
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/
|