My Path to Millions

Entries tagged as ‘Expert Advisor’

What’s happening to WordPress?

September 19, 2008 · Leave a Comment

Wow, what’s the problem with WordPress these 2 days… I’ve been having sooooooooooo much problems logging in…. anyway, another strategy to try…. simple and straight forward…. now that I’m more familiar and comfortable with MQL, this should be relatively easy to program….

1) Previous 30 bars below (200?) MA
2) MA Short Term < MA Long Term
3) Breaks above (200?) MA (on watchlist now)
4) Break back down within 10 bars

Categories: Forex Trading
Tagged: , , , ,

Which EA would you choose?

September 1, 2008 · 2 Comments

I’m currently comparing the following 4 EAs… 3 of them are written by myself… (well, actually the three EAs are very similar to each other in terms of strategy, differing more in terms of their parameters) while the 4th is a commercially available EA….

Here’s the backtest results of the 4 EAs (all based on an initial deposit of $3000), which would you choose?

EA 1
Profit = 65067.85
Absolute Drawdown = 1148.78
Maximum Drawdown = 24261.06 (26.38%)
Relative Drawdown = 3284.37 (63.95%)
% Profit Trades = 64.34%

EA 2
Profit = 66192.86
Absolute Drawdown = 2490.66
Maximum Drawdown = 26020.04 (27.51%)
Relative Drawdown = 7367.36 (93.53%)
% Profit Trades = 66.30%

EA 3
Profit = 616088.27*
Absolute Drawdown = 1863.44
Maximum Drawdown = 428440.76 (48.17%)
Relative Drawdown = 13798.68 (92.39%)
% Profit Trades = 66.21%

EA 4
Profit = 18313.39
Absolute Drawdown = 1853.44
Maximal Drawdown = 5294.85 (21.90%)
Relative Drawdown = 4945.47 (81.18%)
% Profit Trades = 54.10%

*  Note: This is not a typo. EA 3 profit is about 10 times the previous 2.

Categories: Forex Trading
Tagged: ,

Optimisation

September 1, 2008 · Leave a Comment

I don’t know how to optimise my EA… I mean, I know how to use the optimisation feature on MT4, but I don’t know

1) How often should I optimise the EA?
2) How many months of historical data should I use for optimisation….?

I did an analysis of optimization, by using a fixed starting date (June 2004) and a variable ending date that ranges from Apr 2005 to Aug 2008 (I randomly selected a few ‘End Dates’ from that range). To my surprise, I find that more often than not, the parameters that I get from optimization are constant (Stop Loss = 140, Trailing Stop = 110). In cases where I got a different result, I used those parameters for next month’s testing and found that the results were not as good as without optimization.

So, what does this say?

1) SL = 140 and TS = 110 is the best parameter for my EA?
2) I’m doing something wrongly?

I mean, how to go about optimizing the EA to make it more suitable for market conditions. Given that EURUSD was in a downtrend in 2005 but in an uptrend after that, is it normal for my parameters to stay the same? Is this consistency normal?????

Categories: Forex Trading
Tagged: , ,

Tested the 2 Hypothesis

August 25, 2008 · Leave a Comment

Tested the 2 hypothesis mentioned in a previous post….

Among the two, filtering trades based on whether current open trade is profitable is a better option. Have yet to compare that against no filtering…

Tired now…. will resume testing tmr….

Categories: Forex Trading
Tagged: , ,

Improving my Expert Advisor

August 16, 2008 · Leave a Comment

ok, here’s my ‘hypothesis’… gotta program them to check if they help me avoid losses:

1) Skip a BULL trade if the current bull trade is losing money (or if the current bear trade is making money – optional)

2) enter trade mentioned above only if pair closes above high by 5 pips within 4 (or 20) bars

OR

1) Skip a BULL trade if close is below MA(50).

2) enter trade mentioned above only if pair closes above MA(50) within 4 (or 20) bars

Test all EAs without Pyramiding, all ticks, M15, $3000 initial capital

Target:
Consistent Profit from 2004 to 2008.
More than 10k profit in 2008.
More than 3k profit per year from 2004 to 2007.

Categories: Forex Trading
Tagged: , ,

Focusing on my Expert Advisor

August 16, 2008 · 4 Comments

Been focusing on developing my Expert Advisor lately… basically still using the same concept – CANDLESTICKS. But I’m trying to improve the ‘hit rate’ and trying to increase the average winning profit…. When that is done, I’ll try to improve the money management aspect, so that I will have a lower drawdown…. has been pretty enjoying the programming, and learning more and more about MetaQuotes… I’m glad I love programming…. :-D

I realised I’ve been shifting from task to task… At times, I develop my EAs… then I got bored.. and swtich to writing codes for Amibroker… then I change my mind and decide that I should do some fundamental analysis on stocks so that I can do some value investing since we are in a bear market… then, I find a book at Borders on commodities and decide to learn more about it…. then I decide I want to learn more about Economics…. etc etc…. I guess I am trying to do too many things at the same time…. maybe because I’m afraid if I don’t do it now, I’ll miss the party (like maybe the strong trend in Forex is gonna end soon… or the Bear market is gonna end and stocks are going to get expensive…)

Anyway, I know I gotta prioritize.. else I’ll end up achieving nothing…. so for now, I’m gonna be concentrating on developing my EAs…. till I get one satisfactory one out, I’m not going to switch to another money making task…..

Categories: Forex Trading
Tagged: , , ,

Bogie-NN-v8b

August 4, 2008 · 1 Comment

I backtested this EA, and man, it’s good. But I have yet to forward test it, since I have not set up my VPS. Anyway, I’m pretty inspired by the results. I did wonder if I should purchase the EA, but I can’t convince myself that I can make money the lazy way. What if I purchase the EA and it starts performing badly? Do I have the conviction to hang on to it? Or will I abandon it at the exact moment when it is about to turn profitable? How can I trade an EA confidently if I do not understand the logic behind it? Moreover, this EA is charged on a monthly subscription basis of $49.90. A bit steep, and it’s recurring.

But like I said, I’m inspired. So I refused to sleep till now (3.33am), trying to figure out a better way of entering trades. I’ll try this tomorrow:

1) Stock breaks previous high.
2) Previous high is above MA(50).
3) Incorporate a turn-sour limit to help deal with wipsaws.

Ok, gotta go meditate now and zzzzz…..

Believe in myself, the simpler the system, the better. Didn’t Nicholas Darvas make millions with a simple system…..

Categories: Forex Trading
Tagged: , ,

Too good to be True

July 24, 2008 · 1 Comment

Ok, I’ve been programming a few strategies for Metatrader 4. After repeated trials, I find that my original EA which uses the Zig Zag indicator and a bullish engulfing candlestick still gives me the best results. However, I tried to further improve the strategy, and to my surprise, 2 simple lines of codes performed miracles.

if(Bid – OrderOpenPrice() > Point*StopLoss)
OrderModify(OrderTicket(), OrderOpenPrice(), 0, OrderTakeProfit(), 0, Green);
ok, from what I understand, I’m telling the EA that if my profit is greater than my StopLoss amount, I’m no longer willing to take a loss.

This simple amendments caused my profits to skyrocket from 7k to 40k. Ridiculous. Something must be wrong somewhere…

Anyway, I’ve successfully dropped 3 of my tuition classes, which means I’ll have a lot more time now. I’m still hoping that my Fri evening class will be replaced soon. Now that my Saturday classes have ended, I’m looking forward to my weekends, first time in two years… I no longer dread Saturdays…. I’m finally going to have my weekends ‘free’.

Categories: Forex Trading
Tagged: , , , ,

Forex EA Revision

May 8, 2008 · Leave a Comment

I’ve made some revision to my EA for forex.
I’ve decided that I’ll use only 5% of my funds for each trade, instead of the initial extremely aggressive 20%.

  1. For GBP/USD, it effectively reduced my profit from 15k to 5k, but I think this is a risk level that I am more comfortable with. Moreover, the declie from the peak profit to the final profit is not so steep. Initially, the peak profit was 70k, then reduced to 15k. Now, the peak profit is about 9k, then reduced to 5k. So, even if I enter at the wrong time, I won’t suffer a steep loss.
  2. For EUR/USD, the difference in profit was less than 1k, so the lower risk definitely makes more sense. In addition, if I stop trading on 1/1/08, using 20% actually results in a loss vs a profit of $400 with 5%. If I use a fixed lot of 0.3, I’ll end up with a loss of 700.

Anyway, here’s the parameters I’ll be using:

SL 100, TS 100, Percent 5.

Categories: Forex Trading
Tagged: , , , ,