Intro to Degree Bars

Post any software related questions or comments here. This is also the place to ask for help if you can't figure out how to do something in Wave59.
Post Reply
User avatar
earik
Site Admin
Posts: 475
Joined: Mon Dec 01, 2014 12:41 pm
Contact:

Intro to Degree Bars

Post by earik » Thu Jul 07, 2022 7:31 pm

Hi All,

In version 2.44, you'll find a brand new bar type: degree bars. :D This is a type of chart that I've been trying to figure out how to use for two decades now, but was stuck because I got too hung up on being exact and thinking I needed massive amounts of tick data to pull it off. Now that I'm a little older/wiser/better-in-all-ways, I dropped the perfection thing and just built them using regular intraday minute bars. Yes, that means they're not exact to the degree, but on the plus side, we can *actually* use them rather than just thinking about using them.

Anyway, I was sort of in a rush to get this build out thanks to the order placement stuff blowing up with IB, so it's not quite as polished as I'd like. Consider these to be in BETA at this point, and don't be surprised if you come across functionality that is a little wonky. It will all get cleaned up over time. I want to put some information out there about how to go about using these, so this post will serve as general introduction.

So, what would a degree bar chart look like, then?
db1.png
Gold running on Mars-time
db1.png (23.99 KiB) Viewed 17728 times
The answer is that it looks a lot like a regular OHLC chart, except the time axis is totally different. Rather than using minutes/days, now we're using planetary movement. The chart above is GLD, where each bar represents 1 degree of motion of Mars.

Let's walk through how to set this up, as it's a bit more involved than a regular chart. So:
db2.png
db2.png (13.02 KiB) Viewed 17728 times
The important thing to remember is that the degree bars use minute bars as their building blocks. Mars isn't going to enter and leave that one degree timespan exactly on a particular day or hour, so what we do is calculate it using an intraday chart. This means that the starting point is exactly the same as if you were setting up a regular, old-fashioned intraday chart. In this example, I'm using 5-minute bars. A couple things to note:

1) Set your start/end time to 0/2359. This will give you a full 24-hour period to work with. (Planets keep moving after markets are closed)

2) Set "num. days visible" to something appropriate. The default of 3 is going to give you something like 1 bar to start with, and it gets irritating having to scoot the time axis over a bunch of times in the beginning to see the chart. (I'm going to fix this).

3) Note that the time entered here will determine how exact your bars will be in the past. So if you build your charts using 5min bars, it means that they will be exact within 5 minutes. If you build them with 1min bars, they will be more exact, within 1min. Smaller time frames get you closer to that exact moment when the planet moves the specified amount, but at the cost of time. Practically speaking, 5min is plenty exact, and most data sources go back pretty far with their 5min data.

Ok, once you've figured out that part, now you have to tell the software what kind of degrees you want to use. Notice the 3rd tab a the top of this settings form. That's where this is done:
db3.png
db3.png (12.32 KiB) Viewed 17728 times
This should be pretty obvious. Choose your planet, whether you want it geo or helio, and how many degrees should go into each bar.

So basically two steps: what degrees you want to use, and what intraday data to use to backfill the history.

IMPORTANT NOTE: moving forward in time, the charts WILL BE EXACT, since we aren't limited by having to use historical bar data. Just put the real time data in as it shows up. The downside to this is that if you let a chart run for awhile, then close/re-open, all those bars that you saw form in real time will now have to be built up using the historical data, and now we're not exact anymore. So the closing price of the various bars will change a bit. You'll still be within 5min (if you are using 5min data), but you won't be exact. This is one of the downsides of using minute bars instead of tick data, and I'm not sure there's a way around it. For the day traders, just don't close your charts during the day, and you'll be exact to the tick on the degrees on live markets. Once you close them, then you'll be slightly off. Just be aware.

Anyway, hope that explains everything. To be clear on one thing, yes, when you scale your charts with this bar type, you are officially scaling to planetary motion. For those of you (I know who you are ;) ) who think in planetary time rather than clock time, you probably have thought of like 20 things to try in the time you've read this. More to come. Let me know what could use work.

Regards,

Earik

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests