Watchlist VWAP alert resets 10 bars after trigger


Category:
0
0

Hello everyone, I’m a novice trader and just discover the fantastic work you are doing on this website. I’m looking for a watchlist alert that will return the number one or zero when price crosses the upper or lower band. I’ve found the video that explains how to do this in detail but the alert stays on constantly after the initial tag. I’m looking for the alert to stay on maybe five or ten bars after the initial tag then reset to capture future tags. Your help with this would be greatly appreciated.

The script below is for lower band tags only:

plot myvariable = close is less than or equal to reference VWAP().”LowerBand”;
AssignBackgroundColor(if myvariable then Color.GREEN else Color.DARK_RED);
myvariable.AssignValueColor(Color.BLACK);

Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on May 17, 2020 5:32 pm
137 views
0
Private answer

Always include a link to any resource you list in your question. How are the rest of our viewers supposed to know which video you watched to learn how to build this if you do not include a link? The other question I have is, why do I have to keep telling people to include links to resources they reference in a forum post? It should be common knowledge, but the common folk don't seem to get it.

plot myvariable = close crosses below reference VWAP().”LowerBand” within 10 bars;
AssignBackgroundColor(if myvariable then Color.GREEN else Color.DARK_RED);
myvariable.AssignValueColor(Color.BLACK);

Marked as spam
Posted by (Questions: 37, Answers: 4117)
Answered on May 17, 2020 6:14 pm