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

Notification

Icon
Error

Options
Go to last post Go to first unread
bluewhale  
#1 Posted : Friday, November 26, 2010 12:13:50 AM(UTC)
bluewhale

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 5/20/2005(UTC)
Posts: 6

I'm doing some backtesting so the date I use will be in the past, but I want to program a column to calculate the % return for the next 5 trading days. I've used Ref(c,+5) and it says N/A when I run the scan. Any suggestions or comments why this is not working? Thanks.
wabbit  
#2 Posted : Friday, November 26, 2010 1:22:19 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
On the last bar, your function looks 5 bars into the future, which doesn't exist, so the function returns N/A, as it does whenever the function looks beyond the last bar on the chart.

Don't look forward, look backwards.



wabbit [:D]

bluewhale  
#3 Posted : Friday, November 26, 2010 11:29:49 AM(UTC)
bluewhale

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 5/20/2005(UTC)
Posts: 6

Thanks Wabbit, I probably wasn't clear, I'm doing a scan set for a specific day in the past (ie. 2 months ago), and I want to see the next 5 days ROC% from that date. So, its not the last bar in my chart because the scan date is in the past. I hope this is making sense. Any ideas how to do this?
johnl  
#4 Posted : Friday, November 26, 2010 6:37:24 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

Only way I can think of doing it would be to use a day 5 days after the date you want,
run 5 days ROC% from that date and all other columns Ref(whatever,-5) for the date you really want.



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.