Rank: Member
Groups: Registered, Registered Users, Unverified Users Joined: 9/4/2012(UTC) Posts: 12
Thanks: 4 times
|
Hi Roy
Appreciate your help again
I need to compute the number of periods where a stock closed today at a price greater or equal to 95% of the current day low over a look back period of 50 days.
On the other hand I also need to compute the number of periods where the stock closed today at a price greater or equal to 95% of the current day high over a look back period of 50 days.
Thanks again
Stinkray
|
|
|
|
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 stinkray
To clarify your request, do you want to test and count the last 50 periods (LOWs and HIGHs) against the last value of CLOSE, or do you want to test and count current and historical LOWs and HIGHs against the current and historical CLOSE?
If the answer to my first question is yes then the first two lines of code might be what you 're looking for. If the answer to my second question is yes then the second pair of expressions should do the trick.
Sum(LastValue(C)>0.95*L,50);
Sum(LastValue(C)>0.95*H,50);
Sum(C>0.95*L,50);
Sum(C>0.95*H,50);
Roy
|
1 user thanked mstt for this useful post.
|
|
|
Rank: Member
Groups: Registered, Registered Users, Unverified Users Joined: 9/4/2012(UTC) Posts: 12
Thanks: 4 times
|
|
|
|
|
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.