Suggestions for EA (Loosing to Profit) - page 9

 

You are right, and that is the only way to validate backtesting, is to run a forward, then a backtest, then compare. But i can take a wild guess, that the results will not be identical.

If you have Broker Tick-Data and Spreads, then the results should be Identical. Unless of course you Reboot your computer and missed a trade or something along those lines. ;)

 

> If you have Broker Tick-Data and Spreads, then the results should be Identical

Barring network issues, packet loss, EA busy on a prior tick, etc

-BB-

 
c0d3:
Also a note about the results so far, so it lost 90$, then it made it back, now it's +62$, but just like it made it back, it's gonna give it right back to the markeoft, I would be very surprised if it doesn't return the profits it gained, unless i turn it off.


Hey c0d3,

1.) Can you post the that latest version of the code you are using? I have been backtesting, 685 runs over the last 8 months, of the version I sent you. I have been getting pretty good results on the 1hr eurusd. The last post from diostar returns a 404 error on the link. I have some code\logic in on of my ea's that I want to add to yours and see if that will reduce the drawdown%.

2.) Which other pairs do you intend to on run it on?Don;t go crazy, pick 1 or 2 others.

3.) This site has some issues, is any one getting notified when they subscribe to a topic and someone posts a new comment, I swear that this was working for me a few weeks back and now nothing.

 
c0d3:
Also a note about the results so far, so it lost 90$, then it made it back, now it's +62$, but just like it made it back, it's gonna give it right back to the market, I would be very surprised if it doesn't return the profits it gained, unless i turn it off.

Notice when this winning happens, your consecutive wins increases to 3, from 2. Your consecutive losses remains the same,4.

The rest of the report,, nothing much I can say.

So, if you want this to make some headways into this fwd test, you have to look at what sort of market condition has "altered" the probability of consecutive wins, but losses remains the same. Was it because of slow, ranging market....or fast trending, or was it a breakout? Or was it because longentry() signals were more often than short ones, vice versa? Look for the answers from the charts (besides statements and report) and make strategic notes that covers every session, everyday, or even every H1, H4, etc.

What more, you are trading multiple majors, in a single fwd test - that may make the test n times more variables. Have you consider their correlations, dependencies? Each of them do affect the other greatly these days, if you don't know that yet.

You have to do some and much more than just simply waiting for it to be over, or 1-2 trades made some profits. A fwd test can be agonisingly slow, but it IS very very helpful in seeking strategic changes real time, etc, that during a backtest, cant give.

Also, im not sure why you even thinking of "unless i turn it off" during test??? This really mad, it will just ruin ALL the effort you (and perhaps everyone else) gave into this test.

 
danjp:


Hey c0d3,

1.) Can you post the that latest version of the code you are using? I have been backtesting, 685 runs over the last 8 months, of the version I sent you. I have been getting pretty good results on the 1hr eurusd. The last post from diostar returns a 404 error on the link. I have some code\logic in on of my ea's that I want to add to yours and see if that will reduce the drawdown%.

2.) Which other pairs do you intend to on run it on?Don;t go crazy, pick 1 or 2 others.

3.) This site has some issues, is any one getting notified when they subscribe to a topic and someone posts a new comment, I swear that this was working for me a few weeks back and now nothing.

the EA i'm testing with
Files:
 
ubzen:

You are right, and that is the only way to validate backtesting, is to run a forward, then a backtest, then compare. But i can take a wild guess, that the results will not be identical.

If you have Broker Tick-Data and Spreads, then the results should be Identical. Unless of course you Reboot your computer and missed a trade or something along those lines. ;)


Some thoughts on testing. I agree backtesting and forward testing should be nearly identical. However when you get into live trading vs forward testing, they will most likely not be identical, in my case not even close. When you forward test there is no volume. So when your orders are put in the case of pending orders, they will open at your price. Market orders should open at the ask\bid etc. In live tranding that is not even close to reality.

Let me explain. I have an EA that runs on multiple pairs. It gets similar results on the pairs in backtesting last two years, in forward testing last 2 months. The pairs are EURUSD, EURCHF, EURAUD and AUDUSD. These are not exactly exotic pairs. This EA uses candle patterns and price to trade.

Last night I opened a smaller live MT4 account then my regular real one to "live test my EAs" for the first time. I have a VPS with my broker with multiple installs of MT4 both live and demo. I also have serveral MT4 installs on my laptops at home. So I have been forward testing my EA on both a demo acct on my VPS and my laptops at home for the last couple of months. They are nearly identical in orders notifications etc. My Ea mails me updates and status and stuff on a regular basis when it is up and trading.

So last night was my big night. I drop my EA's onto the small live account on my VPS, I also setup a demo acct on one of my laptops to mirror the setup with my Ea's on the VPS. Now I know from my demo testing with a demo on a VPS and a demo on my client side install of MT4 on a laptop, there will be small differences. The VPS is much better at not hanging on a tick or locking up for a few seconds etc. In general my testing of this confirmed the VPS was better then having the real EA's run on my laptop. The orders were close to identical in all ways. I may have had a few seconds difference here an there but I would get double noticatifications and both EA's were working correctly on multiple pairs at the same time etc.

So last night I run the live small acct on the VPS and a demo on my laptop. Both setup with EA's and properties are the same, the same pairs etc. Why did I do this, With a VPS you set everything up and then disconnect. On my laptop I can check it quickly in the morning just to see what has gone on during the night before I go downstairs in see the emails on my phone.

I check this morning on my laptop and I see I have 5 stack of EUR USD trades that opened and closed for a profit, a total gain of around 100 points give or take. On my VPS no trades. I also had 5 stack of AUDUSD open and close for a loss of 40 points total. On the VPS there is similar trade within a few pips of the demo. I also have a EURCHF trade open on both setups. Again a 5 stack both orders where placed within a point of each other. 1 market and 4 pendings, like all of the other trades. I bring up the VPS and the market order is opened the same as the demo account. However the pending orders which were placed at the same price and time as the demo account are opened about 20 points from the pending price. No so on the demo account. Everything is wonderful on the demo all my orders opened and the pending price. So instead of making 100+ points on the trade I would make only about 30 total. Now, in this case the trade closed for a loss. I lost like 110 points on the VPS demo and only 30 or so on the demo becuase of where the pending orders opened on the VPS account. Here is another case. While I was sitting at my desk this moring I have both setups open becasue I am reseaching why there was such a difference between the two. I see a EURUSD trade open on the demo and no trade open on the VPS account, Why? The candle pattern was slightly different. I had a small down candle on the demo acct and a small up candle on the VPS so the pattern did not match.

Whats my conclusion. As a Software engineer for 12+ years, any type of testing you can do to make sure your code is solid and as bug free as you can make it is critical at all stages of the dev process. Optimization is also a great tool if for no other reason then to run as many cycles through your code as possible in the shortest period of time, like, while you sleep. It will also give you a "idea" or "average" of what you should set your parameters at. In my case I usually toss the top 20% and the bottom 20% out and then look for smallest drawdown and then the best profit of what is left, if there is a good grouping of runs in similar range.

So foward testing is great but there is no real counter party out there to take your trade, or sense of volume. If a spike happens you orders will get filled fine in a demo or close fine etc. However you might want to open the smallest possible real acct you can and "live test" not forward demo test your Ea. After of course you back, forward and optimize your EA in demo accts. You just may need to make a few tweaks to your Ea to cope in the real world.

Fyi, my second 5 stack of EURUSD just closed at 1.3776 in my demo acct for another net of around 110 points. So in my demo acct for the day, my EA's just shut themselves down until tomorrow, 10 winners and 10 losers, I made about 1%. In my real acct I had 10 losers and lost about 1+%. I know what you are thinking. Your dealer %$$#s get a new one. I believe I have one of the best brokers in the US, just my opinion, I have never had an issue in non-ea trading. Also, I think have the correct\optimum setup for EA based trading, a VPS with all of the benifits that gives you.

I should have opened another thread for this but we were discussing a fair amount about testing in this thread.

 
Something to think about and investigate regarding Live vs Demo. I know of one Broker that has different account levels depending upon your account balance, lower account balances get wider spreads . . . their Demo account runs like their top end account and has tight spreads. So . . . if you test with their Demo and then run a live small account there is a big difference in spreads . . . it could well be the difference between profit and loss . .
 
RaptorUK:
Something to think about and investigate regarding Live vs Demo. I know of one Broker that has different account levels depending upon your account balance, lower account balances get wider spreads . . . their Demo account runs like their top end account and has tight spreads. So . . . if you test with their Demo and then run a live small account there is a big difference in spreads . . . it could well be the difference between profit and loss . .

You read minds, I was thinking about that last night and I pulled up my other account and the spreads looked like thay were same.
 
I want to add that so far, it's coming out with a break even, it's down, it's up, and now it's flat
 
c0d3:
I want to add that so far, it's coming out with a break even, it's down, it's up, and now it's flat


I'm still working on it. I got distracted with my live testing the past 2 nights. I have added a few features to it like stacking and stuff. More way to look for open orders. I added a trade time function to it I can;t remember if that helped or not. It usually does in my EA's no reason to trade all day.

In the testing I did, it seems that your tp and sl are way too small. I think you should adjust your fmultiple and smultiple to like 5 and 5. IMO.

Reason: