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

Re: [EquisMetaStock Group] Re: Month-Week System



PureBytes Links

Trading Reference Links

Hi Jose:

Yes that's it.  Is there anyway to plot an equity line ?

Jose wrote:

Bug in the previous code - try this:

=====================
Monthly trade signals
=====================
---8<------------------

{ User inputs }
In:=Input("Buy on nth trading day",1,22,1);
Ex:=Input("Sell on nth trading day",1,22,5);

{ Month true start }
mthStart:=Month()<>ValueWhen(2,1,Month());

{ Trading day of month }
mthDay:=BarsSince(mthStart)+1;

{ Buy/Sell signals }
buy:=mthDay=In;
sell:=mthDay=Ex;

{ Plot signals in own window }
buy-sell

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

jose '-)



--- In equismetastock@xxxxxxxxxxxxxxx, "Jose" <josesilva22@xxxx>
wrote:
>
> Try this:
>
> =====================
> Monthly trade signals
> =====================
> ---8<------------------
>
> { User inputs }
> In:=Input("Buy on nth trading day",1,22,1);
> Ex:=Input("Sell on nth trading day",1,22,5);
>
> { Month true start }
> mthCount:=Cum(Month()<>ValueWhen(2,1,Month()));
> mthStart:=mthCount<>ValueWhen(2,1,mthCount);
>
> { Trading day of month }
> mthDay:=BarsSince(mthStart);
>
> { Buy/Sell signals }
> buy:=mthDay=In;
> sell:=mthDay=Ex;
>
> { Plot signals in own window }
> buy-sell
>
> ---8<------------------
>
> jose '-)
>
>
> --- In equismetastock@xxxxxxxxxxxxxxx, Dominick <Dom2000@xxxx>
wrote:
> > Hi All:
> >
> > Would someone be so kind to help me with this.
> > I'm using version 7.2
> > and I've been trying to write a system that would buy and
> > sell the first week only of each month.  For ex.  Buy at open on
> > day 1 and sell at close on day 5 of month one and
> > continue to month 12.  Obviously I've haven't even come close.
> >
> > TIA,
> >
> > dom





Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links