Discussions
»
Product and Service Development
»
Formula Assistance
»
Find average closing price at $0.10 or less over the last 90 days
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 1/6/2009(UTC) Posts: 36 Location: Los Angeles
Thanks: 4 times
|
Hi, How can I find the average closing price at $0.10 or less over the last 90 days?
I get stuck trying to figure the "average" part.
Thanks, Mark
|
|
|
|
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)
|
Something like: Code:
data:=C;
limit:=0.10;
lookback:=90;
test:=data<=limit;
num:=sum(data*test,lookback);
den:=sum(test,lookback);
avg:=num/max(den,power(10,-8));
{plot/return}
avg;
wabbit [:D]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 1/6/2009(UTC) Posts: 36 Location: Los Angeles
Thanks: 4 times
|
Thanks for your great - and quick - response!
Mark
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
Find average closing price at $0.10 or less over the last 90 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.