Nanningbob 10.2 auto-trading EA

Share your 10.x automated traders here.
Locked
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: 10.2; the auto-trading EA is born.

Post by SteveHopwood »

phil_trade wrote:Steve

I found an incorrect code that could do some strange things

in modules LookForD1H4TrendTrade and LookForD1TrendTrade, you define double Target in If Buy...so if it's a SELL, MQL found a no declared variable target = xxxx

You always have to declare variables at top of module to avoid this... of course...if you're kind enough :lol:
I am not so sure it matters because the editor would grumble at compile time.

I have made the changes, so V 1y is in post 1. In light of Phil's latest post (just above this one), you might all like to hang on for V 1z.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
grimweasel
Trader
Posts: 95
Joined: Sun Nov 20, 2011 3:48 pm

Re: 10.2; the auto-trading EA is born.

Post by grimweasel »

Hi Gang.

Been testing this EA with Alpari for a few weeks now with mixed results. Understand that we are still in development .

I keep getting loads of errors saying 'trade context is busy' - would you know how to stop these or what it means? It matters not if I have ECN true or false.

Many thanks in anticipation
phil_trade

Re: 10.2; the auto-trading EA is born.

Post by phil_trade »

SteveHopwood wrote:
phil_trade wrote:Steve

I found an incorrect code that could do some strange things

in modules LookForD1H4TrendTrade and LookForD1TrendTrade, you define double Target in If Buy...so if it's a SELL, MQL found a no declared variable target = xxxx

You always have to declare variables at top of module to avoid this... of course...if you're kind enough :lol:
I am not so sure it matters because the editor would grumble at compile time.

I have made the changes, so V 1y is in post 1. In light of Phil's latest post (just above this one), you might all like to hang on for V 1z.

:D
I am not so sure it matters because the editor would grumble at compile time.

Oh no, this compilateur is not cleaver enough ! for him, you declare these variable before but he can"t see if it's in a if condition

It's a good way to code to avoid this

if (1 == 2)
{
double xy = 5;
}
Print(DoubleToStr( xy + 10,0));

Print will always return 10 instead of 15. :mrgreen:
Last edited by phil_trade on Tue May 29, 2012 1:01 pm, edited 2 times in total.
astral77
Trader
Posts: 171
Joined: Tue Nov 15, 2011 9:26 pm
Location: London

Re: 10.2; the auto-trading EA is born.

Post by astral77 »

Trade context busy is generated by crap Empty4 when your criminal`s server is overloaded and even after the busy time is over it still persists. Often closing and restarting the Empty4 will solve the problem.

Kind regards
phil_trade

Re: 10.2; the auto-trading EA is born.

Post by phil_trade »

astral77 wrote:Trade context busy is generated by crap Empty4 when your criminal`s server is overloaded and even after the busy time is over it still persists. Often closing and restarting the Empty4 will solve the problem.

Kind regards
please do some homework and google this expression...you will see it's not a bug !
phil_trade

Re: 10.2; the auto-trading EA is born.

Post by phil_trade »

phil_trade wrote:Steve

a friend has an Empty4 on Alpari which generates the Open/close bug.

I have add a Print in LookForTradeClosure() to see value

as you can see TP is 0.77782 but take read from line is 80.65200 so for a sell BID < take and LookForTradeClosure() close the trade !

Now we have to find why line is set to 80.652 :mrgreen:

2012.05.29 10:37:11 Nanningbob 10.2 auto-trading EA EURGBP,H4: open #1800554604 sell 0.60 EURGBP at 0.79938 sl: 0.83496 tp: 0.77782 ok
2012.05.29 10:37:13 Nanningbob 10.2 auto-trading EA EURGBP,H4: close #1800554604 sell 0.60 EURGBP at 0.79938 sl: 0.83496 tp: 0.77782 at price 0.79949
2012.05.29 10:37:13 Nanningbob 10.2 auto-trading EA EURGBP,H4: EURGBP Close By LookForTradeClosure() : Bid = 0.79937 take = 80.65200 stop = 0.00000
Steve

I confirm it's not a bug, but Empty4 that's become crasy.
I delete all history and restart a fresh copy of Empty4 and all is normal. I suspect to much history loaded by F2 with old Empty4 version 419. The new one 427 can allocate 3Go memory on 32bits and 4Go on 64bits windows and work fine for me.
Dumuzi
Posts: 9
Joined: Sat Apr 28, 2012 11:38 am
Location: Norway

Re: 10.2; the auto-trading EA is born.

Post by Dumuzi »

I installed version 1x this morning and it took one trade. Around 15:00 (GMT+3) it started to buy/close USDCAD. Every minute for a period, then a pause followed by a new series buying/closing. And so on.
Installed version 1y, but the problem persists.

I have worked as a professional programmer for 30 years until my brain put up a fuss. If needed I can do some debugging but I need to know where to start looking. Any particular function? I can print any information you want and pass it over to you.
phil_trade

Re: 10.2; the auto-trading EA is born.

Post by phil_trade »

Dumuzi wrote:I installed version 1x this morning and it took one trade. Around 15:00 (GMT+3) it started to buy/close USDCAD. Every minute for a period, then a pause followed by a new series buying/closing. And so on.
Installed version 1y, but the problem persists.

I have worked as a professional programmer for 30 years until my brain put up a fuss. If needed I can do some debugging but I need to know where to start looking. Any particular function? I can print any information you want and pass it over to you.
The problem is not is the code but in your Empty4.

Try to install a fresh Empty4 with version 427.

Which broker ?
Dumuzi
Posts: 9
Joined: Sat Apr 28, 2012 11:38 am
Location: Norway

Re: 10.2; the auto-trading EA is born.

Post by Dumuzi »

phil_trade wrote: The problem is not is the code but in your Empty4.

Try to install a fresh Empty4 with version 427.

Which criminal ?
I can of course try a fresh installation of build 427. My criminal is FxPro.

At work we regularly blamed the compiler or the platform (Windows). However, 99% of the time we were wrong. Later it was required that I proved the problem to be in the the compiler or the platform. I find this to be sound because the alternative is to become a victim. Pardon me, but I still believe this problem can be fixed in the EA and I really, really hope it can because the alternative is "unbearable".
juliank
Posts: 6
Joined: Thu May 17, 2012 1:11 pm
Location: TM, Ro

Re: 10.2; the auto-trading EA is born.

Post by juliank »

phil_trade wrote:
Dumuzi wrote:I installed version 1x this morning and it took one trade. Around 15:00 (GMT+3) it started to buy/close USDCAD. Every minute for a period, then a pause followed by a new series buying/closing. And so on.
Installed version 1y, but the problem persists.

I have worked as a professional programmer for 30 years until my brain put up a fuss. If needed I can do some debugging but I need to know where to start looking. Any particular function? I can print any information you want and pass it over to you.
The problem is not is the code but in your Empty4.

Try to install a fresh Empty4 with version 427.

Which criminal ?
... in my case it was a problem as well even if I installed the latest version of Empty4.... it made troubles only on the pairs where I saw it did not made an update on history (maybe slow internet connection) and the histograms displayed the same height and value for the chart
Locked

Return to “10.x EA forum”