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

[EquisMetaStock Group] Re: % change over specified period



PureBytes Links

Trading Reference Links



--- In equismetastock@xxxxxxxxxxxxxxx, "Jose" <josesilva22@xxxx> 
wrote:
> 
> Try this:
> 
> ---8<---------------------
> 
> { % change of Close over specified period }
> { http://users.bigpond.com/prominex/pegasus.htm#metastock }
> 
> { User inputs }
> StDay:=Input("start Day",1,31,1);
> StMnth:=Input("start Month",1,12,1);
> StYear:=Input("start Year",1800,2200,2004);
> EnDay:=Input("end Day",1,31,31);
> EnMnth:=Input("end Month",1,12,12);
> EnYear:=Input("end Year",1800,2200,2004);
> 
> { Data Array }
> entry:=C;
> exit:=C;
> 
> { Date signals }
> today:=Year()+Month()/12+DayOfMonth()/373;
> stInput:=StYear+StMnth/12+StDay/373;
> endInput:=EnYear+EnMnth/12+EnDay/373;
> start:=stInput>Ref(today,-1) AND stInput<=today;
> end:=endInput>Ref(today,-1) AND endInput<=today;
> 
> { % change }
> entryVal:=ValueWhen(1,start,entry);
> exitVal:=ValueWhen(1,end,exit);
> change:=(exitVal/entryVal-1)*100;
> 
> { Plot in own window }
> change
> 
> ---8<---------------------
> 
> 
> jose '-)
> 
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, carmangb <no_reply@xxxx> 
wrote:
> > 
> > 
> > Is there any way that I can build an indicator that will allow 
me to 
> > select start & end dates which then gives me a % change over the 
2 
> > dates. I would like this to be moveable to allow me to 'see' 
easily 
> > % gains & losses. I would like it to function similar to the 
inbuilt 
> > Standard Error Channel indicator.

Sorry Jose, I have been away for a while. I will give this a try and 
post back here with result. Thanks for the post.
Brian








------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/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/