BlueJayBird

[VTaL] Vertical Time Alert Lines - By BlueJayBird

BlueJayBird Updated   
🦾 USE
- Vertical lines drawn ON TOP of chart at selected key times of the day, week, month, year.
- You can use it at any symbol (as far as I know).
- Programmatic alerts available.
- Lines from lower time-frames are selectively NOT visible at higher time-frames. Example: At 1h time-frame, vertical lines from 1h and 4h intervals are not visible. Drawing them is considered not really useful.

🎭 MAIN FEATURES
- Available targeted times: 3m, 15m, 1h, 4h, 1D, 1W, 1M, 1Y.
- Offset available for all lines. Example: 1 offset for 4h moves lines from 4AM to 8AM.
- Programmatic alerts for all lines. Example: If alert is enabled for 15m lines, every time those lines are reached, alert will trigger.
- Available drawing themes: Custom, Light, Dark.

💻 NOTES ON CODE
- Vertical lines are drawn using a custom function, which uses line.new() built-in function.
- Alerts are triggered using ta.cross() built-in function. Alert is triggered when close price crosses a given time value from the line.get_x1() built-in function.
- I've added, where necessary, several comments to the code for understanding what's going on. If you have additional questions, you may ask them in the comment section of the publication.
- 3m lines are not really useful in day-trading, they were added for debugging purposes mainly. Useful for learning how to use alerts, though.

👉🏼 NOTES ON ALERTS
- When setting up an alert, the targeted line must be enabled/visible.
- Every time any alert is enabled or disabled, you must create AGAIN the alert from the "Alerts" panel (remember, alerts run in the back-end).
- Alerts contain really useful information. If you have any idea for adding some other data, tell in the comment section. 💡

⚠️ KNOWN ISSUES
- None. Let me know please if you find any.

--------------------------------------------
~ Comment , Follow and Boost ~ 🚀
Release Notes:
Small script update.
Release Notes:
  • Code simplified.
  • Fixed vertical line 1D future.
Release Notes:
  • Removed custom theme.
  • Function for vertical lines slightly modified.
Release Notes:
  • Published as local version.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?