muruku Posted September 29, 2010 Report Share Posted September 29, 2010 This is killer code to nasty brokers that I invented this morning !!!!! YOur broker will hate you the most ! =============================================================================== //This is your External variable int Magic =187939 ; // any of arbitrary # range from 100000 <= Magic Range <= 400000 int MagicRangeLow =100000; int MagicRangeHigh =400000; bool MagicRandom = TRUE; int start() { if (MagicRandom) { MathSrand(TimeLocal()); int a=0, myrandom; while(a<10000) { myrandom = MathRand()%976398; a++; } if (DayOfWeek() == 1) Magic = 247872-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000 if (DayOfWeek() == 2) Magic = 186780-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000 if (DayOfWeek() == 3) Magic = 369878-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000 if (DayOfWeek() == 4) Magic = 165034-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000 if (DayOfWeek() == 5) Magic = 225563-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000 } if (!MagicRandom) Magic = 867739; // if dun want random magic#, then this will be this EA instance fix magic# ... .. .... ** you have to change ALL subroutines that have the statement OrderMagicNumber() = XXX to as below... OrderMagicNumber()>= MagicRangeLow && OrderMagicNumber()<= MagicRangeHigh Should be 10 minutes coding job... If you want to create 2 or 3 more instance EA running together, make sure every EAs have no MagicRangeLow/High overlap. Hi muruku, Could it be possible to create a routine to change the magic# automatically (randomly or not), from time to time? Thanks. domonkos, mrbizu and Tick4x 3 Quote Link to comment Share on other sites More sharing options...
Tick4x Posted September 29, 2010 Report Share Posted September 29, 2010 Good job, Muruku :) I like this random magic number routine Quote Link to comment Share on other sites More sharing options...
muruku Posted September 29, 2010 Report Share Posted September 29, 2010 your broker will kill you... Good job, Muruku :) I like this random magic number routine Quote Link to comment Share on other sites More sharing options...
blueocean1713006073 Posted September 29, 2010 Report Share Posted September 29, 2010 This is killer code to nasty brokers that I invented this morning !!!!! YOur broker will hate you the most ! =============================================================================== //This is your External variable int Magic =187939 ; // any of arbitrary # range from 100000 <= Magic Range <= 400000 int MagicRangeLow =100000; int MagicRangeHigh =400000; bool MagicRandom = TRUE; int start() { if (MagicRandom) { MathSrand(TimeLocal()); int a=0, myrandom; while(a<10000) { myrandom = MathRand()%976398; a++; } if (DayOfWeek() == 1) Magic = 247872-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000 if (DayOfWeek() == 2) Magic = 186780-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000 if (DayOfWeek() == 3) Magic = 369878-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000 if (DayOfWeek() == 4) Magic = 165034-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000 if (DayOfWeek() == 5) Magic = 225563-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000 } if (!MagicRandom) Magic = 867739; // if dun want random magic#, then this will be this EA instance fix magic# ... .. .... ** you have to change ALL subroutines that have the statement OrderMagicNumber() = XXX to as below... OrderMagicNumber()>= MagicRangeLow && OrderMagicNumber()<= MagicRangeHigh Should be 10 minutes coding job... If you want to create 2 or 3 more instance EA running together, make sure every EAs have no MagicRangeLow/High overlap. Hi there friend, excellent work, since people like me are not programmers and depend very much on the professionals like yourself and many in the forum, may I ask you to include the code into the EA and psot the EA as a whole, I am sure many would appreciate that gesture dearly. thank you so mcuh blueocean mutekki 1 Quote Link to comment Share on other sites More sharing options...
tomislav Posted September 29, 2010 Report Share Posted September 29, 2010 (edited) The fact that we have this EA from this forum is awesome. We are not getting ripped off with a $157 (or whatever price) hunk of rubbish. I've tried countless EA's and have kept only a few for use. This EA is awesome. $3000 demo account started on Monday is now $5718 equity $6037 ATR 5. (It's Thursday now) Using Cable Larikan ok 24hr that you can download from this thread at post #322 by leonytham. Cable Larikan Ok 24 hr Muruku internal ATR mod on ATR 7 has made $2985 to $3813 (less than 2 days) equity $2887 (worse than beginning) because GBPUSD is flying up as I write this and it has many sell trades open. Maybe the ATR setting should be tried on 7. Posted Cable Larikan ok 24 hr ATR 7 is in huge profit right now but suffers much more scary DD than ATR 5 during other times. This is what I have seen so far... All demos running straight 0.1 lots no increasing lots like Martingales and the such. That's why it's impressive. Search the forum and you'll find the EA downloads. Edited October 3, 2010 by tomislav Quote Link to comment Share on other sites More sharing options...
msnfx Posted September 29, 2010 Report Share Posted September 29, 2010 hi guys can you share the mq4 file and set file hear beacuse i dont know mql program. best wishes, Quote Link to comment Share on other sites More sharing options...
mrbizu Posted September 30, 2010 Report Share Posted September 30, 2010 (edited) hi azam575 I find variable "ThePass" in function CloseAllTrades in your code, and I do not know what it use for. Can you help me explain what it means and what it use for? In some code of Muruku, I cannot find this variable. Did Muruku recommend it ? Thanks a lot. Edited September 30, 2010 by mrbizu Quote Link to comment Share on other sites More sharing options...
mrbizu Posted September 30, 2010 Report Share Posted September 30, 2010 (edited) Last weekend, as i mentioned in previous thread, i was fool :P, turned on the EA & came cross eco news :- USD New Home Sales , was stucked with -200 pips (so as Ca*** in FPA until today too, not progressing... you can refer to it) .. so I forced to slam down these -ve pips & restart the $$ rolling game this week. I would say, if you stuck with that situation, why not just slam them & restart the new day ? Hi muruku, the first position of that stucked positions was open before the news time ? or it was open in the news ? Were you using ATP_Pips at that time ? Thanks and regards, Bizu Edited September 30, 2010 by mrbizu Quote Link to comment Share on other sites More sharing options...
Tick4x Posted September 30, 2010 Report Share Posted September 30, 2010 your broker will kill you... LOL, I will resist :D Quote Link to comment Share on other sites More sharing options...
berusnet Posted September 30, 2010 Report Share Posted September 30, 2010 I'm running from monday 2 version of this Ea ( muruku azam ) 24h on demo account. This the result. We can see 2 stop. they are 2 manual stop. The first is a my error ..emotional stop ..the second today ..30min ago. I want speak about the second stop: Normally muruku and azam version make the same trades. But this morning I found only azam EA with open trades (sell), this was strange, and after some times, muruku version start operating and go long. for this I decided to close all and give them 30 min of sleeping. Another strange thing is that sometimes after they close all open trades ..they don't delete the pending order ..sometimes yes .. I don't know why. http://screendash.com/upload/10001-15000/13738.png Quote Link to comment Share on other sites More sharing options...
salman Posted September 30, 2010 Report Share Posted September 30, 2010 can you share the mq4 file and set file hear beacuse i dont know mql program Quote Link to comment Share on other sites More sharing options...
gigamax Posted September 30, 2010 Report Share Posted September 30, 2010 Hi, I didn't have your SL , which is your broker and GMT offset ? Quote Link to comment Share on other sites More sharing options...
berusnet Posted September 30, 2010 Report Share Posted September 30, 2010 Hi, I didn't have your SL , which is your broker and GMT offset ? Hi, did you ask to me ? I have explain that they are 2 "manual" stops Demo broker exness that don't have limit of price distance for positioning pending order. Quote Link to comment Share on other sites More sharing options...
gigamax Posted September 30, 2010 Report Share Posted September 30, 2010 Hi, did you ask to me ? I have explain that they are 2 "manual" stops Demo broker exness that don't have limit of price distance for positioning pending order. berusnet, I was referring to your entry not to the SL. The EA didn't unfold the conditions (ATRPips zones) between the 4.30 am (GMT) and the 8.00 am (GMT).Take a look to the ATRPips on the 15m TF and check it. Just my 2 cents.... Quote Link to comment Share on other sites More sharing options...
Middo Posted September 30, 2010 Report Share Posted September 30, 2010 Does anyone think there would be anyway to get around the brokers that automatically delete pending orders that are too close together? Quote Link to comment Share on other sites More sharing options...
berusnet Posted September 30, 2010 Report Share Posted September 30, 2010 (edited) berusnet, I was referring to your entry not to the SL. The EA didn't unfold the conditions (ATRPips zones) between the 4.30 am (GMT) and the 8.00 am (GMT).Take a look to the ATRPips on the 15m TF and check it. Just my 2 cents.... mmmmm my ATRpips M15(7) in that time (4.30-8.00 GMT) go from 6 to 20 so i think there was the conditions. ..and make profit. problem was orders opened before this time Can you tell me if your cablerun delete pending order if it close all opened orders ?? GMT+1 EXNESS Report http://screendash.com/upload/10001-15000/13748.png Edited September 30, 2010 by berusnet Quote Link to comment Share on other sites More sharing options...
gigamax Posted September 30, 2010 Report Share Posted September 30, 2010 bersunet, must be because we have different broker(and different quotes)...I didn't have your entry. Regarding your question :yes I think my EA deletes pending orders . Quote Link to comment Share on other sites More sharing options...
gigamax Posted September 30, 2010 Report Share Posted September 30, 2010 Hi to all, Did you noticed the CPU and memory absorption running this EA? In my case I have a heavy rate of about 80/100 % of CPU and 600 Mb of memory. Quote Link to comment Share on other sites More sharing options...
Sauber Posted September 30, 2010 Report Share Posted September 30, 2010 This is killer code to nasty brokers that I invented this morning !!!!! YOur broker will hate you the most ! =============================================================================== //This is your External variable int Magic =187939 ; // any of arbitrary # range from 100000 <= Magic Range <= 400000 int MagicRangeLow =100000; int MagicRangeHigh =400000; bool MagicRandom = TRUE; int start() { if (MagicRandom) { MathSrand(TimeLocal()); int a=0, myrandom; while(a<10000) { myrandom = MathRand()%976398; a++; } if (DayOfWeek() == 1) Magic = 247872-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000 if (DayOfWeek() == 2) Magic = 186780-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000 if (DayOfWeek() == 3) Magic = 369878-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000 if (DayOfWeek() == 4) Magic = 165034-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000 if (DayOfWeek() == 5) Magic = 225563-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000 } if (!MagicRandom) Magic = 867739; // if dun want random magic#, then this will be this EA instance fix magic# ... .. .... ** you have to change ALL subroutines that have the statement OrderMagicNumber() = XXX to as below... OrderMagicNumber()>= MagicRangeLow && OrderMagicNumber()<= MagicRangeHigh Should be 10 minutes coding job... If you want to create 2 or 3 more instance EA running together, make sure every EAs have no MagicRangeLow/High overlap. Can anybody put this code into the CableLarikan_Ok_24H ? Quote Link to comment Share on other sites More sharing options...
teknomage Posted September 30, 2010 Report Share Posted September 30, 2010 I wondered why I couldn't get the robot to backtest properly, so I decided to dig a little deeper into the code. Dont get me wrong, I think Muruku did a good job on adding in most of the extra filters and functionality, and I'm thankful for his ideas and hardwork. Anyways, here's my two cents on why the robot doesnt backtest right: 1. The main thing is that the Sleep functions are preventing the robot from being tested. Those Sleep() lines need to be either removed or modified. Change all Sleep to MySleep() and if that doesnt help, then either comment out the code in MySleep to bypass it or remove all the Sleep lines completely. 2. All TimeLocal() references have to be changed to TimeCurrent(). When backtesting, it doesnt make sense for the robot to refer to the PC's local time when it's running through months of the broker's data and prices in the blink of an eye. Also, when backtesting, the robot will erroneously avoid the CableRunNOTtoTradeTimes just because of your local system time. 3. Error 130 will keep popping up due to the NewOrder function, either because NormalizeDouble is not being used effectively OR because of invalid stops. Example of how to modify NewOrder with NormalizeDouble: int NewOrder(int a_cmd_0, double a_lots_4, double a_price_12, double a_price_20, double a_price_28) { int l_ticket_36 = 0; a_price_12=NormalizeDouble(a_price_12,Digits); a_price_20=NormalizeDouble(a_price_20,Digits); a_price_28=NormalizeDouble(a_price_28,Digits); ....... l_ticket_36 = OrderSend(Symbol(), a_cmd_0, a_lots_4, a_price_12, 3, a_price_28, a_price_20, g_comment_152, Magic, 0, CLR_NONE); ....... I'm no expert, but these are just a few of the mods I've tried by myself. I still have trouble backtesting because of Error 130, but I'm trying to work it out. Hope this helps for now... if i get my mod to work without errors, then I will definitely post it here. In the meantime, kudos would be nice :-) Trial1, sdek4x, domonkos and 1 other 4 Quote Link to comment Share on other sites More sharing options...
msnfx Posted September 30, 2010 Report Share Posted September 30, 2010 i dont know wher is the last version that you test ,please put the link and the set files....Please Thanks Quote Link to comment Share on other sites More sharing options...
⭐ pipmaster Posted October 1, 2010 Report Share Posted October 1, 2010 G this EA has potential but is dangerous. Been using CableLarikan_ok_24H_EA_and_ATR_Pips_indicator on 0.05 lots with a 5k account and was drawn down over 2k which is way too risky for me. Should have left EA off this friday gone a bit crazy, but this week up 40% and would have been more like 70% if I didn't close off most of the positive trades manually as it had 30 trades open at one stage. Quote Link to comment Share on other sites More sharing options...
teknomage Posted October 1, 2010 Report Share Posted October 1, 2010 @ gigamax: Yes, it does consume a lot of resources, because of some of the for and while statements in the code which loop every time there's an error, especially error 130... @ pipmaster: I totally agree... the mod I'm testing out shows a neat equity curve, but the drawdowns are freakin scary!! gigamax 1 Quote Link to comment Share on other sites More sharing options...
teknomage Posted October 1, 2010 Report Share Posted October 1, 2010 (edited) CableLarikanMuruku_v5_teknomage OK folks, here's my contribution to this Cable Run story... my modifications of Muruku's version is v5_teknomage. Considering this is my first major (well almost) code upload here, be gentle :-) hxxp://[email protected]/file/SoWsX7R2/CableLarikanMuruku_v5_teknomag.html Alright, firstly, this version can be backtested upto a certain extent. The accuracy of the results is being diminished by loads of Errors 130, so if ANYONE here can help to further improve the robot, please feel free to do so. Additions and Modifications -------------------------- 1. added TradeFridays - default is false 2. added CableRunNOTtoTradeTimes to avoid London session as well as for NY session 3. added a silly idea called OnErrorSwitchToStops (will explain later) 4. commented out GlobalVariableSet lines and used TotalProfit instead, as suggested by Muruku earlier 5. changed all timings to TimeCurrent... this means that all timings should be set with respect to your MT4 broker's timing, NOT your local PC time 6. modified the iCustom lines to use ATR_Period properly. Muruku's earlier version would only call the ATR_Pips indicator but not set the ATR_Period to 7, which means that the indicator was actually using its default of 14 7. completely modified the IsTradeTime function to use proper datetime comparisons, and NOT comparisons between strings. I'm sorry if this may seem unnecessary, but this is the way I prefer time comparisons! 8. changed all Sleep lines to MySleep and commented out code to prevent time delays that were affecting backtests. OK, so much for the mod. Now, let's take a look at a couple of backtests. I like said before, the backtests are not being completed properly because of the Errors 130. I ran these backtests from Jan 4th '10 to Sept 25th '10, and unfortunately, the backtests are not progressing beyond March of this year. Nevertheless, the equity line looks really promising, even if the drawdowns at the end are discouraging. However, the drawdown may not be so bad if we can somehow fix the Error 130. So, someone is more experienced in MQL, PLEASE help! Also, notice the difference in curves when ATR_Period is changed. When ATR_period=7, it seems a little more aggressive... more trades and more DD too. Equity curve (with ATR_Period=7) ========================= http://img836.imageshack.us/img836/6387/cablerunmodjansept2510w.th.gif Equity curve (with ATR_Period=14) ========================= http://img101.imageshack.us/img101/6387/cablerunmodjansept2510w.th.gif Will explain about OnErrorSwitchToStops in my next post. Need I say anything about kudos :-) Edited October 1, 2010 by teknomage didier, beorn, 4xlord and 9 others 12 Quote Link to comment Share on other sites More sharing options...
gigamax Posted October 1, 2010 Report Share Posted October 1, 2010 hi teknomage, thanks for your work. I notice the GMT time indicated in the chart is wrong (is 1 hour less) does this may affect all the time settings in the EA parameters?Wouldn't be better to set a GMT offset parameter? 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.