Cannot get watchlist column to accept dma over ema code.


Category:
0
0

Hello, Peter.

I watched your video and tried to get this code to work.  I just want it to show on the watchlist “red for valid” or “black for not valid.”  Not sure what I am doing wrong here as I keep getting an error.  Thanks in advance!

DMA(“displace” = 5) is greater than MovAvgExponential().”AvgExp”

plot cond = dma is greater than movAvgExponential;

assignbackgroundcolor (if cond >= 1 then color.RED else color.BLACK);

RESOLVED
Marked as spam
Posted by (Questions: 2, Answers: 3)
Asked on July 16, 2017 11:06 am
81 views
0
Private answer

The error is created by mixing statements from the condition wizard with statement of actual code. You cannot mix the two.

plot cond = DMA(“displace” = 5) is greater than MovAvgExponential().”AvgExp”;
assignbackgroundcolor (if cond >= 1 then color.RED else color.BLACK);

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on July 16, 2017 11:29 am
0
Private answer

Thank you!  Still learning and sometimes the simpliest ones are the most confusing!

Marked as spam
Posted by (Questions: 2, Answers: 3)
Answered on July 16, 2017 3:55 pm