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

Notification

Icon
Error

Options
Go to last post Go to first unread
stinkray  
#1 Posted : Friday, August 19, 2016 2:37:04 AM(UTC)
stinkray

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

 

 

mstt  
#2 Posted : Friday, August 19, 2016 8:14:02 AM(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 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
thanks 1 user thanked mstt for this useful post.
stinkray on 8/25/2016(UTC)
stinkray  
#3 Posted : Monday, August 22, 2016 2:44:35 AM(UTC)
stinkray

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 9/4/2012(UTC)
Posts: 12

Thanks: 4 times

Thank you Roy

Users browsing this topic
Guest (Hidden)
Similar Topics
Bars since value of an indicator greater than current value (Basic Coding Techniques)
by swaai.smous 1/30/2010 2:31:06 AM(UTC)
Bars since High is higher than current High (Formula Assistance)
by gp7423 1/11/2008 9:47:48 AM(UTC)
Bars Since... (Formula Assistance)
by wecoyote13 6/9/2005 2:00:26 AM(UTC)
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.