Backtest indicator

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

Backtest indicator

Postby trade4 » Sun Sep 05, 2010 3:32 am

Hi! I found a new indicator Backtest, bat I do not know, how it works - the report shows always 0 results. Has anyone some experience with ii?
User avatar
trade4
 
Posts: 6
Joined: Wed Mar 03, 2010 4:14 am

Re: Backtest indicator

Postby Nikolay.Gekht » Mon Sep 13, 2010 4:11 pm

Backtest indicator is used to backtest strategies. So, first, you need some strategy to backtest. In the latest release there is only one demo strategy - "Moving Average" (ma_advisor) which implements the simplest trading strategy - buy when short moving average crosses over long moving average and sell when short moving average goes under long moving average.

To backtest the strategy first decide which instrument and timeframe you want to use. Let's test the strategy, for example on EUR/USD, 15 minutes time frame. So, open Marketscope and load as much data as you want to test the strategy on. Then choose "Strategy->Test Strategy" (it's just a shortcut for the backtest indicator).

bt1.png

(this and all other images are clickable).

The form of the backtest parameters appears. Just select the "Signal" parameter and then click on (...) button to choose a signal or strategy to test. The form strategy parameters appears. In the first parameter ("Strategy") select "ma_advisor" (the only strategy existing in the standard setup of TS)

bt2.png


When ma_advisor strategy is chosen, the form will show it's parameters. You can leave all these parameters as it by default (short MA is simple moving average of 5 last close prices and long MA is simple moving average of 20 last close prices, no shifts). But you have to change the parameter which permits the strategy to trade. Just scroll to "Allow Trading" parameter and set it to "Yes".

bt3.png


Now close both (strategy parameter and backtesting parameters) forms by clicking "OK". The backtest result appears! The arrows on the prices means sell and buy operations (you can move the mouse cursor over the arrow to see the details). The equity curve appears below the prices:
bt4.png


Now we can apply MVA indicators to check whether the strategy works correctly and when it is profitable and when it is not:
bt5.png


So, the result is absolutely expected:
1) As any strategy applied on bar data it enters at the beginning of the bar next to the bar when moving averages are intersected.
2) When market is in the stagnation the strategy loses.
3) When market is in the trend the strategy gets profit

So, you can play with different strategy parameters, different instrument and timeframes to analyze when the strategy can give you profit. BTW, moving average is the simplest strategy, so do not expect stable results.
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: Backtest indicator

Postby trade4 » Sat Sep 18, 2010 4:38 am

Thank you for explanation. The platform goes to be better and better.
User avatar
trade4
 
Posts: 6
Joined: Wed Mar 03, 2010 4:14 am


Return to Discussions

Who is online

Users browsing this forum: No registered users and 46 guests