SRText

Last bar's Support & Resistance
Description
Support and Resistance values displayed as text on the side of the chart area. These values are the S2 and R2 values of the pivot points for the last bar in the chart.
Category
Extended
Parameters

None

Chart Script

M :=(H+L+C)/3;
A :=H-L;
RR:=M+A;
SS:=M-A;
R:BackSet(IsLastBar,5)*RR.LastData,Width2,HighSpeed,ColorRed;
S:BackSet(IsLastBar,5)*SS.LastData,Width2,HighSpeed,ColorDarkGreen;
DrawNumber(BarsSince(R)==1,R,R,'f2'),Label0,VCenter,Right,ColorRed;
DrawNumber(BarsSince(S)==1,S,S,'f2'),Label0,VCenter,Right,ColorDarkGreen;