Backtesting/Optimization - page 79

 

Referencing other currency pairs in strategy tester

I was running strategy tester in visual mode and i found that my indicator that references other currency pairs is not running properly. Can an indicator in strategy tester reference other currency pairs?

 
 

General questions about strategy tester in MT4

Hi, I have few questions about strategy tester in Metatrader 4.

1) Could somebody fully explain to me differences between testing every tick/only lower timeframe prices/only opening prices?

2) Could somebody explain me why I get different numbers of trades when I repeatedly test the same strategy?

Thx a lot

 

Strategy testing - same code&settings x different results

Hello, I have a problem I can't explain myself, so I thought some of you educated minds could help me.

I did a strategy to buy every 1000th bar. SL -100pips, TP +100pips.

I then tested this strategy with move open prices only.

I tested the same settings and code over and over again, but I was getting different results.

Sometimes there were more, sometimes fewer trades. Some trades didn't end up losing, but winning instead.

By looking at results I noticed the strategy tester made the trades at 1 pip different level in some of the tests.

Could anyone explain this to me? Thanks.

 

mt4 strategy tester freezes

Like the title says, after testeing a momentum grid ea several times to the point where it started getting profitable. My strategy tester freezes and gets stuck and wont trade the ea anymore. There is nothing wrong with my computer because when I tested other ea's after that they work fine. Does anyone know what could be causing the problem and how to fix it?

 

Developing/backtesting MTF EA's in MT4

Hi, apologies if this is a duplicate question but SEARCH hasn't turned up an answer for this

Does MT4's strategy tester allow for backtesting MTF EA's? I've written a very simple EA that looks at a pair of EMA's on the chart's TF (backtested in M5) as well as MACD on H1. Despite explicitly passing PERIOD_M60 as the timeFrame when calling iMACD (see the sample code below), the main and signal values at say, 19May2011 19:00 when backtested in M5 are nowhere close to what I get when I look at the same chart on H1.

Molanis' website (Expert Advisors for MT4 - Examples) suggests MT4 cannot backtest MTF strategies. Is this correct? If thats the case, it's a bit redundant passing in the timeframe for any technical indicator when writing EAs! Is there a hack/workaround for this? I can't just multiple the periods by 12 (60/5) as the MA's are exponential

MTF_MACD_Main = iMACD(NULL,MTF1,MACDFast,MACDSlow,MACDSignal,0,MODE_MAIN,0);

MTF_MACD_Signal = iMACD(NULL,MTF1,MACDFast,MACDSlow,MACDSignal,0,MODE_SIGNAL,0);

 

Quick answer: not.

read this post:

https://www.mql5.com/en/forum/174975/page274

if you have an idea so you can forward test?trade on demo this idea for few days/weeks/months to be sure that it is profitable for some market condition. After that you can create EA ...

it's a bit redundant passing in the timeframe

why reductant?

You are trying to automate proven trading strategy. proven because you (or someone) traded it on demo or on real and you have trading statements ... - It is only the way to do with MTF EA - to know the system, to trade it and after that - automate.

 

[langtitle=es]I have the same problem!! - Attention to Newdigital[/langtitle]

stehlikpetr@msn.com:
Hello, I have a problem I can't explain myself, so I thought some of you educated minds could help me.

I did a strategy to buy every 1000th bar. SL -100pips, TP +100pips.

I then tested this strategy with move open prices only.

I tested the same settings and code over and over again, but I was getting different results.

Sometimes there were more, sometimes fewer trades. Some trades didn't end up losing, but winning instead.

By looking at results I noticed the strategy tester made the trades at 1 pip different level in some of the tests.

Could anyone explain this to me? Thanks.

[lang=es]I agree with the late post. I do a EA and bactest it in the same MT4 with every setting the same and the results are completely different. This happens in my Alpari.Uk MT4, and I have tried to renew the history data for that timeframe and it is useless, what happens!!??. Further more, I did the same backtest in Youtradefx and X-Trader and the results yes are the same!! but not in Alpari.Uk. I add more: Alpari.Uk gives different results in backtest ONLY if it is on working days when I run the test, but the results are the same in weekend..!!. Youtradefx and X-Traders always provide the same results whatever day of the week. Also again against Alpari.Uk, despite backtesting in weekend to get the same results if I repeat the same backtest in two different demo accounts of Alpari.Uk working in the same time in different MT4's, they give me different results compared between them, despite I get the same results separately in each one. It is crazy, please HELP, I need to run realiable bactest!! [/lang]

 

Difference in optimization and single backtest?

Hi,

I'm wondering why MT4 trades more frequent in a optimized backtest then it does in a single (static) backtest (same settings), is this EA relevant or a common bug?

Anyone ran into the same problem?

 

Mt4 History data question

Hi, this a noob question but i would like to ask how do you set on chart to show only a specific bar history? without the chart being updated?

Example: On GBP/JPY i would only like to see on my chart candles on a 1hr timeframe of yesterday's result.

I know how to delete the recent 1 hour data on the history center and refresh the chart and it shows the past date i wanted but my mt4 keeps updating it and ultimately adds the new recent candles. i want to have control over the time so i could study an indicator how it evolves from past bars up to the latest.

Does anyone know how? Help is much appreciated thank you