Tradingview Pinescript Indicator

Job ID: 38178721

Budget: $30 – $250 USD

Indicator should draw Previous Week High, Previous Week Low, Previous Day High, Previous Day Low prices in a manner displayed on a screenshot.

If the level has not been taken out, we draw levels as PWH & PDL are displayed.
If level was crossed by later price even by 1 point, we should draw levels in a way like PDH, PWL are displayed on the screenshot.

Visibility Riles:
PDH & PDL levels should NOT be visible higher than 4H timeframe.
PWH & PWL should NOT be visible higher than Daily timeframe.
All levels should NOT be visible below 5 min timeframe.

We don't want to overload the chart with calculations, so indicator better to redraw only once new candle appearance (if possible).
Related categories: Pine Script Trading