Display difference between high of day and current bid


Category:
0
0

Hello Pete,

I wanted to know if it was possible to display text column in watchlist showing the SUM in price not percentage  between the High of the Day and Real Time Bid Price?  And also show the Output in Green Text

Ex. (HOD)  – (BID) =  SUM GREEN

Thanks for any help.

Ellis

Marked as spam
Posted by (Questions: 3, Answers: 5)
Asked on February 15, 2021 7:56 am
88 views
0
Private answer

The correct title for this question is "Display difference between high of day and current bid". The title you entered "Sum Watchlist Field" will not help the rest of our viewers to understand what you have requested when searching and browsing for solutions in the forum. So the title of your question has been updated, which has also caused the original URL of this post to be broken.

Not sure why you used the term "SUM", because the formula you provided is the "DIFFERENCE" and not the "SUM".

The bid price is not available from within a custom watchlist column. You think it would be available since you can add that as one of the built-in columns. But when you try to plot the following in a custom watchlist column you get a return value of NaN:

plot data = bid;

So the nearest solution you can achieve here is to get the current (most recently traded) price.

plot data = close;

In order to compute the formula you listed in your request you can set the custom column to a daily time frame and enter the following line of code:

plot data = high - close;

Yes, it will report the computed value in real time but only during regular session hours.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on February 15, 2021 8:38 am
0
Thank you Pete This is exactly what I needed. Ellis
( at February 15, 2021 8:44 am)
0
What line of code can I use to turn text Green? Ellis
( at February 15, 2021 8:55 am)
0
Add the following: data.SetDefaultColor(Color.GREEN);
( at February 15, 2021 9:55 am)
0
Thanks again Pete for all your Help Ellis
( at February 15, 2021 11:19 am)