Count the number of stocks, which are x% away from a limit
Author: ruediger78
Creation Date: 2/13/2012 12:06 AM
profile picture

ruediger78

#1
Hi, Iam relative new to programming. I want to code the following strategy, but don’t know how. Hope you can help me out.
I have a Portfolio of 200 Stocks. Each Stock has a limit each day at which I buy. Now I want to check every morning how close the open to the limit price is. Then I want to count the number of stocks, which are less than 3% away from the limit. If there are many stocks(for example >50) less than 3% away from the limit I want to put each limit further away from the origin.
Is it possible to program this? How?
profile picture

Eugene

#2
Here's something to start with:
CODE:
Please log in to see this code.
profile picture

Cone

#3
Using Index-Lab is another way, but we'd have to beg Eugene to create the Index Definition anyway :)
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).