CQG Primer: P2D or PriceToDollar Function

The PriceToDollar function converts the prices of the particular market to their value. For example, below the E-mini S&P 500 futures contract's last price is 6003.75. And 6003.75 multiplied by 50 equals 300187.50.

f1

The choice for the price used in the study includes Open, High, Low, Close, Mid, HLC3, Average and more.

This function is available on the Add Study window and in the Formula Toolbox.

A custom study can easily be built to calculate the PriceToDollar function applied to the session's bar ranges:

PriceToDollar(@)- PriceToDollar(@)

The first PriceToDollar is using the High of the individual bars.

f2

Subtract the PriceToDollar(@) using the low from the PriceToDollar(@) using the high.

f3

The custom study is displayed in the bottom pane in the image below.

f4

The PriceToDollar function can be used as an RTD formula to pull in data to an Excel spreadsheet. There are two versions:

=RTD("cqg.rtd",,"StudyData","EP","P2D","InputChoice=Close","P2D","D","0","All","","","False","T")
=RTD("cqg.rtd",,"StudyData","PriceToDollar(EP,InputChoice:=Close)","Bar",, "Close","D","0","All","","","False","T")

Using the PriceToDollar function on the bar's range could be useful for determining possible targets and risk management points.

A downloadable CQG PAC will install a page with the custom study.

Requirements: CQG Integrated Client or QTrader, and Excel 2016 (locally installed, not in the Cloud) or more recent.

Downloads

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.