
Originally Posted by
amiuser
I looked at your code . You had this ..
Short = Sell;
Cover = Buy;
you are not using this variables after assigning though.
I'm worried which is better..... Should I use Short/Cover or Buy/Sell ....which is the best practice ?
What you wanna have as Short and Cover rules is up to you.
But to make alerts for those ones ... again just read what is written in the manual
Code:
AlertIf( Short, "EMAIL", "Short triggered for " + Name()+ ", " + "Short@: " + ValueWhen( Short, Close ), 3, 1, 100 );
AlertIf( Cover, "EMAIL", "Cover triggered for " + Name()+ ", " + "Cover@: " + ValueWhen( Cover, Close ), 4, 1, 100 );
Lookback = 100 is just for testing. For realtime alerts you can set it to 1.
Bookmarks