How does the back testing work?

Discussion in 'Ask A Question' started by Customer Questions, Dec 7, 2012.

This is the TIMETOTRADE forum. Use the TIMETOTRADE Trigger Trading Technology™ to execute your trades when your Price, Candlestick, Trend Line and Technical Analysis chart conditions are met - no coding required. Trade directly in the world’s global markets. Backtest your Trading Strategies. Calculate your UK HMRC Capital Gains Tax liabilities. Manage your Investment Club. Create a FREE account today.

  1. Customer Questions

    Customer Questions John @ timetotrade

    How does the back testing work/does it bring up and show on the chart each time when the alert would have triggered on the past data?

    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.
  2. Customer Care

    Customer Care John @ timetotrade

    The timetotrade back testing feature can be used to test alert based trading strategies on historical price data.

    For help on how to create alert based trading strategies, please watch the interactive help tutorials, by clicking on the blue help icon in the Chart Tools Alert Builder section:


    To backtest a trading strategy you will need to set up a simulated trading account. Click here for help on how to do this.

    In the following example a simple alert based trading strategy will be tested. The strategy will test buying each time the 5 minute RSI falls below 30.

    To begin, create an alert based trade as per the following example:


    In this example a trade will be executed when the RSI falls below 30 using a 5 minute candle interval, if there is no existing position i.e. if no position, execute trade.

    If there is no open position when the RSI falls below 30, a simulated trade will be executed by buying a 100k Forex lot. Take Profit and Stop Loss orders will also be created. In this example the alert based trade has been set up to Take Profit if the price rises by 0.0010 from the opening trade price, and a Stop Loss if the price falls by 0.0020 from the opening trade price.

    After creating the alert and the related trade, click on the 'Pause' button. Now open the 'Back Test' widget:


    To test the newly created 'Long Entry' trading strategy, click on the red circle beside the alert:


    The strategy that is being tested can be named, the the date range adjusted, commission, slippage and taxation values set. Note that slippage is used to reduce the profit by increasing or decreasing the trade execution prices.

    When the backtest parameters have been set, click on the green button that says: 'Back Test Selected Alerts'. A summary of the backtest results will be displayed:


    To analyse the backtest results, click on the 'View Detailed Backtest results' button and that will open up a tearaway chart and display the trade events on the chart as per the following screen shots.

    The backtest results tab in the tearaway will display the backtest trades, related win loss analysis and performance analysis. The blue graph in the top right corner represents the profit over time:


    The backtest analysis tab on the tearaway provides a detailed analysis of the trades and related take profit and stop losses. The first bar graph shows the profit per trade with information on the frequency of the winning and loosing trades and an analysis of the average time it took for winning and losing trades. The second bar chart represents the maximum profit that could have been achieved for each trade. In addition it calculates the average high and the standard deviation of those highs. The standard deviation means that approximately 95% of trades are within the quoted value. The third bar represent the same information but this time looking at the stop loss values.


    The opening and closing trades will be displayed on the chart, with 'up' arrows used to identify 'buying' and 'down' arrows representing 'selling' trades. The grey arrows represent opening trades; green arrows are successful closing trades; blue arrows arrows are loss making trades.


    Please note that back testing is only available on the Pro Package. Click here to upgrade your account to use this feature.

    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.
  3. Customer Care

    Customer Care John @ timetotrade

    Please note that when using the alert based deal tick there have been a number of changes. The range of order types and the behaviour of switch trades, and the naming convention, have been changed as illustrated:


    Switch trades have been replaced with trades that:
    • Close short positions then Buy at Ask
    • Close long positions then Sell at Bid
    A key difference when compared with the previous 'switch' trades is that the first half of the trade completely closes a long or short position regardless of the quantity associated with the order, where as previously only a fixed quantity order was sent. In addition to the new class of 'switch' trades, there is also a trade to close long and short position i.e. if you are long and short on the same position, then close both sides of the order i.e. the 'Close position at Bid or Ask'.

    The take profit and stop loss order types have been changed to include 'points' e.g. 0.0001 on GBPUSD is 1 point. This makes it easier to enter points sizes.

    Lastly position constraint logic has been add based on quantity, margin, profit, loss, % margin profit and % margin loss. For example, an alert based trade can be set up to buy 50k if the existing long position is less than 200k as illustrated:


    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.
  4. Dary

    Dary Dary McGovern Staff Member

    New features have been added to the backtesting functionality to enable you to:

    1. Backtest alerts without having to associate them with trades
    2. Added support for testing trading strategies that pause or activate other alerts

    Backtest Alerts

    The ability to backtest alerts is very useful for refining your entry and exit criteria, without having to go through the process of associating a trade with an alert. To test an alert, simply add some triggers to an alert, and then go to the backtest tab. Select the alerts that you want to backtest and run the back test as per the normal approach shown in the following screen shot:


    The alerts are displayed on the chart as yellow dots. Mouse over the alerts to see which alert executed:


    with a detailed list of the alerts available in a tearaway:


    Test Trading Strategies with Pause / Activation rules

    When backtesting trading strategies that Pause and Activate alerts, you can now see when pause / activations events occurred on the chart. A yellow dot is used to denote a pause / activate trade event, grey arrows represent opening trades, green arrows represent profitable trades, blue arrows represent losing trade; an up arrow is a buy, and a down arrow is a sell. This will help you quickly visualise your strategy and note that the message associated with alert that executed the trade is now also included:


    In addition the border colour of the trade arrows has been change to help make them more visible on the chart.

    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.

Share This Page

Open a FREE TIMETOTRADE account today:
Execute your Trigger Trading™ strategies automatically in the world’s global markets. Apply Now to try our superb platform and get your trading advantage.
170+ Technical Analysis and Candlestick Pattern Indicators - learn more
Back Test Trading Strategies - learn more
Manage your Portfolio and calculate UK HMRC Capital Gains liabilities and SA 108 CGT Return - learn more
Manage your Investment Club and generate UK HMRC Investment Club Tax Return Form 185 - learn more