Backtesting/Optimization - page 72

 

Testing question

Hello all,

I have developed and ea that is supposed to trade from specified beginning time to specified ending time. The time is in GMT which is from 6 to 16, here is the code to trade in this time interval only

if(TimeHour(TimeCurrent())>=tradeStartTime

&&TimeHour(TimeCurrent())<=tradeEndTime)

{ then trade}

tradeStartTime is 6

tradeEndTime is 16

Can it be backtested?

 

backtesting simple aid

Dear all,

I'm in the process of back testing a couple of systems and making notes of trades that I would have taken in a spread sheet. It's slow going....

It occured to me that what might speed things up would be if there was some kind of measuring trendline - just how the cross hair works but something which I could actually draw on a chart as a trend line and then at one end it would say how many pips the trade had moved on each line. There would be lines for all trades (so eventually a lot) and this could be saved as a template for future reference.

If this was available recording back testing would be more organised - I'd be able to pick a month then record all the pips + and -. This really would be a lot quicker than my current effort of recording time/day etc which is very open to error.

I think GFT may have had such a tool but can't find one for MT4 - you can imagine searching for "Trend line measuring pips" brings up rather a lot of entries.

Many thanks in advance.

dgrs

 

I have an EA that trades only at the end of each day. So the trade opens at 00:00 hours.

When backtesting do I need to use "Every tick" or can I just use "Open prices only"?

 
peter777:
Hi,

I have simple trading plan, which indicate cca 100 % per month.

I backtested it on 5 months, but the results are the always same.

When i set up demo account, my initial investment was 300$ and i evaluate it on 600$ during the one month.

Count, i started in january - 300$, february - 600$, march - 1200$, april - 2400$, may - 4800$, june- 9600$,

july - 19200$, august - 38400$, september - 76800$, october - 153600$, november - 307200$, december -614400$.

During the one year 614400$ ??? i dont know believe it. It is really trading such easy? I know that somwhere i am wrong,

but i dont know where... please help me

Regards :-)

Of course it is very possible...but it is just a back test...You should try it in fordward test by demo first...If fordward test is good you can try at real acc....

But you must remember....back test is from history data...last year is different form this year....

And forex is not easy as you thing...

 

Historic data - Where to find

Hi all,

I am making some Expert Advisors and I discovered that some of backtesting is crashing (so I can't have realistic results) because I don't have data for some days and weeks ago. I tried to go to Tools and History Center and I tried to update data and I was hoping that will download for me data I don't have but it is not true (at least in my case as I have after it same data).

Can somebody tell me if there is way to require from MT4 to re-download ALL data for some period of time ... For example I would like to have ALL data for few pairs since 1.1.2009 until today. Or Is there some source of data where I can grab xls file with it and import in MT4?

Thanks in advance

Aleksandar

 

Hi Aleksandar,

From memory you only get to access data from the date you opened your MT4 account, so very limited. You can try, turn off autoscroll and go back to the begining of your data on the chart then using the scroll wheel on the mouse scroll back in time, it should give you some more data if any more is available to you.

Make sure you open all the charts that you want to keep data for, cause say in 6 months time you want to keep data for CADJPY well your history starts when chart gets opened not from now. Hope this makes sense.

There are very few data sources available in xls, finam is one ( use at own discretion) and from looking at Dukascopy website they have back data, I haven't tried so dont know format, quality etc.

The best advice is open all charts and week by week save yourself to csv.

 
peter777:
Hi,

I have simple trading plan, which indicate cca 100 % per month.

I backtested it on 5 months, but the results are the always same.

When i set up demo account, my initial investment was 300$ and i evaluate it on 600$ during the one month.

Count, i started in january - 300$, february - 600$, march - 1200$, april - 2400$, may - 4800$, june- 9600$,

july - 19200$, august - 38400$, september - 76800$, october - 153600$, november - 307200$, december -614400$.

During the one year 614400$ ??? i dont know believe it. It is really trading such easy? I know that somwhere i am wrong,

but i dont know where... please help me

Regards :-)

Amazing results, but I think the broker would blacklist you before the year was out. If you want to share details others may discover if there is any errors in the backtest process, if not and the system works in forward testing good luck and enjoy your retirement in 2-3 years.

Swagman

 

EA backtesting

Can someone let me know if these results are ok. Just not sure what profit factor should be.

thx,

todd

Symbol EURUSDm (Euro vs US Dollar)

Period 5 Minutes (M5) 2009.07.01 00:00 - 2010.02.11 23:55 (2009.07.01 - 2010.02.12)

Model Every tick (the most precise method based on all available least timeframes)

Parameters Remark1="== Main Settings =="; MagicNumber=0; SignalsOnly=false; Alerts=false; SignalMail=false; PlaySounds=false; ECNBroker=false; EachTickMode=false; CloseOnOppositeSignals=false; Remark2=""; Remark3="== MAPeriod=1; Price=0; Mode=1; Remark4=""; Remark5="== Trade #1 Settings =="; Lots=0.1; MoneyManagement=false; Risk=0; Slippage=5; UseStopLoss=true; StopLoss=225; UseTakeProfit=true; TakeProfit=100; UseTrailingStop=false; TrailingStop=15; MoveStopOnce=false; MoveStopWhenPrice=100; MoveStopTo=80; Remark41=""; Remark51="== Trade #2 Settings =="; UseTrade2=false; Lots1=0.1; MoneyManagement1=false; Risk1=0; Slippage1=5; UseStopLoss1=true; StopLoss1=150; UseTakeProfit1=true; TakeProfit1=30; UseTrailingStop1=false; TrailingStop1=30; MoveStopOnce1=false; MoveStopWhenPrice1=50; MoveStopTo1=1;

Bars in test 46199 Ticks modelled 2760978 Modelling quality 90.00%

Mismatched charts errors 8

Initial deposit 1000.00

Total net profit 242.35 Gross profit 452.61 Gross loss -210.27

Profit factor 2.15 Expected payoff 4.33

Absolute drawdown 18.20 Maximal drawdown 59.42 (5.14%) Relative drawdown 5.14% (59.42)

Total trades 56 Short positions (won %) 28 (85.71%) Long positions (won %) 28 (78.57%)

Profit trades (% of total) 46 (82.14%) Loss trades (% of total) 10 (17.86%)

Largest profit trade 10.00 loss trade -22.92

Average profit trade 9.84 loss trade -21.03

Maximum consecutive wins (profit in money) 11 (108.23) consecutive losses (loss in money) 2 (-45.29)

Maximal consecutive profit (count of wins) 108.23 (11) consecutive loss (count of losses) -45.29 (2)

Average consecutive wins 5 consecutive losses 1

 

Chart history not available on server.

Hello,

I recently switched to a fixed spread on one of my accounts and the broker uses a different designation for these pair names in Metatrader 4, adding an "FXF" extension. This may or may not have to do with the fact that I cannot download any historical data more than a a few days in history.

Has anyone had a similar situation in not being able to download more than very recent history? The broker in question is forex (dot) com UK

Thanks, Joel

 

Hi guys.. I Give you some $ 25 voucher from Futures Galleria.

Futures Galleria Information :

- Mini index & forex account (minimum deposit $ 500 via Paypal)

- Fixed Spread 5 (index) and 3 (forex), komisi $2

- Trade all product in 1 account

XR-1076-6915-48

XR-1083-6886-07

XR-1087-4436-59

XR-1089-5556-69

XR-1095-4990-22

Vouchers expired 31th March, 2010.

Happy trading.