Keeping track of intraday highs and lows in a DataSet
Author: dankimel
Creation Date: 6/25/2010 9:34 AM
profile picture

dankimel

#1
I'm writing a daytrading script on a 1 minute time scale in which I need to keep track of the running overall highs and lows at time t (or the current bar) during the day of each stock in a data set, such as Wealth-Lab 100.

Normally, in programming I would put an index on each of the stocks of the list, but Wealth-Lab does not seem to me to explicitly assign an index to each of the stocks as it cycles through the list.

So my question is: How do I keep track of the running highs and lows of each stock of a data set in a daytrading script?
profile picture

Cone

#2
QUOTE:
Wealth-Lab does not seem to me to explicitly assign an index to each of the stocks as it cycles through the list.
In what way is it preventing you to do this? How are you trying to do it?

QUOTE:
How do I keep track of the running highs and lows of each stock of a data set in a daytrading script?
This isn't clear. Do you mean that when you're processing symbol "A", that "A" has to know what the B, C, D, and E are doing? On what scale basis? How is the hi/lo information consumed? (a composite indicator, data in a list for reference, ...)
profile picture

dankimel

#3
How have I tried to do this? I don't know how to try, thus the post.

Does stock A, while being processed, have to know about stock B, C, etc. No.

Let me be precise about what I want to do. During the day of daytrading, at the current bar (or time t), on a 1 minute time scale, I want to keep track of the overall intrady highs and lows of stock A up to the current bar while it is being processed. Then I want to do the same with stock B, etc., through the list. For each stock I want to form an indicator like (Close[bar] -Low)/(High - Low)*100 which would tell me, for each stock while it is being processed, where it is in % with regard to the the intraday high-low range of the stock up to the current bar.
profile picture

Cone

#4
CODE:
Please log in to see this code.
profile picture

dankimel

#5
Fantastic! Thanks.
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).