Bonjour Nicolas
Is there a way to get Donchian based HH & LL’s over n periods to persist and continue to draw their respective levels to the right rather than being re-written at the next period refresh? I appreciate this may make a chart look at little messy over the course of a day but for me it would be useful to identify S&R zones as the trading day evolves.
Thanks in advance
::copperwave
Hello Copperwave,
Since we never know in advance, how much time the higher high and the lower low will change in a day, it would involve to build multiple lines into a data array and there is not possibility to build array with ProBuilder.
So maybe, we could limit the number of past HH and LL lines that can be drawn on chart, and we could build something with, what do you think?
Hi Nicolas – thanks for responding and confirming my thoughts about not being able to do an array. In the meantime I kludged this together:
// p = 60, (1 hour lookback on 1 min chart)
// n = 1
Upper = Highest[p](High)
Lower = Lowest[p](Low)
if Upper > Upper[n] then
PreviousHigh = Upper[n]
PPH = PreviousHigh[n]
PPPH = PPH[n]
endif
if Lower < Lower[n] then
PreviousLow = Lower[n]
PPL = PreviousLow[n]
PPPL = PPL[n]
endif
RETURN upper AS "upper" , lower AS "lower", PreviousHigh AS "PH", PreviousLow AS "PL", PPH AS "PPH", PPL AS "PPL", PPPH, PPPL
While the previous HH and LL’s get drawn, they eventually get overwritten every 60 bars…or whatever p is set to and so it begins to look like strange Darvas boxes. If it is possible to limit to the past 4 HH & LL’s that would be something 🙂
Many thanks
::copperwave
Maybe an alternative would be to only allow once the new HH and LL to be set with different periods. Then you can add many instance of the same indicator on the chart.
That would get me different overlaid Donchian channels if I understand your suggestion correctly. That isn’t what I am after. All I want to do is preserve an existing HHLL level to the right while re-writing the new one’s as they occur.
Thanks
::copperwave
Hmm but it’s not possible to draw things at the right of the price.
In 10.3 version we could draw on the last bar some lines or maybe rectangles, but they may overlay on candlesticks.
Hi – OK, well I guess I’ll have to stick to drawing lines manually then 🙂
Thanks
::copperwave
Recently I had an idea about drawing a kind of a “market profile” indicator overlaid on the recent candlesticks, made of recent highs/lows. It is still an idea, like many others on my to-do list.