PureBytes Links
Trading Reference Links
|
Phillipe,
>To be used in a strategy, i am trying to build an index based on
>indicator's calculations on six different time frame of the same
>data on data1. Do you know how to code that in EL (TS2000i) in a
>function (or six functions if necessary) to but WITHOUT THE NEED
>TO PLOT the datas in the six time frames data1, data2, data3 ...?
>(that would be too heavy to be monitored in real time datafeed with
>a strategy).
In data1 you need data having the smallest time increment you will
use. For example, if you need to calculate on 30 min bars, 5 min
bars, 180 min bars, and daily bars, then you need data for 5 minute
bars.
You can use HighD, HighW, etc. to get the high, low, and close
for daily, weekly, monthly, etc. data. The only problem is that
these functions assume the day starts at midnight, and includes all
sessions. If that is not acceptable, well, I have some replacement
functions that you can download as a TS2000i ELS. See
http://www.purebytes.com/archives/omega/2004/msg01984.html for more
info.
For the other intraday bars, you will need to maintain them in
arrays for open, high, low, and close for each time unit. So for
example, for 30 minute bars you would use the last six 5-minute
bars, every time mod(time,30)=0.
-Alex
|