My shell EA code

Post Reply
User avatar
SpiderX
Trader
Posts: 554
Joined: Thu Aug 22, 2013 4:50 pm

My shell EA code

Post by SpiderX »

Hi Steve,

I was studying how to add Zeljko and OnlyTradeCurrencyTwice to my code, when i realized that something does not make sense with both functions.

for BalancedPair(int type) function,
the line:

Code: Select all

if (OrderSymbol() == Symbol()) continue;
I believe this should be omitted. If we are trying to balance trade on a currency...why would we omit a trade on the same Symbol ?
In fact, if there is already a trade on the same symbol, we should immediately return false.


for IsThisPairTradable() function
the line:

Code: Select all

if (OrderSymbol() != Symbol() ) continue;
should be ommited.
This line means we skip on checking a trade if it is not our current symbol, which doesnt make sense since we are trying to look at other Symbols.


Cheers
"Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It does not dishonor others, it is not self-seeking, it is not easily angered, it keeps no record of wrongs.Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always hopes, always perseveres."
-Corinthians 13:4-8
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.

My shell EA code

Post by SteveHopwood »

What is it with this apparent declaration all over these boards of open season on code that has worked flawlessly and seamlessly for years.

I will repeat that. Code that has worked flawlessly and seamlessly for years.

And was donated by people who know a lot more about coding than I do - or at least did at the time.

Have I not mentioned that I get just the teensiest bit pissy when such code is questioned elsewhere?

When considering that last short paragraph bear this in mind: I am a Brit. There is a thingy known as Masterly British Understatement.

Use the shell or don't use is as suits you best; I have donated it here out of the kindness of my heart but do not actually care whether people use it or not. Don't question it unless you are 100% certain that something has been wrong for somewhere in the region of 5 years. I can get a tad cross when this happens.

Spot some of the flaws that have emerged in my own programs based on these shells and which I have corrected but not bothered to upload here, and I might take a bit more notice. Probably not because they work fine for me and that is all that counts, but it might prompt me to upload updates. Plus, I am getting sick of having my work constantly questioned by people who keep on being wrong.

I trust I make myself clear. Do say if not, and I will add some clarity to the above.
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.
fxcba
Trader
Posts: 46
Joined: Wed Aug 21, 2013 10:10 pm

My shell EA code

Post by fxcba »

Hello, today I found my self inspired and used this Shell EA, but when compiled some errors and a lot of warnings appeared with this new Empty4 version. I managed to solve the errors (some dots "." in recovery section) and some warnings, wich I learned from Milanese, thank you buddy.
EA is working, I don't know how yet :lol: , but that's my problem, the thing is there are other warnings I can't fix because I don't have a clue on how to, most of them are in the return line

arrays passed by reference only BO_test(Steve).mq4 3142 42
function must return a value BO_test(Steve).mq4 3923 7
function must return a value BO_test(Steve).mq4 3976 7
function must return a value BO_test(Steve).mq4 4038 30
function must return a value BO_test(Steve).mq4 4083 7
function must return a value BO_test(Steve).mq4 4096 10
function must return a value BO_test(Steve).mq4 4110 10
not all control paths return a value BO_test(Steve).mq4 1887 1
declaration of 'tf' hides global declaration at line 436 BO_test(Steve).mq4 1908 19
declaration of 'tf' hides global declaration at line 436 BO_test(Steve).mq4 1915 18
declaration of 'tf' hides global declaration at line 436 BO_test(Steve).mq4 1946 18
declaration of 'i' hides global declaration at line 429 BO_test(Steve).mq4 2445 11
variable 'col' not used BO_test(Steve).mq4 2445 13
declaration of 'i' hides global declaration at line 429 BO_test(Steve).mq4 2489 11
declaration of 'i' hides global declaration at line 429 BO_test(Steve).mq4 2530 12
'void' function returns a value BO_test(Steve).mq4 2566 7
variable 'stop' not used BO_test(Steve).mq4 2614 19
declaration of 'i' hides global declaration at line 429 BO_test(Steve).mq4 3083 12
declaration of 'i' hides global declaration at line 429 BO_test(Steve).mq4 3097 11
declaration of 'i' hides global declaration at line 429 BO_test(Steve).mq4 3116 11
declaration of 'i' hides global declaration at line 429 BO_test(Steve).mq4 3127 12
declaration of 'i' hides global declaration at line 429 BO_test(Steve).mq4 3144 11
declaration of 'i' hides global declaration at line 429 BO_test(Steve).mq4 3158 12
declaration of 'tf' hides global declaration at line 436 BO_test(Steve).mq4 3305 41

I wish to know how to fix this kind of warnings, I'll appreciate any advise.

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

My shell EA code

Post by SteveHopwood »

I wish to know how to fix this kind of warnings, I'll appreciate any advise.

Cheers
Ric
Hmmmm. You could start by telling me which of the 6 shells you are using from post 1. :arrrg:
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.
fxcba
Trader
Posts: 46
Joined: Wed Aug 21, 2013 10:10 pm

My shell EA code

Post by fxcba »

SteveHopwood » Fri Feb 27, 2015 4:05 pm wrote:
I wish to know how to fix this kind of warnings, I'll appreciate any advise.

Cheers
Ric
Hmmmm. You could start by telling me which of the 6 shells you are using from post 1. :arrrg:
Sorry :oops:
this is the one
You do not have the required permissions to view the files attached to this post.
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.

My shell EA code

Post by SteveHopwood »

fxcba » Fri Feb 27, 2015 7:52 pm wrote:
SteveHopwood » Fri Feb 27, 2015 4:05 pm wrote:
I wish to know how to fix this kind of warnings, I'll appreciate any advise.

Cheers
Ric
Hmmmm. You could start by telling me which of the 6 shells you are using from post 1. :arrrg:
Sorry :oops:
this is the one
I have stated right at the top of post one which shells I still use and why I have left the one you are failing to use in place. Entirely your choice whether or not you can be arsed to read my posts, but do not expect to make any sense of anything unless you do so.

:xm:
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.
fxcba
Trader
Posts: 46
Joined: Wed Aug 21, 2013 10:10 pm

My shell EA code

Post by fxcba »

Ok, sorry, may be my english is not so good as I expècted, perhaps I missed or didn't understand something.
Never mind
Bruster400
Trader
Posts: 192
Joined: Tue Sep 24, 2013 3:19 pm

My shell EA code

Post by Bruster400 »

Steve,

I have a "request" (definitely not a criticism - I like my account too much). In your shell code, in the decimal calcs, could you add "GER30" as well as the "DAX30" that is already there - with the same factor. My broker insists on calling everything by strange names and I find this index performs very well with many of your EAs. With a current daily range of 200 and a spread of just 1pip it makes for good pip harvesting grounds.

Yes, I could change broker but hopefully this isn't a big change and then it's done for anyone else who comes across this naming convention.

Thanks.
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

My shell EA code

Post by milanese »

Bruster400 » Wed Mar 25, 2015 7:46 am wrote:Steve,

I have a "request" (definitely not a criticism - I like my account too much). In your shell code, in the decimal calcs, could you add "GER30" as well as the "DAX30" that is already there - with the same factor. My broker insists on calling everything by strange names and I find this index performs very well with many of your EAs. With a current daily range of 200 and a spread of just 1pip it makes for good pip harvesting grounds.

Yes, I could change broker but hopefully this isn't a big change and then it's done for anyone else who comes across this naming convention.

Thanks.
Just change DAX30 to GER30 and it is done..

Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
Bruster400
Trader
Posts: 192
Joined: Tue Sep 24, 2013 3:19 pm

My shell EA code

Post by Bruster400 »

milanese » Wed Mar 25, 2015 9:17 am wrote: Just change DAX30 to GER30 and it is done..

Cheers :)

Tommaso

Thanks Tommaso,

Yes, I understand it's an easy change but that's why I was asking for it to be done in the code Steve uses - a quick 1 min addition would save me and others from having to make the same change on every EA and every version update.

I'm not expecting anyone to go back into past code but if it could be changed in the template it would hopefully mean that the change would filter into future EAs and versions going forward.

Thanks again
Post Reply

Return to “Coders Hangout”