♥ 0 |
Hello there Mr. Hahn, I was able to write the following code for a custom watchlist to give me the dollar difference between yesterday’s close and today’s open: def o = open; def gu = o > c; def diff = o – c; AssignBackgroundColor(if gap > 0 then color.dark_green else if gap < 0 then color.dark_red else color.gray);
The code works perfectly on the watchlist but when I try to adjust the code to show me the percentage difference, the percentages are always off. I am sure that what i’m missing is very simple but I can’t seem to figure it out. I would very much appreciate your assistance with putting this simple code together. Thanks in advance.
Regards,
Marked as spam
|
Please log in to post questions.