Triggering Alerts from kscript

I wanted to share a feature request that I believe would significantly improve the flexibility of Kiyotaka.

Right now, alert conditions are extremely simple and limited because they can only be defined through the UI when creating the alert. In many cases, the logic inside a script is far more dynamic and complex than what the alert panel can express.

Feature request:
Enable alerts to be programmatically triggered directly from Pine Script using something like alert(), not just sending a message for an already-created alert, but actually allowing the script to define the condition itself at runtime.

Concretely:

  • Users should be able to call alert("LONG") inside their logic.

  • In the alert creation panel, the user simply selects “Allow script-triggered alerts” (similar to “Any alert() function call”).

  • Kiyotaka should fire an alert whenever the script executes the alert() call.

This would completely unlock scripts that rely on multi-step logic that simply cannot be pre-defined as a static alert condition in the UI. It would be much more powerful if:

  • A script could register multiple named alerts in code (e.g., alert("long_signal"), alert("short_signal")), and

  • The alert panel would even allow users to pick which one(s) to activate.

This would bring Kcript much closer to full automation, without requiring users to choose between oversimplified alert conditions. I hope this is something the team might consider — it would be an enormous improvement for quantitative and algorithmic traders.

Thanks!
Gianluigi

Upvoters
Status

In Review

Board
💡

Feature Request

Date

3 months ago

Author

An Anonymous User

Subscribe to post

Get notified by email when there are changes.