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: suggession control parameters

Post by SteveHopwood »

phil_trade wrote:Hi Steve

may I suggest adding the following controls codes in INIT() to automaticaly adjust LOT and PartCloseEnabled parameters to fit criminal and instrument requirement :

Philippe
Many thanks Philippe. I do not usually include this kind of idiot check, because I figure that anyone too dim to work out their crim's minimum lot size is safest not trading. You have done the work for me, so to refuse it would be churlish and I have added it to the EA, along with an appreciation for you. I shall add it to my shells as well. The check will show up in the next release.

Cheers.

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

Version 1j is in post 1, incorporating Philippe's lot-size idiot check.

I was not going to post the update so soon, but spotthedespot has done an outstanding bit of investigateve bloop-spotting that explains why some of you have not been seeing trades taken. If you know how to set your lot sizes and NB has been taking trades, then you do not need the update.

I have copied Dave's pm for the coders, at the end of this post. Translated into non-geek, the problem was caused by the OnlyTradeCurrencyTwice function.

Those of you who can, make these changes:
Find
bool CanTradeThisPair;
and change it to
bool CanTradeThisPair = true;

Then go to bool IsTradingAllowed() and find this code block, second block down:

Code: Select all

   if (OnlyTradeCurrencyTwice && OpenTrades == 0)
   {
      IsThisPairTradable();      
   }//if (OnlyTradeCurrencyTwice)
   if (!CanTradeThisPair) return(false);
and place this line ahead of the block:

CanTradeThisPair = true;

so that the block is:

Code: Select all

CanTradeThisPair = true;
   if (OnlyTradeCurrencyTwice && OpenTrades == 0)
   {
      IsThisPairTradable();      
   }//if (OnlyTradeCurrencyTwice)
   if (!CanTradeThisPair) return(false);
Setting the variable to 'true' twice is probably overkill, but may as well make sure.

:D

For the coders, here is the explanation (Dave, if you prefer not to have this quoted, sing out and I will remove it):
spotdespot wrote:Hi Steve,

I haven't had the EA trading on my account at all and although I am very capable of doing stupid things (I have many badges) I didn't think I had done anything in this case!

I checked the code (I am not familiar with MQL but code is code) and it seems I may have found the issue why some people are getting trades and some not. If you set OnlyTradeCurrencyTwice to TRUE then, as you know, in the IsTradingAllowed function it calls the IsThisPairTradable function if the conditional is met. In the IsThisPairTradable function it initializes the boolean CanTradeThisPair and checks whether to trade that pair, returning a boolean (from the IsThisPairTradable function). CanTradeThisPair is then checked:

Code: Select all

if (!CanTradeThisPair) return(false);
The issue arises (I think :? ) if you have OnlyTradeCurrencyTwice set to false as then IsThisPairTradable() is never called and CanTradeThisPair is never initialized. Now I have no idea how MQL deals with uninitialized variables but I have known the outcome to be pretty random using other languages - which might explain why some people are getting trades and others not (it could also just be those that have OnlyTradeCurrencyTwice = False that have the issue).

I set CanTradeThisPair to true when declared and now I am getting trades.

Hopefully this makes sense - I haven't posted this for others that have the issue just in case I am completely FOS!!

Cheers,
Dave.
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.
jjasper7
Trader
Posts: 87
Joined: Mon Mar 19, 2012 11:44 pm
Location: Mesa,AZ (near Phoenix)

Re: 10.2 updates

Post by jjasper7 »

Steve,

Does this blog have an option to show what/when new files have been uploaded (as in ff)?

Unless you have a reason not to do so, it seems it would be helpful for us greenies if the page 1 Empty4 download would include its version number or date, so we could see when we are 'out of date' with the program we have downloaded.
User avatar
verb
Trader
Posts: 61
Joined: Mon Apr 02, 2012 2:27 am

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

Post by verb »

[spotdespot]
Hi verb - your points are valid if this is for buying in a dip/selling rallies BUT if that was the intention then I think you should only be buying in a dip and selling rallies if D1 TMA slope is >=0.8/<=-0.8?

Bob's booklets clearly state (as I originally quoted) that BOTH H4 Weekly Open Histogram 2x1 and 1x0 should be in agreement for buying/selling with the trend as S/R or MA's are crossed - so perhaps this should be reflected in the H4 Trend Trade "Basic Trade"?

It's your document obviously but I thought it was going to reflect a codified version of Bob's rules and, although I think it is very useful, I don't think that is the case at the moment. Perhaps Bob will have a chance to read your document and tell me I am wrong :lol:

Anyway - please don't take any offense - there is certainly none intended.
Thanks for staying patient, I believe I finally understand. I have made the adjustments to the H4 Trend and Pivot Retrace Trade Types hopefully reflecting your analysis.

Let me know if this meets your understanding. I take no offense here, that's why I posted it so we could all work together.

:)
You do not have the required permissions to view the files attached to this post.
spotdespot
Trader
Posts: 768
Joined: Sun Jan 22, 2012 11:38 pm

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

Post by spotdespot »

Looks good to me - thanks again for all your work.
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 »

Thanks verb. I have uploaded this to post 1.

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

Version 1k is available from post 1, for the weekend backtesters to play with. I have added a weekly pivot cross function for when the market is ranging. Details in the range trade section of post 1.

Knowing which trade has been sent is not easy any more, so I have set up separate trade comments for each trading style. As yet, there is no idiot checking, so make sure each comment has something in it; blank trade comments will stop NB from trading.

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

There have been a few posts here tonight that have demonstrated that:
  • 1) The poster has not read post 1 properly.
    2) The poster is not reading my posts.
I have deleted them and will continue to do so. If said posters continue to annoy me, I shall remove their registration from this forum.

Members should not expect to have any idea what is going on here if they cannot even be bothered to read my posts. I am, um, kind of, err, a teensy tad central to what is going on in this thread.
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.
User avatar
TallCoolOne
Trader
Posts: 43
Joined: Sun Jan 29, 2012 3:05 pm

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

Post by TallCoolOne »

Hi Steve,

Great work on this EA and thanks Verb your codex. Great contributions for this system. I work full time and I'm in the U.S. so it is hard for me to manually trade this system, so I really appreciate you creating this auto-trader.

The only thing I would ask for is an automated feature to close trades that are losers based on last swing hi/lo. I see many of the guys over in the FF thread are using that as a way of closing losers and are still doing very well. I have been using the auto-trader and closing trades manually, but would like to see how the EA performs with an automated close feature. Thanks for your consideration. Thanks for all your hard work

This EA may become my only auto-trader if it keeps performing as it has been.
phil_trade

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

Post by phil_trade »

TallCoolOne wrote:Hi Steve,

Great work on this EA and thanks Verb your codex. Great contributions for this system. I work full time and I'm in the U.S. so it is hard for me to manually trade this system, so I really appreciate you creating this auto-trader.

The only thing I would ask for is an automated feature to close trades that are losers based on last swing hi/lo. I see many of the guys over in the FF thread are using that as a way of closing losers and are still doing very well. I have been using the auto-trader and closing trades manually, but would like to see how the EA performs with an automated close feature. Thanks for your consideration. Thanks for all your hard work

This EA may become my only auto-trader if it keeps performing as it has been.
Could you described more technically "to close trades that are losers based on last swing hi/lo"
Locked

Return to “10.x EA forum”