PureBytes Links
Trading Reference Links
|
On Feb 16, 2:42pm, David.Cicia. wrote:
> Subject: Bar Compression?
> Does anyone know how to write an EL program that will output an ascii file
> (print statement) that compresses several bars into one. For instance,
> taking a daily bar chart and outputing an ascii file that represents 3-day
> bars.
>
> thanks,
> David Cicia
>-- End of excerpt from David.Cicia.
Something like this?
inputs: Length(3);
vars: Copen(0), Cclose(0), Chigh(0), Clow(0);
if mod(current_bar - 1, Length) = 0 then Copen = Open;
if mod(current_bar, Length) = 0 then begin
Chigh = highest(high, length);
Clow = lowest(Low, length);
Cclose = Close;
print(File("C:\data\pdata.dat"),
Date:8:0, Copen:9:2, Chigh:9:2, Clow:9:2, , Cclose:9:2);
end;
--
--
| Gary Funck, Intrepid Technology, gary@xxxxxxxxxxxx, (650) 964-8135
|