Suggestions for EA (Loosing to Profit) - page 12

 
c0d3:
How did you come to choose to trade these pairs? A random drawing, or based on strategy?

EURUSD for the spread, the other three were pretty much random.
 
danjp:

EURUSD for the spread, the other three were pretty much random.

Got it!


Do you think it's a good idea to have this EA trade all available pairs? Instead of the 4,5,6 pairs that I'm testing with, or the 4 that you are testing with.

 
c0d3:

Got it!


Do you think it's a good idea to have this EA trade all available pairs? Instead of the 4,5,6 pairs that I'm testing with, or the 4 that you are testing with.


I think you should run it on the EURUSD. Have you looked your results, is one other pair performing better then the rest? If so use that one two.

 

New code:

  • If closing price is 2 standard deviations from the MA, then comment with time-frame.

  • Also, i added a true/false for trading and the checking of standard deviation as externs


  • I added the new code for the reverse orders concept
  • Potentially when the prices are 2 standard deviations away from the moving average, I want to reverse the orders
  • Would this reversal make sense for this EA?
Files:
 
c0d3:

New code:

  • added standard deviation check from a slow moving average across all time frames.
  • If closing price is 2 standard deviations from the MA, then comment with time-frame.

  • Also, i added a true/false for trading and the checking of standard deviation as externs


  • I added the new code for the reverse orders concept
  • Potentially when the prices are 2 standard deviations away from the moving average, I want to reverse the orders
  • Would this reversal make sense for this EA?
 

I merged my lastest code into your code. I added the following:

A stack feature, if you want to trade 1 position just set stack to 1, the default is 5 in the code. DistanceApart is the distance between trades, if you change the default, which is 5 to 15 your win percentage will go up to 40-45% on a 5 stack

An AllowTradingHours bool to regulate which hours your EA trades. You can check the setting on one of the reports I am going to put up. I ran a bunch of tests those hours seamed about the average for best hours to trade for this EA.

I implemented your reversal code. I did a fast hack job just to do a quick test, If the 30 || 60 was 2 STD's then reverse the trades. Results were horrible. You may want to tweak that and run more tests. You can turn that off with your bool. Also, check to make sure I coded that right! I did it as an afterthought in a few minutes when I read this post again. To answer your final question, I don't think this make much sense in your case, but test it for yourself.

Added a bunch of code to deal with closing open and pending orders because of the stack feature.

Feel free to toss it, change it, make it better etc. I'm going to attach the code to this message, I'll put up some of the result. EURUSD seamed to be the best one I tested. You may want to pick another pair and do some testing on it see if you can get good result with another pair.

 
danjp:


Here are some of the results from tests I ran. These were 9.5 month runs StandardDev was ON here, poor results. Also all runs were $1,000 and using fixes 0.02 lot(s).

Strategy Tester Report
MTFzMovingvAverage_v1.0
FXCM-Demo (Build 406)


SymbolEURUSD (Euro vs US Dollar)
Period15 Minutes (M15) 2011.01.03 00:00 - 2011.10.13 23:45 (2011.01.03 - 2011.10.14)
ModelEvery tick (the most precise method based on all available least timeframes)
ParametersenableSTDcheck=true; sMultiple=5; fMultiple=5; risk=0.3; reward=1.2; Stack=5; DistanceApart=5; tradingTimeFrame=60; entryTF=15; AllowTradingHours=true; OpenHour=11; CloseHour=17; lots=0.02; slowMovingPeriod=25; fastMovingPeriod=150;
Bars in test13280Ticks modelled8851007Modelling quality90.00%
Mismatched charts errors3
Initial deposit1000.00
Total net profit-680.11Gross profit961.59Gross loss-1641.71
Profit factor0.59Expected payoff-3.74
Absolute drawdown680.11Maximal drawdown703.91 (68.76%)Relative drawdown68.76% (703.91)
Total trades182Short positions (won %)107 (14.02%)Long positions (won %)75 (28.00%)
Profit trades (% of total)36 (19.78%)Loss trades (% of total)146 (80.22%)
Largestprofit trade44.10loss trade-22.58
Averageprofit trade26.71loss trade-11.24
Maximumconsecutive wins (profit in money)10 (255.89)consecutive losses (loss in money)44 (-530.49)
Maximalconsecutive profit (count of wins)255.89 (10)consecutive loss (count of losses)-530.49 (44)
Averageconsecutive wins6consecutive losses21

 

Here are the results with StandardDev OFF

Strategy Tester Report
MTFzMovingvAverage_v1.0
FXCM-Demo (Build 406)


SymbolEURUSD (Euro vs US Dollar)
Period15 Minutes (M15) 2011.01.03 00:00 - 2011.10.13 23:45 (2011.01.03 - 2011.10.14)
ModelEvery tick (the most precise method based on all available least timeframes)
ParametersenableSTDcheck=false; sMultiple=5; fMultiple=5; risk=0.3; reward=1.2; Stack=5; DistanceApart=5; tradingTimeFrame=60; entryTF=15; AllowTradingHours=true; OpenHour=11; CloseHour=17; lots=0.02; slowMovingPeriod=25; fastMovingPeriod=150;
Bars in test13280Ticks modelled8851007Modelling quality90.00%
Mismatched charts errors3
Initial deposit1000.00
Total net profit1022.17Gross profit2442.91Gross loss-1420.74
Profit factor1.72Expected payoff4.50
Absolute drawdown125.69Maximal drawdown442.87 (19.29%)Relative drawdown23.18% (263.76)
Total trades227Short positions (won %)79 (26.58%)Long positions (won %)148 (41.22%)
Profit trades (% of total)82 (36.12%)Loss trades (% of total)145 (63.88%)
Largestprofit trade56.81loss trade-23.23
Averageprofit trade29.79loss trade-9.80
Maximumconsecutive wins (profit in money)11 (143.97)consecutive losses (loss in money)17 (-168.94)
Maximalconsecutive profit (count of wins)280.13 (10)consecutive loss (count of losses)-184.66 (14)
Averageconsecutive wins6consecutive losses10

 
danjp:


This was the code you attached with the same lotsize that I tesedt the other runs with.

Strategy Tester Report
MTFqMovingbAverageorg
FXCM-Demo (Build 406)


SymbolEURUSD (Euro vs US Dollar)
Period15 Minutes (M15) 2011.01.03 00:00 - 2011.10.13 23:45 (2011.01.03 - 2011.10.14)
ModelEvery tick (the most precise method based on all available least timeframes)
ParametersenableTrading=true; enableSTDcheck=false; tradingTimeFrame=60; risk=0.9; reward=0.9; lots=0.02; slowMovingPeriod=50; fastMovingPeriod=100;
Bars in test13280Ticks modelled8851007Modelling quality90.00%
Mismatched charts errors3
Initial deposit1000.00
Total net profit113.76Gross profit417.55Gross loss-303.79
Profit factor1.37Expected payoff2.28
Absolute drawdown9.83Maximal drawdown110.95 (9.36%)Relative drawdown9.36% (110.95)
Total trades50Short positions (won %)9 (22.22%)Long positions (won %)41 (63.41%)
Profit trades (% of total)28 (56.00%)Loss trades (% of total)22 (44.00%)
Largestprofit trade31.55loss trade-30.76
Averageprofit trade14.91loss trade-13.81
Maximumconsecutive wins (profit in money)8 (113.84)consecutive losses (loss in money)4 (-74.74)
Maximalconsecutive profit (count of wins)113.84 (8)consecutive loss (count of losses)-74.74 (4)
Averageconsecutive wins2consecutive losses2

 
danjp:


finally the besst win % could get.

Strategy Tester Report
MTFzMovingvAverage
FXCM-Demo (Build 406)


SymbolEURUSD (Euro vs US Dollar)
Period15 Minutes (M15) 2011.01.03 00:00 - 2011.10.13 23:45 (2011.01.03 - 2011.10.14)
ModelEvery tick (the most precise method based on all available least timeframes)
ParametersenableSTDcheck=true; sMultiple=5; fMultiple=5; risk=0.3; reward=1.2; Stack=5; DistanceApart=15; tradingTimeFrame=60; entryTF=15; AllowTradingHours=true; OpenHour=11; CloseHour=17; lots=0.02; slowMovingPeriod=25; fastMovingPeriod=150;
Bars in test13280Ticks modelled8851007Modelling quality90.00%
Mismatched charts errors3
Initial deposit1000.00
Total net profit914.29Gross profit2296.56Gross loss-1382.26
Profit factor1.66Expected payoff4.62
Absolute drawdown193.63Maximal drawdown416.22 (19.07%)Relative drawdown27.01% (298.47)
Total trades198Short positions (won %)69 (33.33%)Long positions (won %)129 (51.94%)
Profit trades (% of total)90 (45.45%)Loss trades (% of total)108 (54.55%)
Largestprofit trade56.81loss trade-31.23
Averageprofit trade25.52loss trade-12.80
Maximumconsecutive wins (profit in money)12 (145.90)consecutive losses (loss in money)16 (-222.94)
Maximalconsecutive profit (count of wins)277.80 (6)consecutive loss (count of losses)-222.94 (16)
Averageconsecutive wins6consecutive losses7

Reason: