TradeStation Help

Currency Conversion

When strategy backtesting a symbol that is based in a different currency than your TradeStation account it may be useful to apply a currency conversion factor when calculating profit and loss. In TradeStation, you have the option of having profit and loss values converted based on either the symbol or the TradeStation account.

Strategy Properties For All

By default, a new strategy uses the currency of the symbol. If the symbol currency is different from that of your TradeStation account click Properties For All on the Strategies tab of the Format Analysis Techniques and Strategies dialog.  

From the Strategy Properties for all Strategies on this Chart - General tab, change the Base Currency of setting to either Account or Symbol. Values on the Strategy Properties window (commissions, trade size value, etc.) will display based on the selected currency conversion factor. In addition, built-in stops, analysis techniques, and strategies will be impacted by this setting.

Example:
If you're using a forex symbol such as USDJPY that trades in Yen and you have Currency Based on set to Account (where your account is based in U.S. dollars), the profit and loss values in your strategy, including built-in stops, will use a currency conversion factor that converts Yen values to dollars. On the other hand, if you're using the USDJPY forex symbol and have Currency Based on set to Symbol, all strategy profit and loss calculations and built-in stops will not use currency conversion since none is needed for Yen to Yen. See Currency Conversion - Strategies and Analysis Techniques for built-in tools that may be affected.

Strategy Backtesting

During strategy backtesting, profit and loss calculations can be made on any bar where a strategy trade is exited or partially exited. The essence of the profit and loss calculation is the difference between entry and exit price (exit-entry for long and entry-exit for short) for the shares or contracts traded, including commissions and slippage. In addition, when the symbol currency is different than the account currency, a currency conversion factor is applied that uses either the bid or ask price depending on whether the position was exited at a loss or profit, respectively. The Currency section on the General tab of the Strategy Properties For All dialog is used to change this setting (see above).

EasyLanguage Reserved Words

The ProfitCF and LostCF EasyLanguage reserved words are available to assist you in obtaining the currency conversion factor for any bar when writing custom rules for trade size or profit and loss calculations. As with bar properties such as Date, Open, Volume, etc., the ProfitCF and LossCF reserved words are bar properties that provide values both historically and real-time. When used without the optional BarsBack parameter the word returns the value for the current bar, and with the BarsBack parameter (enclosed in square brackets) it returns the value for that number of bars ago.