Change of pace today with a TradeStation EasyLanguage code example. I got an email from Vad who wanted to add an Alert to the Stopping Volume code shown here.
I thought I’d go a little further than just add an Alert and show you how I plot Volume and other patterns on charts with:
- Text on the chart when a particular condition is met
- The text is plotted away from the price bar and the gap can be varied
- The text never falls outside the chart window and can always be seen
- An Alert is issued when the condition is met, and
- Multiple text elements can be plotted with additional conditions.
The TradeStation EasyLanguage Code
Inputs: TextColor(White), Space(True), StopAlert(True),
SpaceMulti(1), TextSpaceMulti(0.75);
Variables: OffsetBottom(0), OffsetTop(0), OffsetInput(0);
If Space = True then begin
Value1 = Average(Range,10)*SpaceMulti;
Plot1(H+Value1,"TopSpace",Tool_Black,0,0);
Plot2(L-Value1,"BottomSpace",Tool_Black,0,0);
End;
OffsetBottom = 0;
OffsetTop = 0;
OffsetInput = Average(Range,10)*TextSpaceMulti;
Condition1 = Ticks > Ticks[1] and Range < Range[1] and L < L[1];
Condition2 = Ticks > Ticks[1] and Range < Range[1] and H > H[1];
If Condition1 then begin
OffsetBottom = OffsetBottom+OffsetInput;
Value1 = Text_New(D,T,L-OffsetBottom,"Stop");
Value2 = Text_SetColor(Value1,TextColor);
Value3 = Text_SetStyle(Value1,2,2);
If StopAlert = True then begin
Alert("Stopping Volume Low");
End;
End;
If Condition2 then begin
OffsetTop = OffsetTop+OffsetInput;
Value1 = Text_New(D,T,H+OffsetTop,"Stop");
Value2 = Text_SetColor(Value1,TextColor);
Value3 = Text_SetStyle(Value1,2,2);
If StopAlert = True then begin
Alert("Stopping Volume High");
End;
End;
TradeStation EasyLanguage Code for Stopping Volume Pattern
The first block of code defines the inputs and variables:
- The text color can be varied; default value is White
- Space can be added around the price bars so text is always seen
- The alert for a Stopping Volume condition can be turned on and off
- The size of the blank space around the price bars can be varied
- The distance of the text from the price bars can be varied
The second block of code calculates the space to plot around the price bars, based on the average range of the last 10 bars. The third block of code calculates the distance to offset the text from the price bars, again based on the average range.
The fourth block of code specifies the volume pattern conditions. In EasyLanguage the "ticks" variable is a more reliable way of calculating volume for both time-based and tick-based charts. The last two blocks of code plot the "Stop" text on the chart and trigger the alert.
The calculation of the variables "OffsetBottom" and "OffsetTop" allows multiple conditions to be plotted with text stacked below or above the price bars. You’ll need to add additional conditions to the code to see how this works. After you’ve added the additional conditions, don’t forget to duplicate the last two blocks of code and change the condition number, text and alert strings you want plotted.
The Stopping Volume Pattern & Profit Taking
The chart below shows the Stopping Volume pattern code in action.

Stopping Volume Pattern (Emini 5 minute)
Professional profit taking is occurring when the following conditions are met:
- Volume is greater than the previous bar’s volume
- Range is less than the previous bar’s range
- A new high is made (in an uptrend) or a new low (in a downtrend), and
- Closes off the highs (in an uptrend) or off the lows (in a downtrend)
The reduction in the bar’s range is the real key. It shows that additional selling (in an uptrend) or additional buying (in a downtrend) is keeping the bar’s range low. So Professional traders are taking profits and/or "fading" the current trend.
You will almost always see Stopping Volume patterns leading up to a market turning point. However, if the trend is strong it might take several Stopping Volume patterns in a row to slow the trend. Remember, most turning points are Stopping Volume patterns, but not all Stopping Volume patterns are turning points!
Click on the button below to download the latest version of the Stopping Volume TradeStation EasyLanguage code.
Software Bug Warning: Occasionally on TradeStation tick charts a Stopping Volume pattern will be plotted where the bar’s range is NOT less than the previous bar. This appears to be a TradeStation problem and luckily does not occur frequently. Thank you to Sam Beckers for pointing out this bug.

