Discussions
»
Product and Service Development
»
Formula Assistance
»
Help with REF function - want to know 5 day ROC% for next 5 days
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.
|
|
|
|
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]
|
|
|
|
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?
|
|
|
|
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)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
Help with REF function - want to know 5 day ROC% for next 5 days
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.