OPEN-SOURCE SCRIPT

Key Levels

519
I couldn't find an indicator that plotted previous day and intraday key levels like I wanted.

This indicator plots key levels on the chart:
  • Current session high (HOD) and low (LOD)
  • Previous day high (PDH), low (PDL), and close (PDC)
  • Overnight high (ONH) and low (ONL) based on a defined overnight window

    At the start of a new session (day), the indicator resets its values and creates a new set of labels.
    These labels are positioned in a fixed horizontal column (offset from the current bar) and are updated each bar so that they remain vertically aligned with their corresponding level (with a small vertical offset).

    Inputs you can modify:
  • Futures Mode and session times for equities and futures.
  • Horizontal label offset (in bars) and vertical offset (price units) for label positioning.
  • Colors, line widths, and styles for each level (day high, day low, overnight high/low, previous day levels).

    Adjust these inputs to match your market hours and desired appearance.

    Zero background in coding, but worked with chatGPT to develop this, and it works for me. Would welcome any and all feedback.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.