True the w/l ratio is about 1:1 but the wins are all bigger than the losses because the EA TP/SL was programmed to neutralize the spread, TP=TP+spread and SL=SL-spread.
Nice work guys what about a risk system for.money management so when you have more trades open the lot size is reduced so you dont have too many open trades.
PS i cant take credit for this idea its basically wjat jbentz has used succesfully.
Ah ok… Anyway is a good system, but I think we need to improve the w/l ratio a little bit to make it great…
Don’t you think?
My latest idea for MM is: a simple money management strategy based on the highest number of lots down to .01 you could open with whatever % of the current account balance you are willing to risk divided by how many pairs you are running on that account.
With this system you only get one trade per pair, so if you wanted to reduce the number of lots it could be done by using the same formula above except instead of using the current account balance you could use current available margin so the margin used by the first trade will automatically lower the lot size of the second trade. I prefer using the same number of lots on multiple trades so if the first trade isn’t a winner and the second trade is the loss would be covered by the second trade depending on the pairs.
My computer is too slow or I am to impatient for the EA to run much of a back test - so instead I have been experimenting with trade set ups to try and get a higher win percentage (note I am looking for total pip wins not necessarily higher trade win/loss ratio). So far I have been applying another ICT approach of trading only in the direction of the higher time frame. It appears when I look back in time that the largest swings in price tend to follow the higher time frame trend - not always but more often. To do this I have been running the swing zz indicator on the 4 hour time frame to get a market direction - if the last dot is red then I only take sell trades or the other way around for buy trades. Then I go to the 1 hour chart and place trades based only on the direction of the 4 hour chart.
I am watching 5 pairs, all dollar based pairs. So far it looks like this method gives about 1 trade per pair every week or two. I can’t be at the computer all the time so this works well for my schedule. Unfortunately it will take quite a while to determine if this is really more profitable or not. So far this week I had one winner on GBP/USD and one loser on NZD/USD. The win was 3 simultaneous trades good for 20, 40 and 68 pips - moving the TP 40 and TP 68 trades to BE after hitting the TP 20. The loss was 3 trades at 20 pips each. Using 3% risk per setup, split into 1% per trade on SL of 20 pips each. It just makes the math simple.
Guys,
I’ve been experimenting with different timeframes, am more of a long-term trader. I’m looking at hourly, 4-Hourly, and daily charts. The same principle applies given the fractal nature of the markets so it’s worth looking into.
Also, jaws810, what does the minbars parameterr actually signify, and does the email alert actually work?
Thanks a bunch
I’m new to programming EA’s, but when i tried to apply a simple MM strategy the results were not as good, i’m assuming its battling back from draw down, or I have my code screwed up somewhere.
I’d be interested in what you guys come up with in the EA. I do like Steve4k3’s idea as I was thinking the same thing, but more similar to the cowabunga system, using stoc and rsi, so your not catching the tail end of the average for the 4 hour trend.
I also think applying a trailing pips function will make it more profitable, especially with the tight orders. Might be able to average another pip or two per trade and mitigate the stop loss since its based on short term swings. hard to say without full backtesting.
Last I would be interested if some of the losses were on news candles/holidays/events, and could be mitigated progmatically by closing/avoiding trades from these candles.
I am hoping to find some time in my schedule this weekend to use the “visual mode” to check patterns in losses with these above ideas.
I really think this system could have potential, and would fit my trading schedule/strategy nicely.
Thanks for the work so far.
The minbars is sensitivity the lower the minbars is set the more dots you get, I haven’t tried changing it to see if results would improve with this system. I’d think that if you increase it it might filter out some smaller swings but above 5 I didn’t see much difference. Actually on a 4hr TF minbars set at 2 would probably work fine because the space between the dots would be sufficient to place a trade.
The e-mail alert does work but it sends alerts every time the dot moves, not just one alert per dot.
Ok then. Here is version 1.2 of the EA.
It has taken into account some, but not all of the suggestions mentioned before. If there is a feature that someone really wants, or there are any bugs, just post a message and we’ll see what can be done.
Summary of settable Parameters:
TimeFrame - Fairly self explanatory. Some people mentioned trying this on larger time frames. Here you can set which TF you want. Values in MINUTES. so 4H = 240, Daily = 1440 and so on…
OrderOneTakeProfit - The TP (in points) of the first order to be placed.
TakeProfitInterval - If you decide to have more than one order, this is the increase of the TP (in points) that each order will have.
NumberOrders - This is the number of orders that will be placed at each entry. (max 10)
TrailingOrder - True/False. This decides if you will use a order that has a trailing stop, and no take profit.
TrailingStop - The value of the trailing stop (in points) for the above order, if selected.
StopLoss - The value of the stop loss for all orders when first opened. All SLs are moved to BE if order 1 reaches TP.
RiskPercent - This adjusts the lot size for each order, depending on current account balance. Value is in percent. It automatically divides the risk between all the orders. So if you set it to 2, and have 3 normal orders plus 1 trailing order, each order will carry 0.25% risk, based on the value set in StopLoss.
UseMM - True/False - This decides if the EA will use the MM strategy. The MM strategy will half risk after each loss, down to a level of risk/4. The previous level of higher risk will not be returned to until account balance has reached the level that it was when the risk was reduced.
Defaults:
TimeFrame = 15
OrderOneTakeProfit = 100
TakeProfitInterval = 50
NumberOrders = 3
TrailingOrder = true
TrailingStop = 200
StopLoss = 200
RiskPercent = 2
UseMM = false
So in the default example, at an entry signal 4 orders will be placed, all with a SL of 20 pips, with a risk of 0.25% each (total 2%). Order one will have a TP of 10, order 2 15, and order 3 20. Order 4 (trailing order) will have no TP set.
If order 1 hits TP, all SLs will be moved to BE, after that, the trailing order will have a trailing stop at 20 pips. By default the MM strategy is not used.
If it is desired to run the system in a basic, 1 order only mode, this is possible by setting NumberOrders to 1 and TrailingOrder to false. OrderOneTakeProfit and StopLoss will be used to set the TP and SL of that order.
Hope the above makes sense.
Swing 1_2.zip (4.35 KB)
One more thing I forgot to mention. The EA will produce two CSV files that record the day and time of each win or loss. This data can be imported into excel and used to decide if there are days or times that are better or worse for the EA. The files will appear in tester/files when back testing or experts/files if forward testing.
My initial findings suggested there was little difference in performance on certain days or times. I seem to remember someone suggesting not running the system on mondays or fridays. I dont think it’ll make much difference. In fact, I seem to remember from my analysis that friday was maginally better than some other days.
Tell me please what is the indicator i have to use with this EA?
kinkevbo,
thanks for the fantastic work, I look forward to back testing it this weekend.
It’s Swing_ZZ I posted it in my first post when I started the thread.
Does anyone limit their trading hours with the strategy?
I know it has been brought up just wondered if anyone does that? Im going to start trying out this strategy on monday.
Thanks for sharing this strategy jaws810 and thanks for building the EA kingkevbo
I’m only in the testing phase but from my results, outputted in the CSV files, I found no benefit from limiting the trading hours, so it’s not a line of improvement that I am going to pursue.
Hey kingkevbo, thanks for the udated EA. I am going to load MT4 on my wife’s new computer that is faster and try this out this weekend. I think this takes into account almost every suggestion, with the exception of the ability to look at the higher time frame. I have also been trying to learn programming EAs the past few days, but it is not easy to jump right into.
Anyway - thanks for sharing this.
Just downloaded the latest EA. Will run test on demo next week. Do I just run it on the default settings or do you have some other settings you want to run for testing?
Thanks kingkevbo…
The EA does have the ability to run on higher time frames. Check the TimeFrame setting. Values are in MINUTES. So if you wanted to run the EA on the 4H chart, set TimeFrame to 240.
Set the settings to whatever you want. Try to find a set that will give good results in 2011 on EURUSD
Kingkevbo, I understand that you can set the time frame for the analysis to whatever you like. What I meant was that there is no way to set it to only trade in the direction of the higher time frame. This can be done by running it for shorter periods after manually checking the higher time frame to get market direction and then setting it for buy only or sell only.
But I have a problem - I keep getting an order send 131 error. It will execute the first trades but as soon as there is a change in the account balance then all other orders entered get the 131 error. After much research I found that this is caused by my platform not accepting the lot size that you coded in. Mine will only accept lots in increments of 0.1 and it looks like you have it coded for lots as small as 0.01 I tried to edit your EA to resolve this issue. First I changed the line lots = NormalizeDouble(lots,2) to a lots = NormalizeDouble (lots,1). This didn’t solve it. So then I hard coded “lots = 4.0” but still in the log every beginning trade is opened at 2.50 lots (using the defualt settings of $10,000 account balance and 2% risk). If I understand correctly “OrderSend” is the only function that will open a trade - so I even tried removing the variable “lots” and putting in the number “4.0” in the OrderSend functions, but still it opens the first orders at 2.50 lots. Is there another function that is opening the trades. I have some programming experience and like a challenge, but this is my first experience with MQL and it has me stumped.
Thanks, Steve