♥ 0 |
I would like to change the background (or the font color) of my P/L OPEN and P/L DAY with GREEN being a profit, RED, being a loss, and black (white) being no change. I have not been able to figure out how to add a ThinkScript to implement it. Many thanks.
Marked as spam
|
Private answer
First detail I must explain is that it is not possible to modify any of the built-in quote fields you may add to a watchlist gadget. And there is no way to write any script which can change the color of another column. So the only viable solution would be to create new custom watchlist columns from scratch. Thinkorswim provides several functions we can use to display data based on the user's portfolio. You find them listed here: https://toslc.thinkorswim.com/center/reference/thinkScript/Functions/Portfolio From that list, the one that reports the data needed for these two values is named "GetOpenPL()". If you apply that function to a plot statement on a chart study it works perfectly. And you can compute the values you specified and display them in labels on a chart:
The problem is this function does not work when applied to a watchlist. When you take the code that works on a chart study and apply it to a watchlist column it generates an error: "No such function: GetOpenPL". With the current version of Thinkorswim, this solution only works for a chart study but it does not work for a custom watchlist column. For those users of Thinkorswim who feel this is an essential feature, you may consider submitting a feature request to the developers of Thinkorswim. Marked as spam
|
Please log in to post questions.