Jump to content

Cable Run from Profitable FX


Recommended Posts

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.

Link to comment
Share on other sites

  • Replies 921
  • Created
  • Last Reply

Top Posters In This Topic

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

Link to comment
Share on other sites

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 by tomislav
Link to comment
Share on other sites

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 by mrbizu
Link to comment
Share on other sites

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 by mrbizu
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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....

Link to comment
Share on other sites

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 by berusnet
Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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 :-)

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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 by teknomage
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...