Gary’s website on Market Profile is great. Give him a visit.
Posts Tagged ‘market-profile’
There are several traders on Stocktwits and Twitter in general that really know their stuff. One is @futurestrader71, who reads the pulse of the S&P500 futures with amazing accuracy. He is often talking about levels in the market where value has been established. These value areas are levels where the market has spent lot of time and traded lot of volume in the recent past. There’s a lot to this subject, including an analysis framework known as Market Profile. In the traditional market profile structure, the trading day is broken up into 30 minute time periods. Then price plots are made showing all prices traded during that 30 minutes. Each point is known as a Time-Price Opportunity (TPO) point. The basic theory as I understand it is that the market will have important reactions near the highest-count TPO areas, where the market is fairly valued (or at least where most of the bulls and bears agree on price). The more time and volume done at a price level, the more likely that the level will be an area of support or resistance the future. In addition, if the market trades outside of the value area and stays there, you know that the accepted valuation of the market is changing, and this can be valuable information.
We don’t have “volume by price” or Market Profile data available to us in Think or Swim natively. However, Thinkscripter has worked his usual miracles and has created one of each. I was in the process of trying to make a TPO indicator of my own when I saw his release. Therefore, if you are interested in volume by price or a full-fledged TPO indicator, I recommend his scripts. However, I’m releasing what I was working on here for the interested public.
The basic idea of my indicator is simple: just count all of the bars that touched a given price level and sum them up over the entire chart. This would be trivial if we had the capability in Thinkscript to use loops. But since we don’t, a lot more trickery is involved, as you can see in my code. I take the highest high and the lowest low in the chart, and divide the range into 30 levels–the high being one and the low being another, with 28 intermediate levels. Why 30? Pulled out of the air–but you have to write many lines of code for each level, so that’s as far as I went. Then for each bar in the chart, I check each level to see if the price bar touches it. Then I sum up all the counts for all the levels in the chart. The level (or levels if it is a tie) with the highest touch count is the max level and is plotted in white. The rest of the levels’ counts are ratioed as a percentage of the max level’s counts, and they appear in gray.
There are two inputs. First is a cutoff percentage. If you enter 75, all levels with a touch count less than 75% of the max count level are hidden. If you put in 0, none are cut off and you see all the levels. I couldn’t think of a good way to show the level counts individually (like Thinkscripter did), so mine doesn’t tell you the relative count sizes. You know the max count level is white, and the rest are either on if above the count threshold, or off if below. The only other input is “exclude today”. If true, then it ignores today’s trades so you have a static picture of the situation at the end of day yesterday. If false, then it is constantly updating as the current day unfolds.
Here’s a couple of plots. First shows a cutoff of 75%:
And a cutoff of 50%:
When you see those high TPO levels, with the big holes in between, then those big swings of last week start to make sense. And it also starts to make sense as to why we found resistance and support where we did on 9/28 and 9/30.
So there it is. Please note: In its current form, this is not a rigorous treatment of Market Profile concepts! But it could be developed into one with further work. I’ve just got too much going on right now, so I’m handing it over to you if you want it. Download the “TPO” code in the “Work in Progress” section of my Google site.