Suggestions for EA (Loosing to Profit) - page 6

 
c0d3:
Can you recommend any documentation for running a backtest with (1*std) -> (5*std) and (0.3 - > 1.5 on both the SL and TP)


I added some code to your progam, marked by djp. Go drop this EA onto a chart, in the properties section fill in start step stop with the values in the comments.

Check optimization checkbox and change the Use Dates on the settings tab. Uncheck Visual mode if you have it checked. Press Start. If you already know how to do this sorry, I don't know how familar you are with the tester. I'm not saying this is going to help but you might be surpised by some of these results.

In your code you have 2 lines [double fastSTD = ........ ] You never use fastSTD anywhere else in your code. I think you ment to use it, but used slowSTD instead by mistake.

Might want to check that out before you test, also take into account other posters comments before you start testing. If you have never done optimization before you may just want to do this with out changing your code, just to get the hang of it. I don't think it will run more than an hour with the four variables.

 
danjp:


I added some code to your progam, marked by djp. Go drop this EA onto a chart, in the properties section fill in start step stop with the values in the comments.

Check optimization checkbox and change the Use Dates on the settings tab. Uncheck Visual mode if you have it checked. Press Start. If you already know how to do this sorry, I don't know how familar you are with the tester. I'm not saying this is going to help but you might be surpised by some of these results.

In your code you have 2 lines [double fastSTD = ........ ] You never use fastSTD anywhere else in your code. I think you ment to use it, but used slowSTD instead by mistake.

Might want to check that out before you test, also take into account other posters comments before you start testing. If you have never done optimization before you may just want to do this with out changing your code, just to get the hang of it. I don't think it will run more than an hour with the four variables.


Thank you, i'm going to experiment with this on my live account tester, instead of the demo account tester
 
c0d3:
is it possible for you to post the modified EA here?

Sure. These are some of the major changes during the test above:

1) Your previous condition:

if(Close[0]<fastMA[tradingTimeFrame-1])shortEntry();else if(Close[0]>fastMA[tradingTimeFrame-1])longEntry();

2) As you see above: All MA, entF signals has been "arrayed" and 'bind' by

tradingTimeFrame-1

& by the equation, upon init:

if(tradingTimeFrame<3)tradingTimeFrame=3;
   entryTF=tradingTimeFrame-3;

and the rest of the changes follows: this way makes easier for future development esp. optimization purposes (just step thru tradingTimeFrame by 1)

Sorry, if there's no comments in my codes. I usually read codes intact, and without comments, makes it easier, cleaner for me to read.

 
c0d3:

Thank you, i'm going to experiment with this on my live account tester, instead of the demo account tester

There is a program called WinMerge, http://winmerge.org/downloads/ This will make you life much easier. It's free and makes merging code easy. Take myfile and merge the changes into Diostar's changes then repost that file with a version number so it is easier to keep track of the most recent version. MAybe start with MTFzMA_v1.0, then you increment the .0 up by one everytime one of use makes a changes.
 
diostar:

Sure. These are some of the major changes during the test above:

1) Your previous condition:

2) As you see above: All MA, entF signals has been "arrayed" and 'bind' by

& by the equation, upon init:

and the rest of the changes follows: this way makes easier for future development esp. optimization purposes (just step thru tradingTimeFrame by 1)

Sorry, if there's no comments in my codes. I usually read codes intact, and without comments, makes it easier, cleaner for me to read.


Really clean code, with lots of loops :)


Thank you
 
danjp:

There is a program called WinMerge, http://winmerge.org/downloads/ This will make you life much easier. It's free and makes merging code easy. Take myfile and merge the changes into Diostar's changes then repost that file with a version number so it is easier to keep track of the most recent version. MAybe start with MTFzMA_v1.0, then you increment the .0 up by one everytime one of use makes a changes.

will do
 

Here are some of the results(forward test), from 1:1 RR ratio, and it's loosing so far!

  • Question: if I were to reverse the order types(i.e. buy is now a sell), would the win:loose ratio be mirrored also?
  • There are 7 losses, and 4 wins, if I were to reverse the order types, would the results be 7 wins, and 4 losses?
  • Is my assumption correct?

If that's the case, then I think it would be a good idea to figure out when to reverse orders, and when to keep them as is, just a thought...

What do you guys think?

Statement: 7064834 - 3
Interbank FX, LLC

Account: 7064834 Name: 3 Currency: USD 2011 October 6, 20:45
Closed Transactions:
TicketOpen TimeTypeSizeItem PriceS / LT / PClose Time PriceCommissionTaxesSwapProfit
1024655882011.10.04 16:12balanceDeposit1 000.00
1024691902011.10.04 16:50sell0.10eurusdm1.328561.343961.313162011.10.06 18:071.343960.000.00-0.27-15.40
90620112011.10.04 16:50:08[sl]
1024860502011.10.04 20:32sell0.10audusdm0.953180.968860.937502011.10.06 07:350.968860.000.00-0.62-15.68
90620112011.10.04 20:32:48[sl]
1024861442011.10.04 20:33sell0.10gbpusdm1.547191.559581.534802011.10.06 11:001.534800.000.00-0.2812.39
90620112011.10.04 20:33:37[tp]
1024862472011.10.04 20:34sell0.10gbpjpym118.828120.182117.4942011.10.06 11:00117.4940.000.00-0.4917.40
90620112011.10.04 20:34:36[tp]
1024876952011.10.04 21:15buy0.10usdchfm0.916660.907080.926242011.10.06 07:000.926240.000.00-0.0710.34
90620112011.10.04 21:15:17[tp]
1024877232011.10.04 21:16buy0.10usdcadm1.052841.044261.060782011.10.05 17:041.044260.000.000.00-8.22
90620112011.10.04 21:16:53[sl]
1025641342011.10.06 11:00sell0.10gbpusdm1.533371.540811.528612011.10.06 11:121.528610.000.000.004.76
90620112011.10.06 11:00:10[tp]
1025652822011.10.06 11:12sell0.10gbpusdm1.528141.535071.521312011.10.06 14:221.535070.000.000.00-6.93
90620112011.10.06 11:12:51[sl]
1025692942011.10.06 12:30buy0.10usdjpym76.84776.69876.9942011.10.06 12:3076.8060.000.000.00-0.53
90620112011.10.06 12:30:01
1025692962011.10.06 12:30buy0.10usdjpym76.84776.69976.9952011.10.06 12:3076.8050.000.000.00-0.55
90620112011.10.06 12:30:02
1025692982011.10.06 12:30buy0.10usdjpym76.84776.69976.9952011.10.06 13:3376.6990.000.000.00-1.93
90620112011.10.06 12:30:02[sl]
0.00 0.00 -1.73 -4.35
Closed P/L: -6.08
Open Trades:
TicketOpen TimeTypeSizeItem PriceS / LT / P PriceCommissionTaxesSwapProfit
1025791662011.10.06 15:21buy0.10usdchfm0.923010.918380.927320.920920.000.000.00-2.27
90620112011.10.06 15:21:28
1025877442011.10.06 18:18sell0.10gbpusdm1.543221.550521.535801.544310.000.000.00-1.09
90620112011.10.06 18:18:43
0.00 0.00 0.00 -3.36
Floating P/L: -3.36
Working Orders:
TicketOpen TimeTypeSizeItem PriceS / LT / PMarket Price
No transactions
Summary:
Deposit/Withdrawal: 1 000.00 Credit Facility: 0.00
Closed Trade P/L: -6.08 Floating P/L: -3.36 Margin: 50.86
Balance: 993.92 Equity: 990.56 Free Margin: 939.70
Details:

Gross Profit: 44.05 Gross Loss: 50.13 Total Net Profit: -6.08
Profit Factor: 0.88 Expected Payoff: -0.55
Absolute Drawdown: 14.25 Maximal Drawdown: 25.61 (2.51%) Relative Drawdown: 2.51% (25.61)
Total Trades: 11 Short Positions (won %): 6 (50.00%) Long Positions (won %): 5 (20.00%)
Profit Trades (% of total): 4 (36.36%) Loss trades (% of total): 7 (63.64%)
Largest profit trade: 16.91 loss trade: -16.30
Average profit trade: 11.01 loss trade: -7.16
Maximum consecutive wins ($): 3 (33.78) consecutive losses ($): 5 (-25.61)
Maximal consecutive profit (count): 33.78 (3) consecutive loss (count): -25.61 (5)
Average consecutive wins: 2 consecutive losses: 2
 
c0d3:

Here are some of the results(forward test), from 1:1 RR ratio, and it's loosing so far!

  • Question: if I were to reverse the order types(i.e. buy is now a sell), would the win:loose ratio be mirrored also?

Good Lord, you mentioned it.

Because this what I discovered too the other day. It did improve though not to a glorious level, however that improvement, in an engineering/technical sense, was a highly significant amount of change rate. Just too significant to be left unprobed, "un-discovered."

So that, have me posted all together a new thread here:What do you think of this "Evil Grail" Approach to EAs? querying for others' methodologies towards their own EA approaches.

The methodology we are doing here is similar to reverse engineering, fyi. However the form is rather:

Finding the best solution in the most minimal of time. While in same (very short) time, 5-10 mins at most, test per unit logic, so the logic CAN be a determined one, say. 99% good or 99% bad, is pretty much confirmed.

Try it. you may be in for a surprise as I did. its quite an "unorthodox" way of doing - an Evil Grail "hoping" to turn Holy Grail, it rings of repentance of some sort, like turning over a new leaf. Nonetheless, IT IS a possibility.

 
diostar:

Good Lord, you mentioned it.

Because this what I discovered too the other day. It did improve though not to a glorious level, however that improvement, in an engineering/technical sense, was a highly significant amount of change rate. Just too significant to be left unprobed, "un-discovered."

So that, have me posted all together a new thread here:What do you think of this "Evil Grail" Approach to EAs? querying for others' methodologies towards their own EA approaches.

The methodology we are doing here is similar to reverse engineering, fyi. However the form is rather:

Finding the best solution in the most minimal of time. While in same (very short) time, 5-10 mins at most, test per unit logic, so the logic CAN be a determined one, say. 99% good or 99% bad, is pretty much confirmed.

Try it. you may be in for a surprise as I did. its quite an "unorthodox" way of doing - an Evil Grail "hoping" to turn Holy Grail, it rings of repentance of some sort, like turning over a new leaf. Nonetheless, IT IS a possibility.

I've tried this method before, and every single time i reversed the order types, the system kept failing, LOL?? I have a strong feeling, if i change this system, and run a test, i'm going to get the exact same results.

None the less, i'm going to try it!

 
c0d3:

I've tried this method before, and every single time i reversed the order types, the system kept failing, LOL?? I have a strong feeling, if i change this system, and run a test, i'm going to get the exact same results.

None the less, i'm going to try it!

No. That's not really it, at this stage. It CAN be a waste of time, testing from buy to sell, vice versa, though it did give changes. When I say, this is what I meant:

Finding the best solution in the most minimal of time. While in same (very short) time, 5-10 mins at most, test per unit logic, so the logic CAN be a determined one, say. 99% good or 99% bad, is pretty much confirmed.

1) You just take 1 master logic, say for eg:

if(Close[0]<fastMA[tradingTimeFrame-1])shortEntry()

and remove all the rest, and you do this:

if(Close[0]<fastMA[tradingTimeFrame-1]){shortEntry();longEntry();}

that is per unit logic - testing BOTH buy and sell, at the SAME time. So, if you wish to go optimization with this 1 master logic, you will simply optimize on your basic parameters - sl,tp, lots, etc only. Then analyse the instances of their buys and sells, judge whether if this 1 logic is can make the cut, in both scenarios - whether it makes an incorrect or correct entries. Both. Then move on, to the next logic.

As you get along, you might want to try combinations...1st logic just buy, logic 2, just sell, or both, etc. I find this way is more structured and you can really see which precise logic is really causing the drawdown.

Reason: