Column for EMA Cross Above VWAP UpperBand


Category:
0
0

I think I am close here. Trying to get a watchlist column that turns green (or whatever color) when the following is true:

  • (X) EMA crosses above VWAP UpperBand (at 1.0 SD) within the last (Y) bars

I like to see this on a 10-min chart. I don’t get any errors in the code, but the column is not changing color (all zeroes right now). Any thoughts?

Code Attached

Attachments:
Marked as spam
Posted by (Questions: 4, Answers: 6)
Asked on September 17, 2020 10:16 am
161 views
0
Private answer

How to troubleshoot this. Add your code as a new chart study and plot the individual components to make sure all of them are doing what you expect.

Your implementation of the MovAvgExponential() study is not correct. That chart study requires a total of 4 inputs. You provided only a single input parameter and you did not name it. So the chart study is using the value of 3 as the input value of the first parameter "price".

Full details are available here:

https://toslc.thinkorswim.com/center/reference/Tech-Indicators/studies-library/M-N/MovAvgExponential

You can avoid this common problem by always provided each and every input parameter in the correct order, separated by commas:

plot myEMA = MovAvgExponential(close, 3, 0, no);

If you only provide a single input parameter and let the rest of the inputs use the default value of the chart study that is fine. But you must provide a name for each input so the chart study knows which of the inputs to apply your parameter to:

plot myEMA = MovAvgExponential(length = 3);

 

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on September 17, 2020 10:45 am
0
That did the trick! Thank you, as always!!!
( at September 17, 2020 11:09 am)