Hi everyone
I am looking for some pionter / help to plot 30 or more trendlines on a chart.
I know how to set the values for the starting and end point and allthough date and time.
I what to use a for loop to plot trendline 1 to X
How could i assign to the trendlien array the line number
Here a piece of code, but it give me a error message:
Inputs:fclose(close),length(70),Min(3080.00),Max(4900.000);
vars:ntl(0),sDate(date),stime(time),counter(0),sVal(0);
Arrays: RHDate[10](99999), RHTime[10](99999), RHVal[10](99999),RHTLRef[10](99999);
if currentbar = 1 then begin
RHDate[0] = Date[0];
RHTime[0] = Time[0];
for counter = 1 to 28 begin
if counter = 1 then begin
sVal = Max;
ntl = 1;
end
else
sVal = sval - length;
ntl = ntl +1;
end;
end;
For counter = 1 to ntl begin
sVal = sval - length;
RHVal[counter] = sVal;
RHTLRef[counter] = TL_New(RHDate[0], RHTime[0], RHVal[counter], LastCalcDate , RHTime[0], RHVal[counter]);
RHTLRef[counter] = TL_SetExtRight(RHTLRef[counter], true);
RHTLRef[counter] = TL_SetStyle(RHTLRef[counter], -3); {dashed}
end;
I am looking for some pionter / help to plot 30 or more trendlines on a chart.
I know how to set the values for the starting and end point and allthough date and time.
I what to use a for loop to plot trendline 1 to X
How could i assign to the trendlien array the line number
Here a piece of code, but it give me a error message:
Inputs:fclose(close),length(70),Min(3080.00),Max(4900.000);
vars:ntl(0),sDate(date),stime(time),counter(0),sVal(0);
Arrays: RHDate[10](99999), RHTime[10](99999), RHVal[10](99999),RHTLRef[10](99999);
if currentbar = 1 then begin
RHDate[0] = Date[0];
RHTime[0] = Time[0];
for counter = 1 to 28 begin
if counter = 1 then begin
sVal = Max;
ntl = 1;
end
else
sVal = sval - length;
ntl = ntl +1;
end;
end;
For counter = 1 to ntl begin
sVal = sval - length;
RHVal[counter] = sVal;
RHTLRef[counter] = TL_New(RHDate[0], RHTime[0], RHVal[counter], LastCalcDate , RHTime[0], RHVal[counter]);
RHTLRef[counter] = TL_SetExtRight(RHTLRef[counter], true);
RHTLRef[counter] = TL_SetStyle(RHTLRef[counter], -3); {dashed}
end;