CQG Primer: Study Recalculation Setting and RTD Parameters

CQG IC and QTrader offer the ability to set recalculation rates for studies. In addition, RTD study formulas have a recalculation rate parameter.

In CQG select a chart and then Setup/Chart Preference/Recalc.

f1

The default is to recalculate studies on every tick.

Choices include:

  • Recalculate on every tick
  • Recalculate at end of bar
  • Recalculate at first tick of bar and periodically

f2

If you choose Recalculate at first tick of bar and periodically then an additional choice appears to set the number of seconds.

f3

Pressing the spacebar will immediately update the studies.

Updating study bars can use a significant amount of processor capacity and this preference modifies how often study bars are updated and will reduce processor load.

The recalculation frequency setting can be used globally or for an individual chart.

To use the recalculation frequency as a global setting, i.e. for all applications that rely on recalculation, click the Update Global Settings button.

Recalculation settings apply to the calculation mode to be used with trading system, condition, and study Alerts; Custom Quote Board; Market Scan; and Signal Evaluator.

To use the recalculation frequency for an individual chart (if it differs from the global setting), clear the Using Global Settings box.

RTD Formulas

RTD study formulas have a parameter for recalculation:

  • EndOfBar
  • EndOfBarAndPeriod (recalculate period)

Examples of using recalculate parameters in the RTD RSI Study formula:

= RTD("cqg.rtd",,"StudyData","EP", "RSI", "InputChoice=Close,Period=9", "RSI","5",,"all",,,,"T","EndOfBar")
= RTD("cqg.rtd",,"StudyData","EP", "RSI", "InputChoice=Close,Period=9", "RSI","5",,"all",,,,"T","EndOfBarAndPeriod 30")

Using "End of Bar" on intraday bar studies will not display a value as the bar closes and the new one starts immediately. The solution is to use a period that matches the time length of the bar, i.e. 300 seconds for a 5-minute bar.

= RTD("cqg.rtd",,"StudyData","EPM24", "RSI", "InputChoice=Close,Period=9", "RSI","5",,"all",,,,"T","EndOfBarAndPeriod 300")

The recalculate parameters will not work for RTD bar formulas such as open, high, low, and close. The recalculate parameters only work with RTD Study formulas, The solution is to use a simple moving average study for the open, high, low, and close set to 1-bar lookbacks:

=RTD("cqg.rtd",,"StudyData","S.AAPL","MA","InputChoice=Open,MAType=Sim, Period=1","MA","D",$A3,,,,,"T","EndOfBar")
=RTD("cqg.rtd",,"StudyData","S.AAPL","MA","InputChoice=High,MAType=Sim, Period=1","MA","D",$A3,,,,,"T","EndOfBar")
=RTD("cqg.rtd",,"StudyData","S.AAPL","MA","InputChoice=Low,MAType=Sim, Period=1","MA","D",$A3,,,,,"T","EndOfBar")
=RTD("cqg.rtd",,"StudyData","S.AAPL","MA","InputChoice=Close,MAType=Sim, Period=1","MA","D",$A3,,,,,"T","EndOfBar")

Efficiently managing computer resources is very important. The recalculation preferences are a useful tool.

Requires CQG Integrated Client or CQG QTrader, and Excel 2010 or higher. Excel has to be installed on the local computer, not in the cloud.

Disclaimer

Trading and investment carry a high level of risk, and CQG, Inc. does not make any recommendations for buying or selling any financial instruments. We offer educational information on ways to use our sophisticated CQG trading tools, but it is up to our customers and other readers to make their own trading and investment decisions or to consult with a registered investment advisor. The opinions expressed here are solely those of the author and do not reflect the opinions of CQG, Inc. or its affiliates.