I found the following code posted by a well respected ET member who no longer wishes to participate on the ET forum. Huge loss for the forum in my opinion.
It is written in TS Easy Language, which I am not familiar with. Would someone that knows TS translate the code into plain English? Thank you.
Or specifically, what are meanings of the following expression or functions?
date <> date[1] ( today's day not day 1 of the week or month?)
dayofweekfix
highd (high of the day ?)
high[1] (high of the first day this week ? month?)
what's the time frame of the bar here? (week?)
----------------------------
variables:
hh(0),ll(0),tgt(0);
if date <> date[1] then
begin
if dayofweekfix(date) = 1 then
begin
hh = 0; ll = 99999;
end;
tgt = (highd(1) - lowd(1) + highd(2) - lowd(2) +
highd(3) - lowd(3))/15;
end;
if high[1] > hh then hh = high[1];
if low[1] < ll then ll = low[1];
if adx(14) > 25 then
begin
sell 1 contract next bar at hh limit;
buy 1 contract next bar at ll limit;
end;
exitlong at hh + tgt limit;
exitshort at ll - tgt limit;
It is written in TS Easy Language, which I am not familiar with. Would someone that knows TS translate the code into plain English? Thank you.
Or specifically, what are meanings of the following expression or functions?
date <> date[1] ( today's day not day 1 of the week or month?)
dayofweekfix
highd (high of the day ?)
high[1] (high of the first day this week ? month?)
what's the time frame of the bar here? (week?)
----------------------------
variables:
hh(0),ll(0),tgt(0);
if date <> date[1] then
begin
if dayofweekfix(date) = 1 then
begin
hh = 0; ll = 99999;
end;
tgt = (highd(1) - lowd(1) + highd(2) - lowd(2) +
highd(3) - lowd(3))/15;
end;
if high[1] > hh then hh = high[1];
if low[1] < ll then ll = low[1];
if adx(14) > 25 then
begin
sell 1 contract next bar at hh limit;
buy 1 contract next bar at ll limit;
end;
exitlong at hh + tgt limit;
exitshort at ll - tgt limit;