♥ 0 |
Hahn, I have a lower study that plots a number value. How can I color code that value the same color as the candlestick for that day? So if there was a green candlestick on July 27th I need the plot color green. If there was a red candlestick on July 28th I need the plot yellow. Thank you Hahn!
Marked as spam
|
Private answer
Without any source code I will provide a rough template. You will need to adapt this to your code.
Just doing this freehand. I have not tested this on the platform. You can read more here: http://toslc.thinkorswim.com/center/reference/thinkScript/Functions/Look—Feel/AssignValueColor.html Marked as spam
|
Please log in to post questions.
It says cannot call AssignValueColor. What should I do?
signal.AssignValueColor(Color.CURRENT);
Well I did mention you will have to adapt this to fit your code. You did not provide any code so there is very little I can do to solve the issue. You can take these three lines of code and paste them into a new study. This can perhaps show you how it works and help you understand how to apply it to your code:
declare lower;
plot signal = close > open;
signal.AssignValueColor(if signal then Color.UPTICK else Color.DOWNTICK);