Color Values in accordance to above or below Open.


Category:
0
0

One more Request: …. In response to my request on Sept. 27 “ How to change value colors on a label”.

input SYMB = “/VX”;

def VX = close(symbol = SYMB);

def O = open (symbol = SYMB);

AddLabel(1, “/VX: ” + ” = ” + VX, if VX > O then Color.RED else if VX < O then Color.GREEN else Color.WHITE);

# End Code

After looking over all your watch list requests I Don’t see this.

Would it be possible to create code for a watch list column that would do this same thing. In the past we have been able to change value colors on studies added to watch list columns.

Again assuming this is possible, And you are willing, We could then create a watch list of the products we wish to monitor, customized by name and one column, then detach and place on our chart. I also see where we can turn off after hour information. In a watch list column that would have no effect on my chart so Open should be US OPEN when checked.

This might be even better if we create the watch list column as a 2 Minute study and placed it on a 5 minute chart that I use for Trade execution.

Let me know your thoughts. Thanks again for your time.

Ed

Marked as spam
Posted by (Questions: 5, Answers: 5)
Asked on September 29, 2019 12:19 pm
89 views
0
Private answer

If I understand your request. You want the color of the watchlist column to change green/red based on the difference between the current day's 9:30 open and the current close (last price during live markets).

A simple test using two columns confirms these statements are reading this data from a watchlist column set to daily time frame. Screenshot below shows the result. Here is the code for those two columns shown:

plot data = open;

plot data = close;

So we don't need to do anything fancy to force this to read the 9:30 am open. Just use the daily time frame and the code provided in the following post:

https://www.hahn-tech.com/ans/calculate-percent-change-from-opening-bell-to-current-close/

Whatever ticker symbol you add to the watchlist will be computed in the same way. Second screenshot below shows all three columns for a list of futures contracts.

 

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4084)
Answered on September 29, 2019 1:21 pm