Fellow Traders:
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o></o>
I’m asking for a little help; no, a lot of help really. But first a little background. A couple of years ago I came across one of those FX ‘mentoring’ teaching programs that mainly dealt with trading the EUR/USD (E$) on the opening London session because of the good amount of movement (about 80 pips or so) during that session using pivot-points and our good friend MACD. I went through the ‘class’ and began my adventure. Now, the <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:City><st1lace>London</st1lace></st1:City> open for me is <st1:time Hour="14" Minute="0">2 o’clock</st1:time> in the morning, Central time zone <st1:country-region><st1lace>USA</st1lace></st1:country-region>. My routine would be to get up at about 1:45am, plot my pivots and take a lookee-lookee at the E$ charts and watch for up to an hour, about 3am, for a set-up/entry, take a position and see what happens. I did this for about 2 months. I was able to turn my $1000 account into about $3500 trading 0.5 lots ($5 a pip) with a 20 pip SL and a TP of “when I felt it was time to exit”. “You were risking 10% of your account right from the start!!!” Uh, yeah that is way too high but because the ‘rules’ looked so good on the charts I decided, what the hell. I do have a full time job that does not allow me to trade while at work. I can surf the good ‘ol internet here and there but trading is a no-no so I was out of the market before I left for work. Either way, after a few weeks of this I found myself to be dead tired around <st1:time Hour="12" Minute="0">noon</st1:time> while at work and had to discontinue those early mornings even though trading was going well. “Why didn’t you just start trading full time and leave your job?” Because, my paycheck at work is guaranteed, period.
<o></o>
So, this is what I’m asking for help with:
<o></o>
Have an EA that is based on trading a breakout of a previous hi-lo range session on a 15 min chart. There are few different versions (different EA’s) that would be needed.
<o></o>
EA1: User inputs:
<o></o>
BeginTime: Start of range
EndTime: End of range
<o></o>
These times should be taken from the current chart time (not computer time) to avoid any (more) confusion concerning MT4 and server times, GMT +/-, DST, etc.
<o></o>
PipsAbove: The number of pips above the high of the range to go long
PipsBelow: The number of pips below the low of the range to go short
<o></o>
A little logic here, the Vulcans would be proud, maybe not. Anyway, Let’s say the high on the E$ for the previous range is 1.2890. You have your PipsAbove input as 10 so you will be entering the market on the long side at 1.2900. But, you look back at a higher time-frame chart, like the 1 hour or 4 hour and notice that the 1.2900 ‘area’ is a major resistance point. So, instead of your PipsAbove at 10, you could set that to say, 25 to give price action a little more room to ‘try’ and break through that resistance area. Wha’dya say there Spock?
<o></o>
TakeProfit: Your set limit order to exit
StopLoss: How much to risk per trade in pips
LotSize: 0.1, 0.2,…1.0, etc.
TrailingStop: Trailing stop
BreakEven: Amount of pips to move StopLoss to break even after entry
<o></o>
Some things to consider. If the previous range is very large, say 150 pips there may not be a whole lot of room on either side of the high or low for the market to move. So, let’s consider a MaxRange that the previous range has to be less than for entry.
<o></o>
So:
<o></o>
MaxRange: The number of pips the previous high – low range has to be less than to ‘allow’ for an entry.
<o></o>
StopTime: This is the time (chart time again) when the EA would stop running. About an hour or so before the NY session opens the <st1:City><st1lace>London</st1lace></st1:City> session seems to go into a lull and flattens out a little. If the range is breached during this time the EA may not perform well so it would be best, please correct me if I’m wrong, if the EA only took trades during the ‘meat’ of the NY session. But, any open positions would be kept open per the user input rules.
<o></o>
<o></o>
OK, that’s the ‘easy’ version. Now for a few variables…I, like most of us do, like to look for strength in the market for an entry. So, now for EA2 for a range breakout with strength:
<o></o>
EA2: Has the same variable inputs as EA1 with the following condition(s) added:
<o></o>
If the price is at the PipsAbove price AND the PipsAbove price (current price, not close) is greater than a 20EMA then go long. We could consider the following as a user input variable:
<o></o>
AboveEMA: The period of the EMA we want to use if the PipsAbove current price to be greater than for a long entry.
<o></o>
And to check for additional strength at the PipsAbove price we could check for the numbers of bars back where the close was greater than that EMA:
<o></o>
BarsBack: The number of bars back to check if the close of those bars was greater than the EMA.
<o></o>
The BarsBack closes must be greater than the EMA and the PipsAbove current price must be greater than the EMA for a long entry.
<o></o>
For shorts, the opposites of the above.
<o></o>
Now, we could really get carried away with this and add other conditions such as with EA2 and if the current RSI > 40 to go long or if DMI+ > DMI-…but I think the server space is limited here . At some point I would like to throw in pivots or the MACD in some way but I’ll try and figure that one out later.
<o></o>
OK, why range breakout? I’d like to see a one a day trade (or two a day trade if you want to do this with the NY session also) to be in and out and that’s it. You have the ability to look at higher timeframe charts and spot support or resistance levels and Fibo numbers so you can ‘work’ the PipsAbove or PipsBelow numbers a little. When markets are flat, such as before a news release, some EA’s can get hurt pretty bad. If you have a few positions open on an always in the market EA and the news comes out, those open positions could get hammered and put a pretty good dent in your equity. To avoid this in a range breakout EA, just don’t trade those days.
<o></o>
Why two different versions, EA1 and EA2? Because I want to see the code and learn how it is done. EA1 would be the ‘basic’ system. EA2 would show me how to change a few things or add different elements (conditions) to the system. I’ve been going through the tutorials as time permits to post as few questions as possible about how to do this or do that and in all honesty, I think it would take me a good six months to learn what I need to learn to put something like this together on my own. I took my first trade in corn futures about 10 years ago, green as hell. I've learned a great deal since then but MQL is a different beast. If someone would like to take this project on, I and many others would be most grateful. I wrote systems on my own for TradeStation several years ago and MQL to me is a lot different. I have less ‘free time’ on my hands these days, as I think we all do, but if there’s an MQL guru here that’s looking for something to do, by all means..here ya go! I know that range breakout systems have been done to death but I really want to see the code and try to fine tune something.
yo
<o></o>
Good Trading To All
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o></o>
I’m asking for a little help; no, a lot of help really. But first a little background. A couple of years ago I came across one of those FX ‘mentoring’ teaching programs that mainly dealt with trading the EUR/USD (E$) on the opening London session because of the good amount of movement (about 80 pips or so) during that session using pivot-points and our good friend MACD. I went through the ‘class’ and began my adventure. Now, the <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:City><st1lace>London</st1lace></st1:City> open for me is <st1:time Hour="14" Minute="0">2 o’clock</st1:time> in the morning, Central time zone <st1:country-region><st1lace>USA</st1lace></st1:country-region>. My routine would be to get up at about 1:45am, plot my pivots and take a lookee-lookee at the E$ charts and watch for up to an hour, about 3am, for a set-up/entry, take a position and see what happens. I did this for about 2 months. I was able to turn my $1000 account into about $3500 trading 0.5 lots ($5 a pip) with a 20 pip SL and a TP of “when I felt it was time to exit”. “You were risking 10% of your account right from the start!!!” Uh, yeah that is way too high but because the ‘rules’ looked so good on the charts I decided, what the hell. I do have a full time job that does not allow me to trade while at work. I can surf the good ‘ol internet here and there but trading is a no-no so I was out of the market before I left for work. Either way, after a few weeks of this I found myself to be dead tired around <st1:time Hour="12" Minute="0">noon</st1:time> while at work and had to discontinue those early mornings even though trading was going well. “Why didn’t you just start trading full time and leave your job?” Because, my paycheck at work is guaranteed, period.
<o></o>
So, this is what I’m asking for help with:
<o></o>
Have an EA that is based on trading a breakout of a previous hi-lo range session on a 15 min chart. There are few different versions (different EA’s) that would be needed.
<o></o>
EA1: User inputs:
<o></o>
BeginTime: Start of range
EndTime: End of range
<o></o>
These times should be taken from the current chart time (not computer time) to avoid any (more) confusion concerning MT4 and server times, GMT +/-, DST, etc.
<o></o>
PipsAbove: The number of pips above the high of the range to go long
PipsBelow: The number of pips below the low of the range to go short
<o></o>
A little logic here, the Vulcans would be proud, maybe not. Anyway, Let’s say the high on the E$ for the previous range is 1.2890. You have your PipsAbove input as 10 so you will be entering the market on the long side at 1.2900. But, you look back at a higher time-frame chart, like the 1 hour or 4 hour and notice that the 1.2900 ‘area’ is a major resistance point. So, instead of your PipsAbove at 10, you could set that to say, 25 to give price action a little more room to ‘try’ and break through that resistance area. Wha’dya say there Spock?
<o></o>
TakeProfit: Your set limit order to exit
StopLoss: How much to risk per trade in pips
LotSize: 0.1, 0.2,…1.0, etc.
TrailingStop: Trailing stop
BreakEven: Amount of pips to move StopLoss to break even after entry
<o></o>
Some things to consider. If the previous range is very large, say 150 pips there may not be a whole lot of room on either side of the high or low for the market to move. So, let’s consider a MaxRange that the previous range has to be less than for entry.
<o></o>
So:
<o></o>
MaxRange: The number of pips the previous high – low range has to be less than to ‘allow’ for an entry.
<o></o>
StopTime: This is the time (chart time again) when the EA would stop running. About an hour or so before the NY session opens the <st1:City><st1lace>London</st1lace></st1:City> session seems to go into a lull and flattens out a little. If the range is breached during this time the EA may not perform well so it would be best, please correct me if I’m wrong, if the EA only took trades during the ‘meat’ of the NY session. But, any open positions would be kept open per the user input rules.
<o></o>
<o></o>
OK, that’s the ‘easy’ version. Now for a few variables…I, like most of us do, like to look for strength in the market for an entry. So, now for EA2 for a range breakout with strength:
<o></o>
EA2: Has the same variable inputs as EA1 with the following condition(s) added:
<o></o>
If the price is at the PipsAbove price AND the PipsAbove price (current price, not close) is greater than a 20EMA then go long. We could consider the following as a user input variable:
<o></o>
AboveEMA: The period of the EMA we want to use if the PipsAbove current price to be greater than for a long entry.
<o></o>
And to check for additional strength at the PipsAbove price we could check for the numbers of bars back where the close was greater than that EMA:
<o></o>
BarsBack: The number of bars back to check if the close of those bars was greater than the EMA.
<o></o>
The BarsBack closes must be greater than the EMA and the PipsAbove current price must be greater than the EMA for a long entry.
<o></o>
For shorts, the opposites of the above.
<o></o>
Now, we could really get carried away with this and add other conditions such as with EA2 and if the current RSI > 40 to go long or if DMI+ > DMI-…but I think the server space is limited here . At some point I would like to throw in pivots or the MACD in some way but I’ll try and figure that one out later.
<o></o>
OK, why range breakout? I’d like to see a one a day trade (or two a day trade if you want to do this with the NY session also) to be in and out and that’s it. You have the ability to look at higher timeframe charts and spot support or resistance levels and Fibo numbers so you can ‘work’ the PipsAbove or PipsBelow numbers a little. When markets are flat, such as before a news release, some EA’s can get hurt pretty bad. If you have a few positions open on an always in the market EA and the news comes out, those open positions could get hammered and put a pretty good dent in your equity. To avoid this in a range breakout EA, just don’t trade those days.
<o></o>
Why two different versions, EA1 and EA2? Because I want to see the code and learn how it is done. EA1 would be the ‘basic’ system. EA2 would show me how to change a few things or add different elements (conditions) to the system. I’ve been going through the tutorials as time permits to post as few questions as possible about how to do this or do that and in all honesty, I think it would take me a good six months to learn what I need to learn to put something like this together on my own. I took my first trade in corn futures about 10 years ago, green as hell. I've learned a great deal since then but MQL is a different beast. If someone would like to take this project on, I and many others would be most grateful. I wrote systems on my own for TradeStation several years ago and MQL to me is a lot different. I have less ‘free time’ on my hands these days, as I think we all do, but if there’s an MQL guru here that’s looking for something to do, by all means..here ya go! I know that range breakout systems have been done to death but I really want to see the code and try to fine tune something.
yo
<o></o>
Good Trading To All