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

[EquisMetaStock Group] % change over specified period



PureBytes Links

Trading Reference Links


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.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/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/