TradeStation Help

Maximum Number of Bars Study Will Reference Setting

When you insert an indicator or an analysis technique to your chart or grid, the analysis technique requires a specific amount of data to perform its calculations. Either you or TradeStation must specify how many bars of data the analysis technique will need. You do this using the Maximum number of bars study will reference setting, commonly referred to as MaxBarsBack. The MaxBarsBack setting is located on the General tab of the Format Indicator or Analysis Technique [symbol] window.  

As an example, let's say that you are inserting the Mov Avg 1 Line Indicator to a chart and using the default value of 9 for the Length input. This indicator needs to reference 9 bars of data in order to make its calculation. Therefore, the MaxBarsBack needs to be set to at least 9.

The Maximum number of bars study will reference option has two settings: Auto-Detect and User Defined.

 For detailed information on MaxBarsBack, and how to change the specifications in the Format Analysis Technique window, see Formatting Analysis Techniques.

Auto-Detect is the default for the Maximum number of bars study will reference setting. This enables TradeStation to automatically detect the number of bars needed to perform the calculations required by the analysis technique.

The User Defined option enables you to specify the MaxBarsBack setting. This may be useful to unify several Analysis Techniques that may otherwise have different MaxBarsBack settings when using Auto-Detect.

If you use the User Defined option, it is recommended that you always set the Max number of bars study will reference to 50 unless you need more than 50 bars of data to perform calculations. It is important to remember that an indicator, which has Analysis Commentary or alerts enabled, will need at least 50 bars of data to reference in order to accurately determine market conditions.

If you do not use the correct MaxBarsBack setting, the Analysis Technique will be turned off and the TradeStation Events Log will indicate a MaxBarsBack error.

For Analysis Techniques applied to grids, such as RadarScreen and OptionStation, see Loading Additional Data for Accumulative Calculations.