trading-system-development

How do I change the default Account Balance Chart that comes up as part of the output of a backtest?

When performing a backtest of a trading system named X, if the Account Balance Chart checkbox is checked in the backtest setup, a chart of the trading system ticker $X is produced. Users who wish to customize the account balance chart in various ways can do so by revising the chart then right-clicking in the chart and issuing the Save As Default Chart command, thereby saving the customized version of the chart as the default for the the ticker $X.

How do I implement a stop and/or target in a trading system?

Assuming you have a system that goes both long (with BUY action) and short (with SELLSHORT action). And let's also assume we want to implement both a stop and a target on both the long and short trades. Let's also assume that we want the target to be 50 cents and the stop to be 25 cents.

In RTL, the token ENTRY gives us the entry price of any position. This token makes implementing stops and targets relatively simple.

How do I implement a trailing stop in a trading system?

Assuming you have a system that goes both long (with BUY action) and short (with SELLSHORT action). And let's also assume we want to implement a trailing stop on both the long and short trades.

Create the following two signals:

Set_Long_Trail_Stop
IF(POS_STATE = POS_LONG) THEN (SET(STOP, HI - 1))

Set_Short_Trail_Stop
IF(POS_STATE = POS_SHORT) THEN (SET(STOP, LO + 1))