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

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



PureBytes Links

Trading Reference Links

I'm hoping an EL guru out there can help me.

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!

So, I attempted to use the following, which would update on the close of

every 5-minute bar:

    value1 = MaxList(value1, HighW(0) ) ;
    if close >= value1 then Buy at Market;

I thought I could use the "HighW" (weekly high) function in EasyLanguage

bundled with TradeStation 4 to solve my problem..  ..However, I've
looked at the EL code for "HighW", and it appears to simply reference
"Data1" series--which in my case is intraday, so it will simply return
"-1" since the compression is not daily..  Moreover, even if it does
work using intraday data, it seems to me "value1"(as I've written it
above) is only going to contain series data for only "MaxBarsBack"
number of bars, correct--not 52 weeks?

Perhaps someone's already gone down this road before??  I'd certainly
love to hear it if so!
thanks
ian