logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
towcobra  
#1 Posted : Sunday, May 9, 2010 7:10:44 AM(UTC)
towcobra

Rank: Member

Groups: Registered, Registered Users
Joined: 9/12/2008(UTC)
Posts: 13

I would like to run a price performance exploration on stocks for a specified date range. So, I would need a "from" date and a "to" date. Can anyone help me please.
mstt  
#2 Posted : Monday, May 10, 2010 5:14:30 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)

Hi Towcobra

Someone asked me this the other day (possibly you) but the question was phrased a little differently and I didn’t quite get it.

Start with my Date Filter indicator and set the date range defaults as required. Just changing the settings in the Parameter window won’t get the correct dates to the explorer – you must change the default values. Next enter the column code into any explorer column, set the number of records appropriately (do not use Minimum Records setting), and run the exploration.

You can change the ROC() function from % to $ if you wants a points rather than percentage performance value.

Hope this helps.

Roy

Indicator

{Date Filter}

Sd:=Input("Start day" ,1,31,8);

Sm:=Input("Start month",1,12,1);

Sy:=Input("Start year" ,1980,2015,2010);

Ed:=Input("End day" ,1,31,4);

Em:=Input("End month" ,1,12,2);

Ey:=Input("End year" ,1980,2020,2010);

Start:=(DayOfMonth()>=Sd AND Month()=Sm AND

Year()=Sy) OR Year()>Sy OR (Year()=Sy AND

Month()>Sm);

End:=(DayOfMonth()<=Ed AND Month()=Em AND

Year()=Ey) OR Year()<Ey OR (Year()=Ey AND

Month()<Em);

Start AND (End OR (Start AND Alert(Start=0,2)));

Exploration

{colA: RangeROC}

D:=Fml("Date Filter");

B:=D AND Alert(D=FALSE,2); {mark start bar of date range}

N:=Cum(D)=LastValue(Cum(D)); {find end bar of date range}

N:=N AND Alert(N=FALSE,2); {mark end bar of date range}

R:=ValueWhen(1,B OR N,C); {identify start and end of range values}

ValueWhen(1,B OR N,ROC(R,1,%)); {return start to end ROC}

Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.