I’ve been programming for a short time and I’ve run into a problem. The thing is that I want to make a program that scans a list of stocks for 250 days. On each of those days it finds the opening price of the day and also the share price at a given hour and at another given hour, data that will then be processed.
The intention is to make a screener that calculates the percentage by which a stock at a given hour (H1) exceeded the indicated % (perH1) with respect to the opening of the day (opening),and at another indicated hour (H2) it was below another indicated percentage (perH2) (with respect to the opening price).
I have written this program but I don’t think it works well. I suppose the problem is that the TIMEFRAMES are not nested. I need the program to access the hours of each of the days. How do I do this?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
H1=1//First check: hour after start of session
perH1=0.5// First check: percentage of change from opening
H2=7// Second check: hour after start of session
perH2=0// Second check: percentage of change from opening
Do not double post. Ask your question only once and only in one forum. All double posts will be deleted anyway so posting the same question multiple times will just be wasting your own time and will not get you an answer any quicker. Double posting just creates confusion in the forums.
My intention was actually to go through the last 250 days and take data from specific hourly bars each day and then process de data.
How would you do it? Is it possible? Thanks for your answer.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue