Skip to content

Quick-tip 104 | Volatility indicator and paintbar study

qt104-7

Introduction

Quick-tip 104 shows how simple it is to build a volatility indicator and equivalent paint bar study in TradeStation EasyLanguage.

Volatility can sometimes provide useful information about the way a market is behaving and may help traders identify periods where price movement is expanding or contracting. For example, some traders monitor measures such as Average True Range (ATR), Bollinger Band width, or historical volatility to gauge whether markets are relatively quiet or experiencing larger-than-normal price swings.

In certain situations, increased volatility may create opportunities for shorter-term trading strategies, while lower volatility environments may favor different approaches. However, volatility indicators should not be viewed as predictive tools in isolation and are generally best considered alongside other forms of technical or market analysis.

Markets can behave unpredictably, particularly during news events or periods of unusual market activity, and no indicator or methodology can guarantee profitable results. Any examples or concepts discussed are for educational purposes only and are intended to illustrate how volatility measurements might be incorporated into a broader analytical framework rather than to provide trading or investment advice.

Markets do not move in a constant way. At times they are calm and compressed, at other times they expand aggressively and become highly directional.

In this tutorial, we build a simple volatility regime Detector in EasyLanguage that classifies market conditions into:

  • Low volatility
  • Normal volatility
  • High volatility
The quick-tip 104 indicator and paintbar study both applied to a chart
The quick-tip 104 indicator and paintbar study both applied to a chart

The indicator compares:

1. Current volatility

Measured using ATR (Average True Range)

2. Normal market volatility

Measured using a moving average of ATR

3. Relative volatility ratio

Volatility Ratio = ATR / Average ATR

User inputs

The user inputs (and default values) are:

ATR_Length( 14 ),

ATR_Baseline_Length( 50 ),

Low_Threshold( 0.85 ),

High_Threshold( 1.15 ),

UseSmoothing( true ),

SmoothingLength( 3 );

The quick-tip 104 indicator
The quick-tip 104 indicator

In the above image the lines of the indicator can be seen clearly. 

Plot3 (displayed in yellow) displays the Low_Threshold, a user input initially set as o.85

Plot4 (displayed as cyan) displays the High_Threshold, a user input initially set as 1.15

Plot2 (displayed as white) displays the volume ratio (or smoothed volume ratio

Plot1 (displayed as pink) displays the ‘regime’ which is either:

  • 1 (Low volatility)
  • 2 (Normal volatility)
  • 3 (High volatility)
The quick-tip 104 indicator with the UseSmoothing input set to TRUE
The quick-tip 104 indicator with the UseSmoothing input set to TRUE
The quick-tip 104 indicator with the UseSmoothing input set to FALSE
The quick-tip 104 indicator with the UseSmoothing input set to FALSE

Download the quick-tip 104 indicator and paintbar study

If you wish to save yourself some typing, the tutorial programs are available for immediate download by clicking the ‘add to cart’ button below. You may pay using PayPal or a credit card. The price is $4.95

Free download for Gold Pass members

Download the quick-tip 104 TradeStation EasyLanguage ELD free for Gold Pass members. If you are a Gold Pass member you can download the tutorial code below, please make sure that you are logged in with your Gold Pass user name and password. This content is for members only.

Explanation of quick-tip 104

TO THE BEST OF MARKPLEX CORPORATION’S KNOWLEDGE, ALL OF THE INFORMATION ON THIS PAGE IS CORRECT, AND IT IS PROVIDED IN THE HOPE THAT IT WILL BE USEFUL. HOWEVER, MARKPLEX CORPORATION ASSUMES NO LIABILITY FOR ANY DAMAGES, DIRECT OR OTHERWISE, RESULTING FROM THE USE OF THIS INFORMATION AND/OR PROGRAM(S) DESCRIBED, AND NO WARRANTY IS MADE REGARDING ITS ACCURACY OR COMPLETENESS. USE OF THIS INFORMATION AND/OR PROGRAMS DESCRIBED IS AT YOUR OWN RISK.

ANY EASYLANGUAGE OR POWERLANGUAGE TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (AND PARTS THEREOF) AND ASSOCIATED TECHNIQUES REFERRED TO, INCLUDED IN OR ATTACHED TO THIS TUTORIAL OR PROGRAM DESCRIPTION ARE EXAMPLES ONLY, AND HAVE BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES. MARKPLEX CORPORATION. DOES NOT RECOMMEND THAT YOU USE ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (OR ANY PARTS THEREOF) OR TECHNIQUES. THE USE OF ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS AND TECHNIQUES DOES NOT GUARANTEE THAT YOU WILL MAKE PROFITS, INCREASE PROFITS, OR MINIMIZE LOSSES.