Hi everyone - I'm the new guy
I've been a programmer since high school and this weekend decided to teach myself MQL4. The Cornflower system seemed like a good project to learn with due to its simplicity. I didn't see that anyone had posted an EA for it - if I've missed it, my apologies. Hopefully I'm not stepping on anyone's toes here.
I hesitate to post the EA itself as it is still in its development stages. If anyone that has experience with MQL4 wants to see it, they're welcome to PM me for it. Backtesting shows some modestly successful gains over the past three months. These gains are all based on trades of one lot at a time.
EURUSD - 753 pips
AUDUSD - 721 pips
USDCAD - 669 pips
USDCHF - 254 pips
These figures initially excited me, very much!! But further examination tells me it can be better Some notes:
1) While the EA is profitable, profitable trades occur only about 50-60% of the time. Higher gains than losses compensate for this, however, I would like to refine the entry criteria. More to follow.
2) I find that this EA works best with a currency that is strongly trending. Even moderate choppiness (is that a word?) shows more losing than winning trades. I added to the D1 chart EMA62, EMA200, and SMA800 (thanks Tiki) which improved this greatly. I hope that fixing the point above will also help this.
Here's the entry strategy. First, find the general trend direction.
if (EMA62 > EMA200 && EMA200 > SMA800) Direction = 1; // Uptrend
else if (EMA62 < EMA200 && EMA200 < SMA800) Direction = 2; // Downtrend
else return(0); // Choppy trend
Next, make sure the 72, 24, 12, and 8 EMAs are stacked properly. (Reverse of this for a short of course.)
if (EMA72 < EMA24 && EMA24 < EMA12 && EMA12 < EMA8)
I have good luck with timing the entry using EMA24 and EMA8 on the M15 chart. (Reverse for a short.)
if (EMA24_M15 < EMA8_M15)
Finally, I look to see if the bid has pulled back to the EMA12.
if (Bid < EMA12)
I've been experimenting with the angles of EMAs 8 and 24 on the M30 chart. This seems to improve entries with some currencies, but not others. Still debating whether to include this in the finished product. (S1 and S15 refer to the parameter "Shift".)
if (EMA8_M30_S1/EMA8_M30_S15 > 1.0001 && EMA24_M30_S1/EMA24_M30_S15 > 1.0001 )
I exit when the EMA24 crosses the EMA12.
Well, there you have it. I would MORE than welcome any and all comments that I could use to refine my criteria. I'm mainly concerned with making the EA work in a choppy market...or at least recognize this fact and not trade. Once it's done, I'm happy to post it...hopefully others can at least learn something from it.
Kindest regards,
Mango from British Columbia, Canada
I've been a programmer since high school and this weekend decided to teach myself MQL4. The Cornflower system seemed like a good project to learn with due to its simplicity. I didn't see that anyone had posted an EA for it - if I've missed it, my apologies. Hopefully I'm not stepping on anyone's toes here.
I hesitate to post the EA itself as it is still in its development stages. If anyone that has experience with MQL4 wants to see it, they're welcome to PM me for it. Backtesting shows some modestly successful gains over the past three months. These gains are all based on trades of one lot at a time.
EURUSD - 753 pips
AUDUSD - 721 pips
USDCAD - 669 pips
USDCHF - 254 pips
These figures initially excited me, very much!! But further examination tells me it can be better Some notes:
1) While the EA is profitable, profitable trades occur only about 50-60% of the time. Higher gains than losses compensate for this, however, I would like to refine the entry criteria. More to follow.
2) I find that this EA works best with a currency that is strongly trending. Even moderate choppiness (is that a word?) shows more losing than winning trades. I added to the D1 chart EMA62, EMA200, and SMA800 (thanks Tiki) which improved this greatly. I hope that fixing the point above will also help this.
Here's the entry strategy. First, find the general trend direction.
if (EMA62 > EMA200 && EMA200 > SMA800) Direction = 1; // Uptrend
else if (EMA62 < EMA200 && EMA200 < SMA800) Direction = 2; // Downtrend
else return(0); // Choppy trend
Next, make sure the 72, 24, 12, and 8 EMAs are stacked properly. (Reverse of this for a short of course.)
if (EMA72 < EMA24 && EMA24 < EMA12 && EMA12 < EMA8)
I have good luck with timing the entry using EMA24 and EMA8 on the M15 chart. (Reverse for a short.)
if (EMA24_M15 < EMA8_M15)
Finally, I look to see if the bid has pulled back to the EMA12.
if (Bid < EMA12)
I've been experimenting with the angles of EMAs 8 and 24 on the M30 chart. This seems to improve entries with some currencies, but not others. Still debating whether to include this in the finished product. (S1 and S15 refer to the parameter "Shift".)
if (EMA8_M30_S1/EMA8_M30_S15 > 1.0001 && EMA24_M30_S1/EMA24_M30_S15 > 1.0001 )
I exit when the EMA24 crosses the EMA12.
Well, there you have it. I would MORE than welcome any and all comments that I could use to refine my criteria. I'm mainly concerned with making the EA work in a choppy market...or at least recognize this fact and not trade. Once it's done, I'm happy to post it...hopefully others can at least learn something from it.
Kindest regards,
Mango from British Columbia, Canada