Title display control in chart

In a price chart (plot) the Open, HI, Low, close values display in title at top left.
Adding an indicator, such as MA displays the Price and MA values dependent on the cursor location.
In this case, a Trendline (Linear Regression) is overlaid the price. The ending value of the trend is displayed, apparently as a default.
Can this tl end value be omitted and replaced with the trendline slope (degrees)?

Thank you very much, David
Relevant code in includes:

//Relevant code re: Title Display

Filter= 1;

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

//User Settings******************************************
	LtlPer = Param("PeriodLong", 14, 5, 100, 1);
	MtlPer = Param("PeriodMid", 8, 5, 100, 1);
	StlPer = Param("PeriodShort", 5, 3, 100, 1);
	QtlPer = Param("QtrPeriod",60,1,240,1);
	
	LemaPer=Param("Lema",20,2,100,1);
	SemaPer=Param("Sema",10,2,100,1);

//Price Chart Plot*************************************
_SECTION_BEGIN("TlinePlot");
	Price = ParamField("Price field",-1);
_SECTION_END();	

_SECTION_BEGIN("TrendLine");	
//Long Period Trend Line+++++++++++++++++++++++++++++++
		x = Cum(1); //Barcount
		pi=3.1416;
		
	lastx = LastValue(x); 
	xPos = SelectedValue(x);

	iL = LinRegIntercept(c, LtlPer);
	sL = LinRegSlope(c, LtlPer);

	diL = SelectedValue(ValueWhen(x, iL, 1));
	dsL = SelectedValue(ValueWhen(x, sL, 1));

	xL = IIf(x > xPos - LtlPer AND x <= xPos, x - (xPos - LtlPer),Null);

	YL= diL + dsL * xL;
	
//Above Trendline code duplicated for Mid(M)and Short(S) periods, only period value changes.

//*****************************************************
//Trendline Slope Degrees******************************
	LslopDeg=atan(sL) * 180/pi;
//addtional code inclues M and S degrees

_SECTION_END();

_SECTION_BEGIN("TL Plot");
//Plot Long
	Plot(YL, "TL-L", colorAqua,styleline );
	
//Plot YL repeated for YM, YS

@dmackeyd, like most things in AB/AFL, you can control it.

The "Title" string is something that you can control.

If you can calculate the value, you can put it in the title.

Your first task is to see if you understand what the current Title string is, and how it is generated. Once you have figured that out, you can then put in only the values and fields that you want

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.