♥ 0 |
Hi Once again thanks for your help with the label of the Advanced Declined Cumulative Average. My apologises for having another question with regards to labels. I will like to add the days to earnings column to the watchlist. I have actually create the column based on what you recommend in a previous question posed on the forum based on the GetEventOffset function in TOS. However, i will like to change the colour of the number (as in the number of days) in the column. I am looking at If number of days is more than 7, green numbers. if number of days is 7 or less, red colour. Appreciated if you can help me once again. Thank you
Marked as spam
|
Private answer
Please keep this details in mind as you post new questions in this forum. Here is the code for the solution you requested. I took the code from the previous solution I linked to in bullet point 3 and I added two lines of code. One to contain the number of days and another to dynamically set the color of the value based on that number.
Marked as spam
|
Please log in to post questions.
I can tell you how to reverse the negative value to a positive value on the solution that I provided. Change the last TWO lines of code to the following: plot data = GetEventOffset(”eventType” = Events.EARNINGS) * -1; data.AssignValueColor(if data > limit then Color.GREEN else Color.CURRENT);