MACD Scan for Color (Consecutive Dark Red)


Category:
0
0

Hi Pete. Thanks for such a quick response on my scanner question from this morning (linked below).  Your advice helped me refine my idea so I’m now looking at a MACD scanner that would alert off consecutive dark red bars after three or more light red bars. The Condition Wizard tutorial you linked was a big help, and I’ve since added two more conditions to my original scan. However, I’m now having an issue getting to the exact setup and I’m pretty sure I’m not using the Offset correctly. Below I have provided link to the previous post, the updated script, and a screenshot of the exact setup I am trying to alert.  Thank you.

MACD watchlist background color

http://tos.mx/s2B9yYG

 

Attachments:
Marked as spam
Posted by (Questions: 3, Answers: 0)
Asked on January 3, 2021 3:56 pm
290 views
0
Private answer

Use the solution provided here:

https://www.hahn-tech.com/ans/ttm-wave-scan-for-second-yellow-bar-after-2-or-more-red-bars-histogram/

And replace this:

def hist = TTM_Wave().Wave1;

With this:

def hist = MACD().Diff;

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on January 3, 2021 5:30 pm
0
Thanks for the solution Pete. I was also looking into this. I also took the liberty of modifying your other TTM script for anyone interested... THREE CONSECUTIVE BRIGHT GREEN BARS THEN ONE DARK GREEN BAR "#CYAN BAR IS LIGHT GREEN #DARK BLUE = DARK GREEN #RED = BRIGHT RED #YELLOW =  DARK RED input price = CLOSE; input length = 20; input nK = 1.5; input nBB = 2.0; input alertLine = 1.0; def hist = MACD().Diff; def histCyan = hist > 0 and hist > hist[1]; def histBlue = hist > 0 and hist < hist[1]; def histRed = hist < 0 and hist < hist[1]; def histYellow = hist < 0 and hist > hist[1]; plot scan = histblue and histcyan[1] and histcyan[2] and histcyan[3]; #scan for 3 bright green bars followed by one dark green bar"
( at February 3, 2021 4:36 pm)