Indicator for "previous high / low"

Studies that have been contributed to the community by other users. If you’ve got something useful to share, that’s great!
biffhero
Posts: 47
Joined: 22 Sep 2020
Has thanked: 29 times
Been thanked: 7 times

Indicator for "previous high / low"

Postby biffhero » 27 Sep 2020

Here is an indicator that I use on some of my charts. I hope someone else can find it useful.

If you have any suggestions on how to make it better, I'd love to hear them.

*edit : added "delete" command. That'll teach me to post before testing.
**edit : plot "low" instead of "high" two times. Off to find more coffee.

Code: Select all

{ Put a label for the high and low of the previous candle } Inputs: showLabels(1), showRecentHigh(1), showRecentLow(1); Variables: Offset(.03); if (LastBarOnChart = True) and (showLabels = 1) then begin if (showRecentHigh = 1) then begin Text_Delete(1); Value1=Text_new(Date,Time,(High[1] + Offset),numToStr(high[1], 2)); Text_SetColor(1,color_black); Text_SetBGColor(1,color_green); Text_SetSize(1, 10); end; if (showRecentLow = 1) then begin Text_Delete(2); Value2=Text_new(Date,Time,(Low[1] - Offset),numToStr(low[1], 2)); Text_SetColor(2,color_black); Text_SetBGColor(2,color_red); Text_SetSize(2, 10); end; end;

Return to “User Contributed Studies and Indicator Library”