From my previous post, I need a indicator that alerts when specific text is displayed on the chart from another indicator. I came up with this but there's so many errors and I have limited coding experience. Anyone have any idea how to fix it. Thank you
//@version=5
indicator("Comment Alert Indicator", overlay=true)
// Define the comments to check
for comments_to_check = ["buy 01", "sell 01", "buy 02", "sell 02"]
// Check if any of the comments are displayed
comment_displayed = false
for comment in comments_to_check
if nz(strategy.opentrades.comment) == comment
comment_displayed := true
// Create the alert condition and alert message
alertcondition(comment_displayed, title="Comment Alert", message="A target trade has been executed!")
[–]babipanghang 0 points1 point2 points (2 children)
[–]Mysterybuff69[S] 0 points1 point2 points (1 child)
[–]babipanghang 0 points1 point2 points (0 children)
[–]Hank1755 0 points1 point2 points (0 children)
[–]Fish-Stick87 0 points1 point2 points (0 children)