I don't know how trendlines work over the .NET platform but the idea of plotting a line and not a trendline is because we can send it to the back of the bar and it updates in "realtime" when the last price changes whereas a trendline, in the standard platform,has that annoying delay...inputs:
Color (white),
RightShift (50),
ExtendLeft (true),
ExtendRight (true);
variables:
firstBar (0),
intrabarpersist lastPrice (0);
if currentbar = 1 then
firstBar = currentbar;
lastPrice = close;
if ExtendLeft = true then begin
for value1 = 0 to (currentbar - firstBar) begin
plot1[value1](lastPrice,"lastPrice", Color);
end;
end;
if ExtendRight = true then begin
for value1 = 0 to RightShift begin
Plot1[-value1](lastPrice, "lastPrice", Color);
end;
end;
noplot(1);
This is one of those basic studies that should be built in MC.