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

Notification

Icon
Error

Options
Go to last post Go to first unread
aksh  
#1 Posted : Monday, February 2, 2009 6:23:32 AM(UTC)
aksh

Rank: Member

Groups: Registered, Registered Users
Joined: 1/20/2007(UTC)
Posts: 15

Was thanked: 1 time(s) in 1 post(s)

Hi Wabbit,

Need your help here. What's wrong with the following code? It's not plotting the high/low between the entered dates but plots the highest/lowest points on the chart.

-------------------------------------------------------------------------------------------------

{Date Inputs}

fmDate:=Input("Start yyyymmdd (0=last trade)",0,20201231,20060101);
toDate:=Input("End yyyymmdd (0=last trade)",0,20201231,0);

{Period between dates}
period:=ExtFml("Forum.DateRange", fmDate, toDate);

{High/Low}

hi:=Highest(ValueWhen(1,period,H));

lo:=Lowest(ValueWhen(1,period,L));

hi;lo

-------------------------------------------------------------------------------------------------

aksh

oztrader  
#2 Posted : Monday, February 2, 2009 8:14:17 PM(UTC)
oztrader

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 7/12/2007(UTC)
Posts: 134
Location: Perth Western Australia

Hi aksh,

Wabbit is away until tomorrow at the earliest and will answer your question when he returns however this code should give you the results you are chasing.

perd1:=Input("Day",1,31,1);
perd2:=Input("Month",1,12,1);
perd3:=Input("Year",1900,2199,2006);
perd4:=
ValueWhen(1,(DayOfMonth()>=perd1 AND Month()=perd2 AND Year()=perd3),LastValue(Cum(1))-Cum(1));
perdHigh:=ExtFml("Forum.HHV",H,perd4);
perdLow:=ExtFml("Forum.LLV",L,perd4);
perdHigh;
perdLow;

It is derived from code provided by *pp in post #24274 the link below.

Exploration to find out rising stock referencing a particular date

Cheers,

oz

aksh  
#3 Posted : Wednesday, February 4, 2009 10:57:07 AM(UTC)
aksh

Rank: Member

Groups: Registered, Registered Users
Joined: 1/20/2007(UTC)
Posts: 15

Was thanked: 1 time(s) in 1 post(s)

Thanks oz. I was actually trying to use Wabbit's single date input code for plotting Hi/Lo between any two intermediate dates entered by the user. It's not happening. I'm getting the highest/lowest points on the chart.

aksh

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.