PureBytes Links
Trading Reference Links
|
Thank you so much! I just hope I could one day be proficient in EL to repay
the debt...
Your code works exactly as it should, I put it to test right away.
At the risk of bothering you, I have two more questions related to
trendlines.
I first doubled the number of trendlines to check whether or not TS would
test multiple trendlines; and it does.
My question 1: any idea how many trendlines on the chart would return a
"-11" error {too many trendlines on the chart}? I'd hate to spend a couple
of days drawing trendlines only to see this message:-((
My question 2. Of course I'd be also interested in trendlines applied to
indicators, not just price bars. I first opened Price Volume Trend and drew
a couple of trendlines. Then I rewrote the code so it reads as follows:
if CurrentBar = 1 then begin
Value1=TL_GetBeginDate(0);
Value2=TL_GetBeginTime(0);
Value3=TL_GetBeginVal(0);
Value4=TL_GetEnddate(0);
Value5=TL_GetEndTime(0);
Value6=TL_GetEndVal(0);
end;
if Date >= Value1 and Date <= Value4 then begin
Value7 = TL_GetValue(0, Date, Time);
if PriceVolTrend crosses over Value7 then buy on close;
if PriceVolTrend crosses under Value7 then sell on close;
end;
if CurrentBar = 1 then begin
Value8=TL_GetBeginDate(1);
Value9=TL_GetBeginTime(1);
Value10=TL_GetBeginVal(1);
Value11=TL_GetEnddate(1);
Value12=TL_GetEndTime(1);
Value13=TL_GetEndVal(1);
end;
if Date >= Value8 and Date <= Value11 then begin
Value14 = TL_GetValue(1, Date, Time);
if PriceVolTrend crosses over Value14 then buy on close;
if PriceVolTrend crosses under Value14 then sell on close;
end;
This, however, yields nothing... I then presume the Values 1-14 refer to
price bars? The manual says nothing to that effect... I also haven't found
variations of TL_Get Value functions. Hence my question 2: any way to test
Trendlines on indicators?
Thanks,
Yarroll
|