straegy tester

 
Hello,
When I start live trading(demo) some trades ocurss, which I dont see in strategy tester if I run it( in account history are trades written down, but in ST are not)?
 
radovan,

You will never have the same result in 'live' trading as back testing - and it often makes the difference between a marginal winning strategy and a losing one.

However, the difference should not be 'massive'... as it sometimes was with MT 3.x.

regards,
 
radovan,

You will never have the same result in 'live' trading as back testing


This sentence is simply not true. Read my answer to "historical data" post.

--
Maciej Borecki
 
lol nachos, I dont want to get into an argument with u about this but I have never seen a system which gives the same result back testing as in live or even forward testing.

There may be some - but they are rare.
 
lol nachos, I dont want to get into an argument with u about this but

... but you did ;>


I have never seen a system which gives the same result back testing as in live or even forward testing.


Maybe you didn't see many of them ;>

If I say that what you said is not true I'm not just looking for a fight without an argument;>. After negation of your sentence you will get "There is more or equally than one algorithm that provides the same results in live trade and back test"

Example: any algorithm that makes order (buy/sell) only on the beginnings of bars (first tick for each bar)

--
Maciej Borecki
 
sorry nachos, but if your backtesting assumes u can get the same price as a bar opening, then u will not get the same results - it is impossible to be sure u get the same rate as an opening bar - although I agree, this is one case where u may get quite close.

In the best of cases, if u specify an allowable slippage, u will get most trades at approximately the right price. If u dont specify a possible slippage, u may miss a significant part of the good trades and possibly get all the bad trades...

I have many years of finace, mathematics, software programming, testing, simulating, etc. so I did not say this lightly. I have tested many dozens of trading systems - and always back test / forward test before trying. Believe me - I have made every mistake u can think of!!!

My experience has taught me (and my pocket as well) that if a systm can fail, it will - just murphy's law applied to trading systems.

Also, when backtesting, u really need to include a slippage - typically a couple of pips - so that if backtests work, there is a chance that the real stuff may work. But i expect u know this.

OK, so lets have fun: you try and find a system where u get the same back as forwards testing results & i will try and find reasons it may not be the same!!
 
Hi hdb,

I'm currently in the process of "evolving" trading systems using genetic computering techniques and am using, say on a 4 hour chart, about 4 years worth of data for backtesting. You said above that you've worked on all sorts of trading systems using back testing techniques etc and I was wondering how many years data you tended to use when testing your systems to create a "reliable" trading system? I was thinking about maybe getting about 10 years worth of data for each currency pair but thought that this would be too much, considering that markets change over time....
 
Coen,

This is a pretty tough question to answer - if your strategy works over 10 years, say with gains every year, u have a nice long-term strategy. However, it may just fail badly over a six-month period.

On the other extreme, if u do many tests on a 1 month period and it works every day (well, most days), then u have a nice short-term strategy - but u may have to adjust your parameters every month to keep it optimal.

With 4 hour data, 4 years is a nice period but i would look at the last 12 years or so to see where my strategy could fail and test it during that time. For example, the period around september 2001 is a good place to test a strategy - because of major moves or 2003 on eur/chf because it just did not move much.

You need to identify the strategy's weak points (ex. any trend following system hates chop - grid systems hate trends) and find the best test periods to make your system fail. If u cant make it fail for long, u have a good one!!

regards,
 

OK, so lets have fun: you try and find a system where u get the same back as forwards testing results & i will try and find reasons it may not be the same!!


I thought before only about problem of aggregating historical data (loosing values except 4 for each bar), problem of slippage cannot be overcome, it's just damn unpredictable;/. You could set in your system slippage to 0 to be sure that if you open position, the price will be the same in back testing. But if network causes delay... possition could be opened in back testing, but not in live trade.

Finaly I agree with you, that you cannot be sure that live trade would have the same result as back testing.

However if you are so experienced in testing such systems, i'm curious how big differences were, and was it only the matter of slippage?

--
Maciej Borecki
 
nachos,

in the best of cases, it is only a problem of slippage.. which is easy to compensate for - u make a reasonable assumption on the difference between the theoretical and actual price paid - a question of a tick/pip or two in most cases.


there are lots of very nice systems where the entry signals 'suddenly appear' two bars back.. whern u look at them in hindsight, it really looks super - when u try and trade them in real time, u get killed... but the 'back testing' really gave u a nice equity curve.

when u sometimes miss the entry in real vs backtesting you ALWAYS miss the entry on good trades and NEVER miss the entry on bad trades. this also makes the difference between a good and bad strategy.

the most difficalt cases are those where u think your system only uses past data but in fact relies on future data for its success. for example, i u use an ema of the current bar to enter, u will have significant differences. this is why few ma cross over systems actually work.

I have a problem at the moment: as u may have seen, i am testing a grid system : u place buy / sell orders every x pips. with 5 minute data, it is difficalt to backtest - if a 5 minute bar is 12 ticks tall (high-low), would a buy order near the low of the bar range have been closed near the top of the range?
the answer is yes if the price tended to go from high to low but no if it went from high to low. from the bar data, u have no way of knowing.

The only backtesting that produces reasonable results are with tick data - u play back the real data, sale by sale, transaction by transaction. this requires a lot of storage and computing power.

i hope this helps,

hugues
 
Is mt4 strategy tester available allready?
i have attached "macd sample" expert advisor and I cannot run strategy tester at all neither from View -> Strategy tester nor with Ctrl+R. I've installed 173 version.
Reason: