Difference between current day high and low as watchlist column

J-Fearless

New member
VIP
Hi All,

I'm not great at scripting. I do okay but this alludes me for some reason, and I can't find a study that achieves this.

I'm looking for a script that will calculate the difference between the high of a period and the low of period, so I could add it as a watchlist column, and see at a glance without having to examine each chart.

So essentially if ABC stock has had a high of 50, and a low of 40, then the value would be the difference of 10.

Anyone know of a study like this or would be able to assist me in scripting one?

Thanks
 

BenTen

Administrative
Staff
VIP
What's the duration of the period? Previous day's high and low?

Here is an example for your watchlist column:

Ruby:
def prev_high = high[1];
def prev_low = low[1];

plot value = prev_high - prev_low;

Set the timeframe of the column to D (daily).
 

XeoNoX

Active member
VIP
Code:
def today_high = high;
def today_low = low;

plot value = today_high - today_low;

or simpler

Code:
plot scan = high-low;
 

yildamile

New member
Hi. I'm looking for an indicator that shows me the high and the low of the price of the day on the watchlist. In the graph you can see the bubble with the price, I would like to have in the following list the notice of those ups and downs in the price. I will be very grateful if you can help me.
 

XeoNoX

Active member
VIP
Hi. I'm looking for an indicator that shows me the high and the low of the price of the day on the watchlist. In the graph you can see the bubble with the price, I would like to have in the following list the notice of those ups and downs in the price. I will be very grateful if you can help me.
you said...

I would like to have in the following list the notice of those ups and downs in the price

1)what list? and what do you mean by notice?

2) define ups and downs? ups and downs from what? close to open? open to high? low to high? high to low open to low? you will have to explain more?
 

Similar threads

Top