The support forum is built with (1) General and FAQ forums for common trading queries received from aspiring and experienced traders, and (2) forums for course video topics. How to Trade Price Action and How to Trade Forex Price Action videos are consolidated into common forums.
Brooks Trading Course social media communities
Avisos
Vaciar todo
Programming & Automation
2
Mensajes
2
Usuarios
2
Me gustas
1,028
Visitas
Topic starter
17/06/2023 12:12 pm
//@version=5 indicator("18-bar Range", overlay = true) var float rangeHigh = 0 var float rangeLow = 0 var box myBox = na newDay = ta.change(time("D")) barsCount = ta.barssince(newDay) if (barsCount == 0) rangeHigh := -9999999 rangeLow := 9999999 if (barsCount > 0 and barsCount < 18) if (high > rangeHigh) rangeHigh := high if (low < rangeLow) rangeLow := low if (barsCount == 17) myBox := box.new(left = bar_index + 1, top = rangeHigh, right = bar_index, bottom = rangeLow, border_color = color.new(#74aa74, 90), bgcolor = color.new(#cce2cc, 80)) if barsCount >= 17 myBox.set_right(bar_index)
17/06/2023 3:56 pm
Thanks PB.