intrabarpersist lastPrice (0);
if currentbar = 1 then
firstBar = currentbar;
lastPrice = close;
if ExtendLeft = true then begin
for value1 = 0 to (currentbar - firstBar) begin
if ExtendRight = true then begin
for value1 = 0 to RightShift begin
Plot1[-value1](lastPrice, "lastPrice", Color);
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...
This is one of those basic studies that should be built in MC.