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

[EquisMetaStock Group] Re: Month-Week System



PureBytes Links

Trading Reference Links


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 --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

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

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

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