StockFetcher Forums · General Discussion · Column<< >>Post Follow-up
tr222
7 posts
msg #161346
Ignore tr222
9/6/2024 4:31:14 PM

Is there a column that can be added that shows the day range from the open to the close. I know you can do the day range for high to low, but looking for the day range on open to close.

Also, can you do a specific column to show the day range only for when the stock closed in the red or green.

For example: add column average day range (10) only when close was below open.

Basically, I would like to separate the open to close day range for up days and down days, is that possible. If this is not possible for the open and close, then can the high and low be used.

xarlor
578 posts
msg #161349
Ignore xarlor
9/9/2024 7:42:22 AM

If body_range is negative, it was a down day. If positive, it was an up day.

I sorted it so all the down days are displayed first, followed by the up days. You could also just filter it further by doing body_range < 0 for only down days as an example.

Fetcher[
set{bodyr1,close - open}
set{bodyr2,open + close}
set{bodyr3,bodyr2 / 2}
set{bodyr4,bodyr1 / bodyr3}
set{body_range,bodyr4 * 100}


add column body_range
add column cma(body_range,10)
sort by column 5 ascending
]



tr222
7 posts
msg #161350
Ignore tr222
9/9/2024 5:53:24 PM

Thanks for the help on this.

I believe based on the script that if you had 5 positive days with a body range of 1% and 5 down days with a body range of 1% that the overall MA of the body range 10 days would then be 0%, is that true?

How can it show an overall body range of 1% for this. How would you set it up so it doesn't matter if it was up or down, just the range of the body is calculated and average, whether up or down for the day.

tr222
7 posts
msg #161351
Ignore tr222
9/9/2024 5:59:09 PM

Basically just looking to do the Average day range using the open and close rather than the high or low. And then get an average for the last 10 days.

xarlor
578 posts
msg #161352
Ignore xarlor
9/10/2024 9:03:33 AM

This ignores direction and returns just the body range as a percent for today and the body range average as a percent over the last 10 days.

Fetcher[
set{top,max(open,close)}
set{bottom,min(open,close)}
set{bodyr1,top - bottom}
set{bodyr2,open + close}
set{bodyr3,bodyr2 / 2}
set{bodyr4,bodyr1 / bodyr3}
set{body_range,bodyr4 * 100}

add column body_range
add column cma(body_range,10)
]



tr222
7 posts
msg #161353
Ignore tr222
9/10/2024 5:39:26 PM

Thanks very much!

StockFetcher Forums · General Discussion · Column<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.