EA using ATR and ADX - page 3

 

Jeff-- your ADXSAR link

Thanks for posting that! I have been backtesting it for different time frames and I believe it has some value. About the risk levels-- that is one thing with parabolic based systems-- that they seem to add an extra element of safety. I don't mind trading somewhat larger lot sizes, if this element is there.

I backtested it with IBFX and FXDD and had some decent results in several time frames with EURUSD. I could optimize to show drawdown at approx. 20% and gains at close to 50% annualized. Strangely enough, the 15M timeframes did best, but you had to adjust ADX and I think it would be important to optimize in the right direction. The results were very choppy on the graphs, but overall were good. You could have several consistent losses too, though

Thanks again,

Chili

 

First Results Are In!

So, 17 hrs into the first day of testing, I have some results:

Account: 10299 Name: Alex Brandt Currency: USD 2009 February 2, 13:55

Closed Transactions:

Ticket Open Time Type Size Item Price S / L T / P Close Time Price Commission Taxes Swap Profit

16121 2009.02.01 09:46 balance Deposit 5 000.00

16129 2009.02.02 00:45 buy 0.10 eurgbp 0.8867 0.0000 0.8882 2009.02.02 08:15 0.8882 0.00 0.00 0.00 21.48

16311 2009.02.02 11:13 buy 2.00 eurchf 1.4859 0.0000 1.4870 2009.02.02 12:22 1.4860 0.00 0.00 0.00 17.13

16262 2009.02.02 09:27 buy 0.10 eurusd 1.2759 0.0000 1.2778 2009.02.02 12:42 1.2778 0.00 0.00 0.00 19.00

16361 2009.02.02 13:10 buy 0.50 eurchf 1.4848 0.0000 1.4860 2009.02.02 13:50 1.4860 0.00 0.00 0.00 51.51

0.00 0.00 0.00 109.12

Closed P/L: 109.12

Open Trades:

Ticket Open Time Type Size Item Price S / L T / P Price Commission Taxes Swap Profit

No transactions

0.00 0.00 0.00 0.00

Floating P/L: 0.00

Working Orders:

Ticket Open Time Type Size Item Price S / L T / P Market Price

No transactions

Summary:

Deposit/Withdrawal: 5 000.00 Credit Facility: 0.00

Closed Trade P/L: 109.12 Floating P/L: 0.00 Margin: 0.00

Balance: 5 109.12 Equity: 5 109.12 Free Margin: 5 109.12

---------------

No losing trades so far Monday I just wanted to have the EA run on default settings. Today, I'm going to change the settings, to see if I can get a better result. One thing I've encountered (maybe my expectations of this EA are high) but I was expecting at least 6-8 trades per currency pair. I was trading 5 currency pairs, so I was figuring about 30 trades a day with this EA. I guess thats a pretty high expectation. So since its trading less, I've increased my lot size to .5, (5k demo) and the number of pairs it trades on to 8. Only reason why, is that I've been noticing that the EA doesn't pick up some trades when the conditions are right. I don't know if its cause it needs a bigger TF (currently all pairs are on M15 TF) or if its the default settings that made the EA not pick up a few trades. Hopefully, when I change the settings here in a few hours, hopefully, I'll be able to see a difference sometime during the day. The other thing I encountered, was that I tried to manually close out a trade the EA had initiated, and couldn't. Don't know why. Never encountered that before. Besides what I've mentioned above, everything works great! No major complaints here.

 

...longer timeframes should give you even less trading but with a higher TP value. The shorter the timeframe the more buy/sell signals you'll have. Isn't it?

Anyway it seems to be a good start.

As I told you I'm developing my EA too and only had the time to do some backtest on EURUSD. It works good. As soon as I go "demo live" I'll post some results too, so we can share them. Now I need to implement some money management and stoploss feature. I'll probably use Parabolic SAR to have a dynamic stop loss level. But just an idea still to be tested.

One question... I suppose you use "point of extermum" to filter out trades. For how long your pending orders are valid? I was thinking to an hour for M15 charts.

I've tested it a little with longer timeframes like H1 and H4 and I have to say that result are very interesting too. But as I told you I'm only backtesting and it's not a very singificative signal.

Ciao,

Andrea

 

Yes, you are correct. I do use the 'point of extermum' to filter out trades. But even if you use that, you can still get what I call a 'false signal'. to eliminate the EA taking a position on a false signal, the EA waits till the lines are a certain distance apart before initiation a position. I've determined based on the ADX graph, that distance of 10+ between the lines helps to eliminate a trade on a 'false signal'. You can go as low as 6, however thats getting to a risky lvl I think, and you could be liable to have a losing trade a half hour down the road. right now I'm operating with out a S/L.

 

that's nice.

I'm using it and it filters out a lot of bad things

Thanks again!

Andrea

 

Day 2 of Forward Testing (version 3)

Account: 10299 Name: Alex Brandt Currency: USD 2009 February 3, 15:51

Closed Transactions:

Ticket Open Time Type Size Item Price S / L T / P Close Time Price Commission Taxes Swap Profit

Day 1

-------------------

16121 2009.02.01 09:46 balance Deposit 5 000.00

16129 2009.02.02 00:45 buy 0.10 eurgbp 0.8867 0.0000 0.8882 2009.02.02 08:15 0.8882 0.00 0.00 0.00 21.48

16311 2009.02.02 11:13 buy 2.00 eurchf 1.4859 0.0000 1.4870 2009.02.02 12:22 1.4860 0.00 0.00 0.00 17.13

16262 2009.02.02 09:27 buy 0.10 eurusd 1.2759 0.0000 1.2778 2009.02.02 12:42 1.2778 0.00 0.00 0.00 19.00

16361 2009.02.02 13:10 buy 0.50 eurchf 1.4848 0.0000 1.4860 2009.02.02 13:50 1.4860 0.00 0.00 0.00 51.51

16383 2009.02.02 14:48 buy 0.50 audusd 0.6268 0.0000 0.6281 2009.02.02 14:56 0.6268 0.00 0.00 0.00 0.00

16430 2009.02.02 17:48 buy 0.50 gbpchf 1.6512 0.0000 1.6548 2009.02.02 17:56 1.6548 0.00 0.00 0.00 154.69

16416 2009.02.02 16:22 buy 0.50 gbpusd 1.4209 0.0000 1.4248 2009.02.02 18:03 1.4238 0.00 0.00 0.00 145.00

16434 2009.02.02 18:00 buy 0.50 gbpchf 1.6566 0.0000 1.6603 2009.02.02 21:44 1.6603 0.00 0.00 0.00 159.22

Day 2

-----------

16466 2009.02.02 20:20 buy 0.50 eurgbp 0.9005 0.0000 0.9021 2009.02.03 00:33 0.9021 0.00 0.00 -6.55 113.73

16617 2009.02.03 03:04 buy 0.50 usdjpy 89.41 0.00 89.51 2009.02.03 03:12 89.51 0.00 0.00 0.00 55.86

16623 2009.02.03 03:15 sell 0.50 usdjpy 89.60 0.00 89.49 2009.02.03 06:28 89.49 0.00 0.00 0.00 61.46

16647 2009.02.03 06:11 buy 0.50 gbpchf 1.6516 0.0000 1.6544 2009.02.03 08:46 1.6544 0.00 0.00 0.00 120.42

16665 2009.02.03 08:45 buy 0.50 gbpusd 1.4213 0.0000 1.4235 2009.02.03 08:46 1.4235 0.00 0.00 0.00 110.00

16669 2009.02.03 08:46 buy 0.50 gbpchf 1.6551 0.0000 1.6576 2009.02.03 09:06 1.6576 0.00 0.00 0.00 107.52

16671 2009.02.03 08:46 buy 0.50 eurgbp 0.9036 0.0000 0.9049 2009.02.03 11:18 0.9049 0.00 0.00 0.00 92.16

16720 2009.02.03 12:15 buy 0.50 eurusd 1.2842 0.0000 1.2861 2009.02.03 12:59 1.2861 0.00 0.00 0.00 95.00

16751 2009.02.03 13:01 buy 0.50 eurusd 1.2861 0.0000 1.2881 2009.02.03 13:31 1.2881 0.00 0.00 0.00 100.00

16675 2009.02.03 09:00 buy 0.50 gbpusd 1.4251 0.0000 1.4275 2009.02.03 13:33 1.4275 0.00 0.00 0.00 120.00

0.00 0.00 -6.55 1 544.18

Closed P/L: 1 537.63

Well, after lowering the input settings to a more riskier level, I got more more trades. However, I've yet to put in a S/L and well, as of right now, it looks like (if things don't reverse) I'm going to be getting some margin calls because the EA initiated some trades on some false signals. So, if you use riskier settings, use a S/L. lol. I have tossed some ideas around, and think a S/L using the ATR value (but multiplied by 2 or 1.5) would be a reasonable S/L. Also, been thinking about a S/L based on accounts equity, if the trade is down 3% of the account's equity, it closes out. I think I would like the S/L based on accounts equity, and how much I'm willing to lose per trade. There was an instance, of where the EA placed a position that was opposite of all indicators. That problem has been taken care of I believe in the latest version, the results above are from using version 3.

 

Forward testing Day 3

16417 2009.02.02 16:22 sell 0.50 usdcad 1.2370 0.0000 1.2349 2009.02.03 17:23 1.2349 0.00 0.00 -4.74 85.03

16874 2009.02.03 19:31 buy 0.10 usdcad 1.2394 1.2366 1.2422 2009.02.03 20:10 1.2366 0.00 0.00 0.00 -22.64

16775 2009.02.03 14:04 buy 0.50 usdjpy 89.53 0.00 89.63 2009.02.04 03:59 89.63 0.00 0.00 -2.74 55.78

16677 2009.02.03 09:06 buy 0.50 gbpchf 1.6588 0.0000 1.6616 2009.02.04 10:28 1.6616 0.00 0.00 -6.38 121.33

17394 2009.02.04 12:02 sell 0.40 eurusd 1.2929 1.2953 1.2905 2009.02.04 12:03 1.2905 0.00 0.00 0.00 96.00

17392 2009.02.04 11:53 sell 1.60 usdjpy 88.93 89.08 88.78 2009.02.04 12:17 89.08 0.00 0.00 0.00 -269.42

17399 2009.02.04 12:15 sell 0.50 eurusd 1.2876 1.2902 1.2850 2009.02.04 12:32 1.2850 0.00 0.00 0.00 130.00

17407 2009.02.04 12:34 sell 1.10 eurusd 1.2851 1.2879 1.2823 2009.02.04 13:30 1.2828 0.00 0.00 0.00 253.00

17462 2009.02.04 14:52 sell 0.90 usdcad 1.2333 1.2360 1.2306 2009.02.04 15:11 1.2306 0.00 0.00 0.00 197.46

0.00 0.00 -20.41 2 190.72

Closed P/L: 2 170.31

I am now using a S/L. Version 4 trades a little differently than version 3, but both versions only trade within the set conditions as prescribed by the user. version 3 only makes one trade after per cross, version 4 trades multiple times after a cross as long as the conditions are right. Which is what surprised me, as I was not expecting that or had thought about that when designing this, but it actually worked out quite nicely I think. The only foresee able problem I see with the EA trading multiple times during a trend is that theres a chance a order could be placed as the trend is reversing. Currently steps are being taken to fix this.

 

Update

Well, the trades I mentioned earlier that I was expecting a margin call on, finally came. Lesson #1, have a S/L in place So now I've got a new demo account, and operating with a S/L. Since opening the 5k demo account today, I've made $600. I've also changed some of the settings, primarily the look back bars agreement from a value of 4 to 3. I noticed that the same thing that happened with version 3, was happening with version 6. Even though version 4 had been fixed for the problem in version 3. So I concluded it was my settings. As of right now, the problem has not occurred again with the look back bars setting at 3. I am very happy about this EA! I hope it continues to be successful.

 

Account Statement

I opened this 5k demo account just yesterday, to test version 6 of my

program: In the 24 hr period, it made just a hair under $1k. I do use the MM

feature on the EA, (money management) The lot size is correct, as I

only risk 5% of myaccount equity per trade. So when you do the math, a $271 loss is

about 5% of the account, even though the lot size is really high. I

talked to the coder about it as I was flipping out about the lot size.

lol. He showed me the math, and reassured me that it was only 5% of

the account and that the MM feature was actually working. You can see

where I flipped out about the lot sizes, as I turned MM off and set

the lots at .5, cause I had heard .1 lot for every $1k of deposit.

And when I was seeing 6-8 lots for the 5k account I just was like in

shock. lol. Then I turned MM back on when the coder showed me it as

working fine. I believe the next version will help minimize those

losses even more to make it more profitable. However, I could definitely live

with $1k a day of profit off a $5k deposit

Account: 185832 Name: Alex Brandt Currency: USD 2009 February 6, 23:59

Closed Transactions:

Ticket Open Time Type Size Item Price S / L T / P Close Time

Price Commission Taxes Swap Profit

5207132 2009.02.05 12:37 balance Deposit 5 000.00

5218993 2009.02.05

15:32 sell 0.02 eurchf 1.4890 1.4930 1.4870 2009.02.05

16:30 1.4930 0.00 0.00 0.00 -0.69

5219008 2009.02.05

15:32 buy 7.28 usdchf 1.1648 1.1608 1.1665 2009.02.05

15:49 1.1665 0.00 0.00 0.00 106.10

5220322 2009.02.05

15:45 buy 7.28 usdchf 1.1652 1.1612 1.1665 2009.02.05

17:21 1.1644 0.00 0.00 0.00 -50.02

5221640 2009.02.05

16:00 buy 7.43 usdchf 1.1648 1.1608 1.1665 2009.02.05

17:19 1.1651 0.00 0.00 0.00 19.13

5222782 2009.02.05

16:18 buy 6.38 gbpusd 1.4607 1.4567 1.4653 2009.02.05

17:19 1.4641 0.00 0.00 0.00 216.92

5223600 2009.02.05

16:30 buy 6.38 gbpusd 1.4619 1.4579 1.4665 2009.02.05

17:19 1.4641 0.00 0.00 0.00 140.36

5228566 2009.02.05

17:52 buy 1.00 eurgbp 0.8776 0.0000 0.8795 2009.02.05

20:00 0.8795 0.00 0.00 0.00 27.82

5230195 2009.02.05

18:09 buy 6.79 gbpusd 1.4668 1.4628 1.4706 2009.02.05

18:53 1.4628 0.00 0.00 0.00 -271.60

5230552 2009.02.05

18:15 buy 6.79 gbpusd 1.4650 1.4610 1.4685 2009.02.05

19:09 1.4685 0.00 0.00 0.00 237.65

5231759 2009.02.05

18:30 buy 8.36 usdcad 1.2319 1.2279 1.2354 2009.02.05

19:02 1.2279 0.00 0.00 0.00 -272.33

5233659 2009.02.05

18:53 buy 6.45 gbpusd 1.4632 1.4592 1.4671 2009.02.05

19:08 1.4671 0.00 0.00 0.00 251.55

5244307 2009.02.05

21:55 sell 6.76 eurusd 1.2807 1.2847 1.2784 2009.02.05

22:05 1.2784 0.00 0.00 0.00 155.48

5244635 2009.02.05

22:00 sell 6.76 eurusd 1.2793 1.2833 1.2771 2009.02.06

04:51 1.2771 0.00 0.00 -3.72 148.72

5245504 2009.02.05

22:15 sell 6.95 eurusd 1.2801 1.2841 1.2779 2009.02.06

00:38 1.2779 0.00 0.00 -3.82 152.90

5245600 2009.02.05

22:17 buy 8.14 eurchf 1.4992 1.4952 1.4998 2009.02.06

11:15 1.4998 0.00 0.00 5.95 41.70

5246059 2009.02.05

22:30 sell 8.52 usdcad 1.2262 1.2302 1.2241 2009.02.05

22:41 1.2302 0.00 0.00 0.00 -277.03

5246062 2009.02.05

22:30 buy 8.13 eurchf 1.5001 1.4961 1.5021 2009.02.05

23:16 1.4961 0.00 0.00 0.00 -277.85

5250340 2009.02.06

01:53 sell 6.44 gbpusd 1.4623 1.4663 1.4609 2009.02.06

02:49 1.4609 0.00 0.00 0.00 90.16

5250446 2009.02.06

02:00 sell 6.44 gbpusd 1.4624 1.4664 1.4610 2009.02.06

02:44 1.4610 0.00 0.00 0.00 90.16

5251310 2009.02.06

02:43 buy 7.95 usdcad 1.2336 1.2296 1.2346 2009.02.06

04:33 1.2346 0.00 0.00 0.00 64.39

5251343 2009.02.06

02:45 buy 8.09 usdcad 1.2338 1.2297 1.2346 2009.02.06

04:33 1.2346 0.00 0.00 0.00 52.42

5256856 2009.02.06

06:40 sell 0.50 gbpusd 1.4599 1.4639 1.4587 2009.02.06

07:24 1.4639 0.00 0.00 0.00 -20.00

5256891 2009.02.06

06:40 buy 0.50 eurgbp 0.8758 0.8718 0.8765 2009.02.06

09:06 0.8718 0.00 0.00 0.00 -29.30

5257336 2009.02.06

07:00 buy 0.50 audusd 0.6522 0.6482 0.6535 2009.02.06

07:13 0.6535 0.00 0.00 0.00 6.50

5257990 2009.02.06

07:15 buy 0.50 audusd 0.6543 0.6503 0.6557 2009.02.06

10:03 0.6557 0.00 0.00 0.00 7.00

5258436 2009.02.06

07:30 buy 0.50 audusd 0.6536 0.6495 0.6550 2009.02.06

09:58 0.6550 0.00 0.00 0.00 7.00

5273639 2009.02.06

11:30 sell 0.50 gbpusd 1.4673 1.4713 1.4636 2009.02.06

14:46 1.4653 0.00 0.00 0.00 10.00

5277152 2009.02.06

12:15 sell 0.50 eurusd 1.2800 1.2840 1.2777 2009.02.06

15:31 1.2840 0.00 0.00 0.00 -20.00

5282575 2009.02.06

14:30 sell 4.79 eurgbp 0.8736 0.8776 0.8720 2009.02.06

15:04 0.8720 0.00 0.00 0.00 112.51

5292486 2009.02.06

16:15 sell 8.92 usdcad 1.2470 1.2510 1.2437 2009.02.06

17:11 1.2437 0.00 0.00 0.00 236.68

5296302 2009.02.06

17:10 buy 7.15 gbpusd 1.4726 1.4685 1.4767 2009.02.06

17:13 1.4731 0.00 0.00 0.00 35.75

0.00 0.00 -1.59 992.08

Closed P/L: 990.49

Open Trades:

Ticket Open Time Type Size Item Price S / L T / P

Price Commission Taxes Swap Profit

5320647 2009.02.06 23:49 buy 7.49 audusd 0.6759 0.6719 0.6773

0.6757 0.00 0.00 4.42 -14.98

5316872 2009.02.06 21:53 sell 8.70 eurchf 1.5033 1.5073 1.5014

1.5034 0.00 0.00 -6.43 -7.48

5320722 2009.02.06 23:52 sell 7.49 gbpusd 1.4775 1.4817 1.4754

1.4785 0.00 0.00 -3.07 -74.90

0.00 0.00 -5.08 -97.36

Floating P/L: -102.44

Working Orders:

Ticket Open Time Type Size Item Price S / L T / P Market Price

No transactions

Summary:

Deposit/Withdrawal: 5 000.00 Credit Facility: 0.00

Closed Trade P/L: 990.49 Floating P/L: -102.44 Margin: 2 738.89

Balance: 5 990.49 Equity: 5 888.05 Free Margin: 3 149.16

 

Nice system. When the bugs are worked out, are you going to share or just keep it to yourself.

Just wondering as it does seem like a promising system.

Reason: