erase a trendline  [SOLVED]

Questions about MultiCharts and user contributed studies.
florianp3
Posts: 20
Joined: 10 Jun 2014
Has thanked: 4 times

erase a trendline

Postby florianp3 » 16 Mar 2015

I use tl_new_bn to draw a new trendline for each new bar with a higher low.
How can I erase the older intermediate trendlines, so that my historical chart will keep only the the last trend lines that respect the condition?

Code: Select all

vars:tlup(L);

condition1=L>L[1];

if condition1 then begin
tlup=tl_new_bn(barnumber-1,L[1],barnumber+1,2*L-L[1]);
end;

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: erase a trendline  [SOLVED]

Postby TJ » 16 Mar 2015

I use tl_new_bn to draw a new trendline for each new bar with a higher low.
How can I erase the older intermediate trendlines, so that my historical chart will keep only the the last trend lines that respect the condition?

Code: Select all

vars:tlup(L);

condition1=L>L[1];

if condition1 then begin
tlup=tl_new_bn(barnumber-1,L[1],barnumber+1,2*L-L[1]);
end;
Look up

TL_Delete


Return to “MultiCharts”