[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EL Question - Referencing 52-week High on Intra-Day Chart



PureBytes Links

Trading Reference Links

In a message dated 00-06-17 13:35:49 EDT, you write:

<<  I trade stocks intra-day (5 minute bars), and am aware of TS4's 13,000
 > bar limit.  However, in addition to several intra-day setup criteria I
 > use to take a position, I'd like also to add the following additional
 > critieria--based on a 52-week high:  Only enter a trade on the long side
 >
 > if "Close >= 52-Week high".  Obviously, this would exceed the 13,000 bar
 >
 > limit, if I attempted to load 1 year's worth of 5-minute bars!
 > >>

One approach that would need to be updated each week would be to
define a 2 dimensional array.  One dim being the weekly high, the other  dim
being the weekly closing date. ( Or may this two single dimension arrays.

For each 5 min bar, scan the array 52 elements backward from the date that is
less than the  5 min date.  As you scan, keep track  of the highest high,  
then compare.

Another approach woiuld be to store weekly  prices and times in memory from a
weekly chart through a DLL.  Then read memory from the 5 min chart to find 
the 52 week high for the comparison.

In the above approaches, you would also have to scan the current week's highs
to see if they exceeded the last 52 weeks.


Jim

"  2 + 2 = 5 for large values of 2 "
.