Reputation: 29
I am trying to modify a built in script with an alert function Price Channel Strategy but I can not get it to work.
My problem is that the options doesn't appear in "Create Alert" to chose my alerts xxxLONGxxx and xxxSHORTxxx
Only thing I added is (like the documentation suggests):
alertcondition(hh, title='xxxLONGxxx', message='GO LONG!')
alertcondition(ll, title='xxxSHORTxxx', message='GO SHORT!')
Whole script:
strategy("Price Channel Strategy", overlay=true)
length = input(120)
hh = highest(high, length)
ll = lowest(low, length)
if (not na(close[length]))
strategy.entry("PChLE", strategy.long, comment="PChLE", stop=hh)
strategy.entry("PChSE", strategy.short, comment="PChSE", stop=ll)
alertcondition(hh, title='xxxLONGxxx', message='GO LONG!')
alertcondition(ll, title='xxxSHORTxxx', message='GO SHORT!')
Why it isn't working?
Upvotes: 0
Views: 1878