Price Distribution Analysis
The PriceDistrib_Analys indicator is a Tradestation® Version 2000i or TS6/TS7 application that can provide the user with a significant amount of information concerning levels of price that have excellent SUPPORT and RESISTANCE price zones.
The PriceDistrib_Analys indicator differs from other applications of this type in that the user has the ability to cause the indicator to compute a price distribution histogram at intervals specified in number of minutes or number of bars as well as for a whole day (or multiple days) of trading.
The user has the ability to also select the PRICE INTERVAL for accumulation of occurrences of prices to be counted for purposes of displaying in a histogram form.
CLICK THE Add to Cart Button TO ORDER
the
PriceDistrib_Anal @ $150.00
![]()
The following information is taken from the frontend documentation provided with the application. As with all of the SYTECH Corporation applications the full OPEN code for the application is included with your purchase of a license to use this software.
{
Indicator: PriceDistrib_Analys
Author: Clyde Lee, SYTECH Corporation, copyright 2002
Purpose: The indicator should be run on intra day data. Over the time
Interval specified (or the entire day if selected) the indicator
will accumulate, for each bar in the selected timeframe, price
points that fall within price interval bins. A count of the
number of times such a price bin is hit is saved in an array
associated with the price represented by a given bin.
Upon completion of the selected period, a histogram is plotted
such that each bar interval is assigned a value of one and on
that scaling the number of occurrences of price is plotted as
a bar (trendline) extending from the beginning of the time
period.
The histogram is actually plotted over the price zone in which
the statistics are accumulated.
A plot is made of the extreme locations of something that has
been termed "value area" but is in reality nothing more than
an area in which some selected percentage of all price
occurrence counts fall relative to the point with maximum
price occurrence.
Data above the upper extreme is color coded yellow, data
within the extremes is colored blue, and data that falls
below the lowest extreme is coded red.
Two choices of display of the extremes of this maximum
likelihood zone are available:
1. In the next time period plot the extremes as either a
straight line or as a projection of the trend observed
in the relationship of the two prior analyses.
2. Draw a channel which extends form the extremes at the
beginning of one time period (representing the extremes of
the prior time period) to the extremes appropriate for the
next time period.
An option exists to specify the time interval in BARS and
if such is selected (a negative value for TimeBin) then
this indicator can be run on daily or intra day data.
If a starting time is specified then all calculations,
whether number of bars, time interval, or whole day are
started with the specified TimeBeg value.
An interesting display is to set TimeBin = -5 on daily data.
CAUTION: Since it is possible to setup parameters (pricebin)
such that an excessively fine resolution is defined and an
excess number of bins created, a limit of 10,000 trendlines
plotting count and price has been set. ALSO, check is made
of the last two days of data prior to beginning of the
indicator and if the price bin is less than 1/100th of the
high to low range then the price bin is forced to that value.
EXTREME CARE SHOULD BE EXERCISED IN THE SELECTION OF THE
SIZE OF THE PRICEBIN TO INSURE A REASONABLE DISPLAY OF DATA.
Because of the use of a large number of "trendlines" to represent
the price distribution histograms you should take care to insure
that a BegDate value be set to limit the number of days on which
these displays are made. THIS IS VERY IMPORTANT ! ! !
Copyrighted 2001-2002 by Clyde Lee. This is a copyrighted application and is intended for the use only of the person paying a fee for the right to use. Normal copyright privileges and penalties if violated are in effect.
You will find some areas commented out with braces and some notes
about removing I_ from certain lines of code. These have been
provided to allow you to copy this code into a "signal" and then
uncomment the bracketed zones and remove the I_ and be in a
position to develop a system using some very elemental concepts of
how to use Price Distribution information for trading. You may
be surprised at the results.
}
Input: PriceBin(0.01), {Bin size to use in accumulating price data. The default}
{of .01 is OK for low priced stocks but should be }
{increased to 0.25 or so for many futures and you may }
{well increase this to 0.5 for widely swinging symbols }
{WARNING: Zero data values for lows will blow this thing}
{sky high -- no checking yet. }
TimeBin(0), {Time increment for analysis 0=full day otherwise minutes}
{Negative=use data from TimBin number of bars. }
TimeBeg(0), {If a market is a 24 hour market and you wish to have the}
{distribution calculated beginning with the pit session }
{then it is imperative that the beginning time for the }
{pit session be entered in this parameter. }
PointRight(true),{If set false then display will point to left }
Perc4VA(68.2), {Percentage of counts to use for Value Area }
Smooth(00); {Angle adjustment for VA projection--range -2>+2 }
{
Input: ExitLast(false),
LossMax(0.6), {mm stoploss if desired -- zero=don't use }
StopBars(0), {Number of bars to keep track of Highest High and Lowest }
{Low for setting a stoploss point -- Zero=don't use }
TakProf(0.4); {quit trade after this profit }
}
Input: LineSize(1), {Size of line to draw for each price bin distribution }
DoChan(False); {Draw a channel from VA extremes to next set of extremes }
Input: BegDate(1020227);
Some interesting displays using this indicator:
The charts below are is of the QQQ symbol using 5 minute bars with the analysis extending over the entire day.



The charts below are of the QQQ symbol using 5 minute bars with the analysis extending over 1/4th of a day for each analysis.
The first chart (at a later time than the last chart) is annotated with significant information about other elements of the charts.


The charts below are of the DOW-JONES Industrials Average using daily bars. This is using the PriceDist_Contin routine which is also included as part of this package.

There are two applications of this routine displayed above. The top is the "conventional" use of the routine where we see the price distribution displayed as a vertical histogram with the "value area" displayed in blue. The "point of control" is a red line in the middle of the blue area.
The line plots represent the top and bottom of the value area (blue/red) and the magenta line is the value area COMPUTED EVERY BAR.
The lower portion shows an application in which a histogram of the difference in the bottom of the value area and the top of the value area are shown. The histogram bars tend to contract (get shorter) as tops are approached and expand (get longer) as bottoms are indicated.
The documentation from the frontend of this application is shown below and should be examined in detail to get a better feel of what this application is capable of performing.
{
Indicator: PriceDistrib_Contin
Author: Clyde Lee, SYTECH Corporation, copyright 2002
Purpose: The indicator can be run on daily or intraday data over some
specified number of bars (backward) and stepping forward
one bar at a time. The indicator will accumulate, for each bar
in the selected zone, price points that fall within price interval
bins. A count of the number of times such a price bin is hit is
saved in an array associated with the price represented by a
given bin.
Upon completion of the each period, the price counts are
analyzed and the "value area" and "point of control" are
determined and plotted.
A LINE plot is made of the extreme locations of something that
has been termed "value area" but is in reality nothing more
than an area in which some selected percentage of all price
occurrence counts fall relative to the point with maximum
price occurrence.
If not in the HISTOGRAM mode, (at a specified interval that is
not necessarily related to the analysis interval), the data is
plotted as a series of horizontal lines beginning at the bar
modulo the display interval. The data above the upper extreme
of the value area is color coded yellow. Data within the value
area is colored blue, and data that falls below the low end of
the value area is coded red.
An option exists to specify the number of BARS to be used for
the analysis and the number of bars to be used for the conventional
MP display.
CAUTION: Since it is possible to setup parameters (pricebin)
such that an excessively fine resolution is defined and an
excess number of bins created, a limit of 15,000 trendlines
plotting count and price has been set.
EXTREME CARE SHOULD BE EXERCISED IN THE SELECTION OF THE
SIZE OF THE PRICEBIN TO INSURE A REASONABLE DISPLAY OF DATA.
Because of the use of a large number of "trendlines" to represent
the price distribution histograms you should take care to insure
that a BegDate value be set to limit the number of days on which
these displays are made. THIS IS VERY IMPORTANT ! ! !
Copyrighted 2001-2002 by Clyde Lee. This is a copyrighted application and is intended for the use only of the person paying a fee for the right to use. Normal copyright privileges and penalties if violated are in effect. }
Input: PriceBin(0.25), {Bin size to use in accumulating price data. The default}
{of .01 is OK for low priced stocks but should be }
{increased to 0.25 or so for many futures and you may }
{well increase this to 0.5 for widely swinging symbols }
{WARNING: Zero data values for lows will blow this thing}
{sky high -- no checking yet. }
NumBars(9), {Number of bars (backward) to use for analysis }
Perc4VA(68.2), {Percentage of counts to use for Value Area }
Smooth(3), {T3Smoothing to apply to calculated values }
AvgLeng(31), {Average length to use to compute average to subtract }
{from differences in histogram or to use to compute an }
{average of Pivot values if not in hist mode. }
MPDFreq(5), {Number bars between Market Price Distribution plots }
MPDMult(.5), {Multiplier for MPD count to set scaling }
MPDShif(-2), {amount to add to bar number to determine start of MPD }
MPDRight(False), {Set true to have MPD bars point to right. }
PlotAll(False), {Set true to plot outside limits of Value Area & Pivot }
PlotHist(False), {Plot a histogram of HighVA-LowVa. }
BegDate(1020101);{Beginning date to start plotting data. }
CLICK THE Add to Cart Button TO ORDER
the
PriceDistrib_Anal @ $150.00
![]()