A little code is written to modify the style of an active trend line style. The goal is to toggle between Style 1 and style 2
The problem is that once I manually select a trendline the style will oscillate between these two values
I did try to set a verification flag ModificationDone that I reset on every pass, but the problem remained.
I want the setting style to remain after the trendline is not anymore selected.
Any idea
Martin
Code: Select all
Active_TL = TL_GetActive;
if TL_GetBeginVal (Active_TL) = TL_GetEndval(Active_TL) then begin
If modificationDone = False then begin
ModificationDone = True;
ActualStyle = TL_GetStyle(Active_TL);
If ActualStyle = 1 then
TL_SetStyle(Active_TL, 2)
else
TL_SetStyle(Active_TL,1);
End;
end;