Reputation: 21
I have little experience programming.
I have script that recognises a doji candle and changes the colour to yellow.
First can you write a script that create a alert fi=unction for a colour change?
Secondly how do you create a alert to change a colour of a candle what function is chosen from the conditions pull down menu that starts from crossing .... and ends with .... moving % down ?
Could I chose for example when the candle is recognised as a doji 1.Moving up % in 1 bar OR 2. Moving up .20 in 2 bars?
to set the alert?
Cheers
Upvotes: 0
Views: 466
Reputation: 21342
You need to write your own code for that.
You probably have something like this in your code:
barcolor(cond ? color.yellow : na)
Use that condition that changes the color to yellow to trigger your alerts.
fire_alert = not cond[1] and cond // Only trigger the alert once
alertcondition(fire_alert, "Color changed", "Color changed to yellow")
Upvotes: 0