Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Calendar Days, Blocks System Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
sobowen
Posted : Sunday, June 10, 2007 2:49:02 PM
Registered User
Joined: 1/31/2005
Posts: 78
Is it feasible in Blocks to write a custom code block that changes the horizontal axis on the daily time frame from market days to calendar days? On those days that the market is closed simply plot a blank bar. I would also suggest only plotting the last 300 calendar days or thereabouts. I am making time span measurements on the daily time frame in terms of calendar days. I have to do this in Excel. I am currently transcribing the dates of the points of interest from the chart into Excel and computing the number of calendar days between these 2 dates. It would be nice to be able to do this with a pair of data pointers directly on the chart display. I am currently doing this nicely on the weekly time frame. As you know, the bars on the weekly time frame are precisely the week ending dates, therefore the time span measurement in weeks is accurate

Regards,
Steve
Bruce_L
Posted : Monday, June 11, 2007 11:23:04 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I do not know of a way to "plot a blank bar" using a Custom Code Block (you have already suggested this: Blocks: Daily Time Frame, Calendar Days).

Please save the attached .plot file to:

My Documents\Blocks Files\Tool Parts\Chart

You can add it to any chart using the ADD STUDY button and then selecting Add Study | My Computer.

If you select Bar Chart Start Date and Bar Chart End Date when adding the indicator, the number displayed should represent the number of calendar days between the end of the last bar on the chart and the end of the first bar on the chart. I'm assuming you will need to modify this slightly to meet your needs.

You may wish to review the following:

Customizing with Properties
Your First 3 Block Diagrams

Attachments:
Calendar Days.plot - 4 KB, downloaded 657 time(s).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
sobowen
Posted : Monday, June 11, 2007 4:50:06 PM
Registered User
Joined: 1/31/2005
Posts: 78
Bruce, thanks, this gives me just what I wanted, the distance between 2 date pointers in calendar days on the daily time frame. I will take on the challenge of converting the number to weeks on the weekly time frame. Have to build some logic off the time frame setting and divide by 7.
Thanks again,
Steve
Bruce_L
Posted : Monday, June 11, 2007 4:53:11 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
sobowen
Posted : Monday, June 11, 2007 7:03:41 PM
Registered User
Joined: 1/31/2005
Posts: 78
Bruce, I have given up on making the value on the weekly time frame show the number of weeks instead of the number of calendar days. I could not find any block that would allow me to do some logic off the time frame picker and divide by 7 on the weekly time frame. I already have a method of getting the count of the number of bars between 2 date pointers on the weekly time frame. This count is exactly the number of weeks on this time frame. So, I have a combination of ways to get the time span measurements on the daily and weekly time frames: 1) I use your method on the daily time frame with the values shown in the display legend and 2) I have a method I believe I got from Craig to display the weekly span in a field on the right margin tool bar.

By the way, I could not find any description of the "DaysPerBar" code block you used in your block diagram in the Knowledge Base.

As you might be able to tell, I am making time span measurements to determine the periods of the Hurst wave components in the stock price composite wave. The price pattern is a summation of "n" individual wave components.

Once again, thanks for your assistance.

Regards,

Steve
Bruce_L
Posted : Tuesday, June 12, 2007 8:51:12 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I'm happy to read that a combination of methods is working to do what you want.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.