[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


Dennis and Gary are well on the way to delivering the original poster an automated solution...  This reply is not intended for them, as they are well beyond this.

To the original poster:  You might consider simply tracking this manually and having two inputs to your strategy which you adjust on a weekly basis.  Your strategy, inserted on your 5-minute chart would contain the following code:



Inputs:

AnHigh(20000),
AnLow(0);


If {Your buy conditions} and C > AnHigh then buy;
If {Your sell conditions} and C < AnLow then sell;


Every week you manually check to see whether a new 52-week high or low has been struck and adjust these inputs accordingly.  You might even stick a couple horizontal lines into your charts to identify these levels so that each weeek it is easy to see visually whether they've been penetrated...  Not a sexy solution but it would work for a limited number of charts...


Good trading,

OM




 ---- you wrote: 
> > All you need is two 52-long single-dimension arrays, to hold the 
> > weekly high and low for each of the last 52 weeks.
> 
> Yeah but with TS4 you can't load 52 weeks of daily or weekly data when
> data1 is 5 minute bars. TS will only let you load the number of days or
> weeks corresponding to 13,000 5-min bars. You need to do the weekly
> stuff on another chart. I just write the long-term info to an ascii file
> and load  that into the minute chart as data(x) but maybe one of the
> DLLs could automate it. The trick would be getting the dates in sync on
> the 2 charts.
> 
> -- 
>   Dennis
>