neilrickaby Posted August 30, 2011 Report Share Posted August 30, 2011 any chance of a 'reverse trades' option - e.g. buy instead of sell and vice versa - it would make a killing on m5! tomislav 1 Quote Link to comment Share on other sites More sharing options...
JasonKwok Posted August 31, 2011 Report Share Posted August 31, 2011 Jason : can you explain how the EA can only take a trade on a fresh signal as I can't find those values in the current settings. Thanks Jeff It's not in the settings. We need to modify the codes in CalculateSignal Function. BoxMACD_Main_1 = iMACD(NULL,0,fast_ema,slow_ema,macd_sma,macd_applyto,MODE_MAIN,1); BoxMACD_Signal_1 = iMACD(NULL,0,fast_ema,slow_ema,macd_sma,macd_applyto,MODE_SIGNAL,1); BoxMACD_Main_2 = iMACD(NULL,0,fast_ema,slow_ema,macd_sma,macd_applyto,MODE_MAIN,2); BoxMACD_Signal_2 = iMACD(NULL,0,fast_ema,slow_ema,macd_sma,macd_applyto,MODE_SIGNAL,2); if ( BoxMACD_Main_2 <= BoxMACD_Signal_2 && BoxMACD_Main_1 > BoxMACD_Signal_1 && !BoxBuyFlag) { BoxBuyFlag = true; BoxSellFlag = false; } if ( BoxMACD_Main_2 >= BoxMACD_Signal_2 && BoxMACD_Main_1 < BoxMACD_Signal_1 && !BoxSellFlag) { BoxBuyFlag = false; BoxSellFlag = true; } Quote Link to comment Share on other sites More sharing options...
mograst Posted August 31, 2011 Report Share Posted August 31, 2011 (edited) Hi Soundfx, i like to ask if the indictors (as stochastic) are active by default, as i tried to change parameters but didnt see different entryes. Also about the close logic: what does the 2 option means: CloseDiffFlag CloseProb0 -------------------- There are 2 values for MACD "MACD parameters" AND "Indicators MACD Parameters" How are they used by the EA? --------------- For what and how the Indicators Percentage are used? --------------- Some Infos about The "Indicators MA Parameters" what is the "shif", "methode" and "apply_to" for? Sorry for all this questions, but i think you have done a very good work. I am testing the EA and i has done greate (much better than commercial EA's out there) Maybe it can be fine tuned or optimised. Thanks a lot BTW: not sure but did somone change the code to let the EA work on ECN? Edited August 31, 2011 by mograst Quote Link to comment Share on other sites More sharing options...
⭐ musketeer Posted August 31, 2011 Report Share Posted August 31, 2011 here it is with small changes.... cosmetic only except counting slippage ... 1.Changed magic No., it shows symbol and ending with TF, ex.: 52119405 (5M TF) 2.Changed comment, added the requested price (one may track slippage), ex.: [email protected] 3.The slippage in modifying orders is counted, so the SL and TP must be at exact distance from opened price 4.The name is II_PIPA_EA-1_01.mq4 for easy tracking where I mess the things :) http://www.mirrorcreator.com/files/HO3JRIIE/http://content.screencast.com/users/myonlinecont/folders/Jing/media/c69e0d33-3768-48ed-82ff-66b6005f52cb/2011-08-29_0835.png BTW: not sure but did somone change the code to let the EA work on ECN? here, ecn compatible the magic number thing ... does not work on all pairs and tf's (exceeding the limit for an integer may be), will try to fix it, but for sure you will get an auto magic # on all pairs and tf's... Quote Link to comment Share on other sites More sharing options...
yairushalmi Posted August 31, 2011 Report Share Posted August 31, 2011 I have the EA running since 08/30. lot size 0.16 balance around 1,000 USD. since its been running I had 8 loses trades and 1 winner. its been running 4 trades under London time and still no winners. http://up352.siz.co.il/up3/m1dnzouj34yg.gif Quote Link to comment Share on other sites More sharing options...
scorpion Posted August 31, 2011 Report Share Posted August 31, 2011 I'm testing some changes and I think in the right direction, Although it is too soon. It is vital, the ability to make a backtesting, and to optimize the system, otherwise the tuning can perpetuate. Personally, I think it has good potential. 131117270 2011.08.31 11:46 sell 0.60 usdcad 0.97738 0.97868 0.97608 2011.08.31 12:12 0.97868 0.00 0.00 0.00 -79.70 131117272 2011.08.31 11:46 sell 0.60 usdcad 0.97738 0.97868 0.97608 2011.08.31 12:12 0.97868 0.00 0.00 0.00 -79.70 130818519 2011.08.29 18:40 sell 3.10 eurusd 1.45038 1.45168 1.44908 2011.08.29 18:45 1.45168 0.00 0.00 0.00 -403.00 130825554 2011.08.29 19:29 sell 3.10 eurusd 1.45019 1.45149 1.44889 2011.08.29 19:45 1.45149 0.00 0.00 0.00 -403.00 130834175 2011.08.29 20:30 sell 3.10 eurusd 1.44924 1.45054 1.44794 2011.08.29 21:12 1.45054 0.00 0.00 0.00 -403.00 130995652 2011.08.30 16:45 buy 0.20 eurusd 1.44314 1.44424 1.45414 2011.08.31 12:29 1.44424 0.00 0.00 -0.02 22.00 130815734 2011.08.29 18:29 sell 3.00 eurusd 1.45192 1.45322 1.45062 2011.08.29 18:39 1.45062 0.00 0.00 0.00 390.00 130819829 2011.08.29 18:45 sell 3.00 eurusd 1.45160 1.45290 1.45030 2011.08.29 19:29 1.45030 0.00 0.00 0.00 390.00 130829073 2011.08.29 19:50 sell 2.90 eurusd 1.45067 1.45197 1.44937 2011.08.29 20:30 1.44937 0.00 0.00 0.00 377.00 130838754 2011.08.29 21:12 sell 0.20 eurusd 1.45058 1.44307 1.43958 2011.08.30 13:16 1.43958 0.00 0.00 -0.98 220.00 130701038 2011.08.29 08:22 sell 1.80 eurusd 1.45401 1.45371 1.45309 2011.08.29 08:24 1.45371 0.00 0.00 0.00 54.00 Quote Link to comment Share on other sites More sharing options...
halcyonn Posted August 31, 2011 Report Share Posted August 31, 2011 Visit this profile: http://yoopips.com/index.php/505-skypips/profile A lot of new, never seen Trading Systems, EA's and ebooks Enjoy! ;) smells of spam! Quote Link to comment Share on other sites More sharing options...
psaini1973 Posted August 31, 2011 Report Share Posted August 31, 2011 (edited) I have the EA running since 08/30. lot size 0.16 balance around 1,000 USD. since its been running I had 8 loses trades and 1 winner. its been running 4 trades under London time and still no winners. Hello yairushalmi... my frnd how can you use ur EA or trade during the news? today there were many imp. euro news coming come out right from the the start of European mkt and the next 3 hrs. I have a strict policy of not trading during the news how much tempting it may be... So my advice just shut down ur EA during the news and wait for the things to settle down, u will definately see a major change in results. Trying to share wat ever little knowledge i have about Forex trading. Just my 2 cents... Edited August 31, 2011 by psaini1973 soundfx 1 Quote Link to comment Share on other sites More sharing options...
yairushalmi Posted August 31, 2011 Report Share Posted August 31, 2011 Hello yairushalmi... my frnd how can you use ur EA or trade during the news? today there were many imp. euro news coming come out right from the the start of European mkt and the next 3 hrs. I have a strict policy of not trading during the news how much tempting it may be... So my advice just shut down ur EA during the news and wait for the things to settle down, u will definately see a major change in results. Trying to share wat ever little knowledge i have about Forex trading. Just my 2 cents... thanks, I will monitor my trading hours. whats the best time to trade using this ea? and what hours should i avoid? Quote Link to comment Share on other sites More sharing options...
psaini1973 Posted August 31, 2011 Report Share Posted August 31, 2011 thanks, I will monitor my trading hours. whats the best time to trade using this ea? and what hours should i avoid? See everybody has their own style of trading. i personally dont trade b4 london open, i always check news first then accordingly i trade.. my timings are from london open to london close.. when Usa mkt open then also i check 4 news... so u can follow these simple rules and can make ur own trading style that suits u.. Quote Link to comment Share on other sites More sharing options...
soundfx Posted August 31, 2011 Author Report Share Posted August 31, 2011 (edited) Hi Guys, A disastrous day for the EA with default settings today and the main reason for that was a quite heavily ranging market earlier on where MACD was too slow and arrows appeared at the tops and bottoms of moves. In ranging markets like these, all indicators will be too slow, so considering optimising things with different indicators or different indicator settings is worthless. It's much better for the EA not to trade at all as soon as it recognises these conditions and there is a way to check this which I mentioned earlier. Check two MA's say 9SMA and 18SMA and see how many times they cross within the last 24 candles. If they have crossed more than once - then we're in a ranging market - and should stop entering trades. Mograst - I'll create a document explaining the parameters which should answer all your questions :) Edited August 31, 2011 by soundfx halcyonn, ⭐ musketeer and freddy 3 Quote Link to comment Share on other sites More sharing options...
soundfx Posted August 31, 2011 Author Report Share Posted August 31, 2011 Ok guys, Here's a hastily put together document explaining the EA parameters: http://www.multiupload.com/3FXG9VYB7L CiDER, BobR and ⭐ musketeer 3 Quote Link to comment Share on other sites More sharing options...
freddy Posted August 31, 2011 Report Share Posted August 31, 2011 Hi Guys, A disastrous day for the EA with default settings today and the main reason for that was a quite heavily ranging market earlier on where MACD was too slow and arrows appeared at the tops and bottoms of moves. In ranging markets like these, all indicators will be too slow, so considering optimising things with different indicators or different indicator settings is worthless. It's much better for the EA not to trade at all as soon as it recognises these conditions and there is a way to check this which I mentioned earlier. Check two MA's say 9SMA and 18SMA and see how many times they cross within the last 24 candles. If they have crossed more than once - then we're in a ranging market - and should stop entering trades. Mograst - I'll create a document explaining the parameters which should answer all your questions :) Hi Soundfx, Change of market (trending/ranging) is usually what makes it hard for EAs to adapt. The way you check if we are in ranging markets (#crosses of 9/18SMA) is sound, but might be tricky to code. The other way is what Chandu proposed in the manual thread and seems quite effective. Although I am not a coder, i think it may be easier to implement in your EA. Do you think you could make a version including Chandu's modification for M15 timeframe. Also, after the trigger (arrow drawn when MACD 34,52,18 crosses) you will notice that price tends to retrace a bit before going in the right direction) (someone proposed to wait the retracement to a 21MA. Is it possible to implement that in extern parameter(if we can choose MA # and (simple/exponential...) and/or if possible also, to put an extern parameter for an offset in pips. (After trigger, wait for (+/-) Xpips before Buy/Sell) With all these mods, there would be less triggered entries but less false entries. We could then increase the risk and/or the Target. Hope what I wrote is understandable and that with your talent in coding, it may be possible to implement these ideas. Thanks again for your hard work =D> freddy ⭐ musketeer and soundfx 2 Quote Link to comment Share on other sites More sharing options...
soundfx Posted August 31, 2011 Author Report Share Posted August 31, 2011 Hi freddy, All very wise observations and I'm looking into the possibility of using some or all of these at the moment. Whatever mods. are made should work in all timeframes. The timframe sensitive stuff appears to be basing targets and stops on ATR which I'm thinking of removing anyway. I've actually coded the ranging check using SMA's and it's in initial testing. We definitely need a lot less entries and we need to keep out of choppy markets and also take advantage of bigger runs. I like chandu's method for trading "out of main hours", though it will experience bad periods when price is trending outside of normal hours. I feel that the best way to get the system to trade as an unattended EA is for it to only trade in the main session as there's a high probability of a good move either after UK open or after US open or both. This good move we can possibly take advantage of with scaled out trades: For example, say we trade 1 lot on the first arrow/probability signal. Then when in profit by say 20 pips we close 0.5 lots and move the stop to breakeven on the remaining 0.5 lots, that remaining 0.5 lots can run until we see an arrow in the opposite direction, or we have a faster MACD crossover, or fast MA crossover etc. I too have noticed that everytime the alert bell rings that price is normally moving in the opposite direction to the arrow lol, so the retracement idea could be a good one. The only problem with trading retracements with an automated system is that we're going to miss some of them - which would otherwise be picked up by manual traders. A manual trader can see price bounce off "close" to a 21MA and still take the trade, however "close" is very tricky to define for an automated system. ⭐ musketeer and freddy 2 Quote Link to comment Share on other sites More sharing options...
Ferenc86 Posted August 31, 2011 Report Share Posted August 31, 2011 Hi, I am testing since 2days and bad, not good. I have a lot of stop loss and only few TP. Quote Link to comment Share on other sites More sharing options...
soundfx Posted August 31, 2011 Author Report Share Posted August 31, 2011 Ferenc86, Hi, I am testing since 2days and bad, not good. I have a lot of stop loss and only few TP. This is the sort of statement that I DON'T want to see here as I mentioned earlier lol. What did you expect - for me to just hand you a perfectly working EA on a plate? As I've said before this is not a completed EA - just a starting point for the development of an EA which will be successful with the right input. Hence I'm looking for proper testing with details of parameters, results and suggestions for improvement and ideally for others to make those improvements themselves to the EA - because at the moment it's only musketeer and myself who have done any coding. What form did your testing take? What parameters did you use? Where are your results ? I assume that you're just using default settings which was just an intial test I made so it doesn't surprise me at all that that results are poor. Did you have the II_PipAccumulator and II_Prob_Hist indicators on the chart - have you observed patterns in those indicators which would enable the EA to make better trades? Contributing to this thread isn't like the usual EA threads where you can just load the EA sit back and see if produces good or bad results with standard settings over a couple of days ;) Capella and ⭐ musketeer 2 Quote Link to comment Share on other sites More sharing options...
scorpion Posted August 31, 2011 Report Share Posted August 31, 2011 I'm optimizing with different symbols, only two months in June and July, only the parameters SL and TP to have some reference other parameters do not seem to work properly, (TrailStarPips, TrailPips) when it reaches a number of Pips = x is an active TS manually GBPUSD 1H, USDCAD, 15M, EURUSD, 5M. Ticket Open Time Type Size Item Price S / L T / P Close Time Price Commission Taxes Swap Profit 131032409 2011.08.30 20:15 sell 0.16 gbpusd 1.63097 1.64697 1.62827 2011.08.31 10:30 1.62954 0.00 0.00 -0.54 22.88 131117270 2011.08.31 11:46 sell 0.60 usdcad 0.97738 0.97868 0.97608 2011.08.31 12:12 0.97868 0.00 0.00 0.00 -79.70 131117272 2011.08.31 11:46 sell 0.60 usdcad 0.97738 0.97868 0.97608 2011.08.31 12:12 0.97868 0.00 0.00 0.00 -79.70 131127765 2011.08.31 13:00 buy 0.20 usdcad 0.97871 0.97918 0.98371 2011.08.31 13:47 0.97918 0.00 0.00 0.00 9.60 131127911 2011.08.31 13:00 buy 0.20 usdcad 0.97867 0.97884 0.98367 2011.08.31 14:10 0.97884 0.00 0.00 0.00 3.47 131138302 2011.08.31 14:10 buy 0.20 usdcad 0.97901 0.97551 0.98401 2011.08.31 16:11 0.97551 0.00 0.00 0.00 -71.76 131160247 2011.08.31 16:11 sell 0.20 usdcad 0.97550 0.97900 0.97050 2011.08.31 21:06 0.97900 0.00 0.00 0.00 -71.50 131164386 2011.08.31 16:35 sell 0.20 eurusd 1.44385 1.45285 1.43285 2011.08.31 18:03 1.44132 0.00 0.00 0.00 50.60 131180437 2011.08.31 18:04 sell 0.20 eurusd 1.44114 1.43723 1.43014 2011.08.31 21:50 1.43723 0.00 0.00 0.00 78.20 Open Trades: Ticket Open Time Type Size Item Price S / L T / P Price Commission Taxes Swap Profit 131118765 2011.08.31 12:00 sell 0.10 gbpusd 1.62880 1.63880 1.61680 1.62569 0.00 0.00 -1.11 31.10 131118901 2011.08.31 12:00 sell 0.10 gbpusd 1.62881 1.63881 1.61681 1.62569 0.00 0.00 -1.11 31.20 131217540 2011.08.31 21:06 buy 0.20 usdcad 0.97903 0.97553 0.98403 0.97745 0.00 0.00 -2.20 -32.33 131223419 2011.08.31 21:50 sell 0.20 eurusd 1.43705 1.44605 1.42605 1.43772 0.00 0.00 -3.12 -13.40 0.00 0.00 -7.54 16.57 ⭐ musketeer and soundfx 2 Quote Link to comment Share on other sites More sharing options...
soundfx Posted August 31, 2011 Author Report Share Posted August 31, 2011 scorpion, I'm optimizing with different symbols, only two months in June and July, I assume you're using the MT4 backtester for this. Have you checked to ensure that backtesting accurately reflects live trading? I suspect that there will be discrepancies because of the MTF nature of the probability calculation, so that's the first thing to do. Run the EA in live for 3-5 days and note all the trades. Then run the EA in backtest and compare - that way we can be confident (or not) in backtesting this system in general. other parameters do not seem to work properly, (TrailStarPips, TrailPips) Yes, I suspected that we may need to tweak some of the other options as they were untested when I originally posted the EA. I wanted to include them to provide a framework for anyone who wanted to use them, then all they had to do is fix the bugs rather than code everything from scratch. As for optimisation in general - I don't personally think it's a good thing as it's effectively the worse form of curve-fitting. I've created many EA's in the past and optimised them to give fantastic results on one pair/time period only to find that when I run tests going back into earlier years or use different pairs the EA's collapsed in a spectacular heap blowing accounts. I think that the way forward with this EA is to learn from watching the indicators and create new rules to restrict our trades to high probability ones only. In addition to Chandu's method in the manual thread, German's observations shouldn't go unnoticed either - as these could be all the EA needs. The EA logic would need to be upgraded to include the determination of probabilities in all relevant timeframes which is in the latest II_PipAccumulator. Then we just wait for the MTF probabilities to line up at around 35 or -35 and place trades with stop/target 20 as a first test. 2 high probability trades like this per day at 80% accuracy and 1:1 risk:reward will give on average at least 100 pips per week. scorpion and ⭐ musketeer 2 Quote Link to comment Share on other sites More sharing options...
freddy Posted August 31, 2011 Report Share Posted August 31, 2011 Hi freddy, All very wise observations and I'm looking into the possibility of using some or all of these at the moment. Whatever mods. are made should work in all timeframes. The timframe sensitive stuff appears to be basing targets and stops on ATR which I'm thinking of removing anyway. I've actually coded the ranging check using SMA's and it's in initial testing. We definitely need a lot less entries and we need to keep out of choppy markets and also take advantage of bigger runs. I like chandu's method for trading "out of main hours", though it will experience bad periods when price is trending outside of normal hours. I feel that the best way to get the system to trade as an unattended EA is for it to only trade in the main session as there's a high probability of a good move either after UK open or after US open or both. This good move we can possibly take advantage of with scaled out trades: For example, say we trade 1 lot on the first arrow/probability signal. Then when in profit by say 20 pips we close 0.5 lots and move the stop to breakeven on the remaining 0.5 lots, that remaining 0.5 lots can run until we see an arrow in the opposite direction, or we have a faster MACD crossover, or fast MA crossover etc. I too have noticed that everytime the alert bell rings that price is normally moving in the opposite direction to the arrow lol, so the retracement idea could be a good one. The only problem with trading retracements with an automated system is that we're going to miss some of them - which would otherwise be picked up by manual traders. A manual trader can see price bounce off "close" to a 21MA and still take the trade, however "close" is very tricky to define for an automated system. Hi Soundfx, thank you for taking in consideration my observations. Here is a chart of what could be done if we can implement "Chandu_filter" (I hope Chandu is alright for naming it like that! :) ) Entries can be made from retracement (here it is a 9EMA applied to median price) I understand what you mean by "A manual trader can see price bounce off "close" to a 21MA and still take the trade, however "close" is very tricky to define for an automated system." so maybe put few pips offset from the EMA (1or2pips should be good) We can have 2 or 3 trades opened with target1 a fixed #pips (R/R=1), target2 next support/resistance, (pivots etc.) and target 3 when there is an opposite entry. We can have BE after first target hit... SL would be greater than 13 pips, but targets are greater (we have to experiment!) As you can see, the potential is great. Hope you can make something with this. You will notice in these examples that this is only with arrows from MACD crossing, probabilities (-20/+20) is not enven used, here and it seems to work pretty well! http://img198.imageshack.us/img198/3435/chandufilter.jpg soundfx, CiDER and ⭐ musketeer 3 Quote Link to comment Share on other sites More sharing options...
soundfx Posted August 31, 2011 Author Report Share Posted August 31, 2011 Hi freddy, Thanks for the detailed chart explaining those trades. That's quite interesting that probability isn't being used. If someone was to code up the EA exactly as you've described then it's a perfect candidate for backtesting as there are no MTF concerns. I'm not convinced that it will survive the test of time just using MACD, though I'm happy to be proven wrong ;) It's worth you looking back through a few other charts if you're not using probability then that'll be no problem. See if the system as you described it holds up on days taken at random from each month this year. If the results continue to be promising then that's good justification for us going to the effort of creating an EA with just MACD and chandu's rules and some intelligent trade handling to allow trades to run. In your example I think it was just lucky that the big short trades carried on to earn potentially loads of pips until the next valid long signal. If the short move happened just a bit later then the first two short trades had a good chance of being taken out by a valid long signal going into the UK session. I've always considered probability to be the unique aspect of this system which is what gives it a significant edge over most others, so it will be interesting to see if we can make something just using MACD and some good filtering rules too. freddy and ⭐ musketeer 2 Quote Link to comment Share on other sites More sharing options...
freddy Posted September 1, 2011 Report Share Posted September 1, 2011 You were right Soundfx, these few last days, it was pure luck. I just went back in june (14th/15th) and filter doesn't work at all! (would let you in bad trades and skip the good ones!) Well too bad, going back to the drawing board! Sorry for taking your time. LOL, I must admit that I was too excited about Chandu_filter! soundfx and ⭐ musketeer 2 Quote Link to comment Share on other sites More sharing options...
scorpion Posted September 1, 2011 Report Share Posted September 1, 2011 SondFX: I agree with you, share their views, I just try to keep you informed on the evolution of evidence in terms of optimization, if correct all the tests I'm doing with MT4, I try to get the parameters for an interim period. Then with these test parameters before and after dates, we know that is impossible to predict what will happen in the future but at least we get an approximation on the settings, I hope to have several days of operations to see if it matches the probasket continue to report. soundfx 1 Quote Link to comment Share on other sites More sharing options...
⭐ musketeer Posted September 1, 2011 Report Share Posted September 1, 2011 well... am glad that hit again the "thanks" limits and in same time i need more of it :) Soundfx, can I ask for a favor... it is really hard to track (including myself) the recent indicator(s) and EA, can you please add them here, or in first post. I missed only one day and half and am little lost. Quote Link to comment Share on other sites More sharing options...
JasonKwok Posted September 1, 2011 Report Share Posted September 1, 2011 hi SoundFX, the CloseProb0 is not working. I've set it to true but when the Master Prob turns from > 20 to -15, the long trade still running. My guess the problem lies with the following codes under CloseAtMarket function. OrderClose(ticket,lot,OrderClosePrice(),slippage,White) shouldn't the OrderClosePrice() be either Bid or Ask to close at market? Quote Link to comment Share on other sites More sharing options...
soundfx Posted September 1, 2011 Author Report Share Posted September 1, 2011 Hi Guys, Musketeer - I've changed the link in the first post which now points to the most recent version of the EA and indicators. Here it is too: http://www.multiupload.com/LB8OL0N1DY This is the most recent version of the II_PipAccumulator indicator which includes the parameter TFProbCalc which when set to true will determine probabilities in different timeframes on the chart you're looking at. It's worth looking at these values - or perhaps just the All TF probability value to see if that can be used to get us into consistently better trades than the basic master probability. The EA currently doesn't include this multi-TF option, though we could soon copy the code from the indicator and add it in. I've changed the EA slightly to remove the "two trades" option, I've also restricted trades to one per arrow (we can make this flexible in parameters later if need be). I believe that the trailing stop function is now working and Jason...I've checked the CloseProb0 function which is working for me in this version - to help in debugging this I've added a comment which will be written to the log to indicate when trades have been dynamically closed. scorpion, douggie, halcyonn and 9 others 12 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.