Bob's Biggest Balls Ever

Post Reply
Lifesys
Trader
Posts: 126
Joined: Wed Apr 25, 2012 2:05 am
Location: Echuca Victoria. Australia

Re: Bob's Biggest Balls Ever

Post by Lifesys »

Frank
Use a boolean truth table to work out if () logic.
4 conditions in this nested filter line.
*** Remember 'ScalpSlopeTF' is NOT 'ScalpTrading' ***
This is a Slope LEVEL test, NOT whether Scalp trades should be taken.
Default is ON - ScalpSlopeTF = 240;
ScalpSlopeTF == 0; means we do not care whether level is met or not.
Current

Code: Select all

     if (ScalpSlopeTF == 0 || ScalpSlopeVal[cc] >= ScalpBuyLevel)//4
T or T - ScalpSlopeTF is off OR IsInRange - PASS (don't care)
T or F - ScalpSlopeTF is off OR OutofRange - PASS (don't care)
F or T - ScalpSlopeTF is on OR IsInRange - PASS *default
F or F - ScalpSlopeTF is on OR OutofRange - FAIL *default
ie pass if don't care, or within range if do care.

Your suggestion

Code: Select all

     if (ScalpSlopeTF != 0 && ScalpSlopeVal[cc] >= ScalpBuyLevel)//4
T and T - ScalpSlopeTF is on AND IsInRange - PASS
T and F - ScalpSlopeTF is on AND OutofRange - FAIL
F and T - ScalpSlopeTF is off AND IsInRange - FAIL (but shouldn't care)**
F and F - ScalpSlopeTF is off AND OutofRange - FAIL (but shouldn't care)
** - means it will fail even though it shouldn't care (disabled as a filter).

I believe Steve is correct on this as well. ;-)
We have some 191 & 192 trades but not great. I have UseH1ADX == false, but need to turn it back on.
Be glad if no trades as 2 (192) I have are going wrong way. 10.2 DWM still says sell but ADX (M15-H4) shows strong bounce up! May turn or SL!
GBPAUD23-01.png
NB's trade management skill is very difficult to code.
Paul
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.

Re: Bob's Biggest Balls Ever

Post by SteveHopwood »

Lifesys wrote: Use a boolean truth table to work out if () logic.
4 conditions in this nested filter line.
*** Remember 'ScalpSlopeTF' is NOT 'ScalpTrading' ***
This is a Slope LEVEL test, NOT whether Scalp trades should be taken.
Default is ON - ScalpSlopeTF = 240;
ScalpSlopeTF == 0; means we do not care whether level is met or not.
Current

Code: Select all

     if (ScalpSlopeTF == 0 || ScalpSlopeVal[cc] >= ScalpBuyLevel)//4
T or T - ScalpSlopeTF is off OR IsInRange - PASS (don't care)
T or F - ScalpSlopeTF is off OR OutofRange - PASS (don't care)
F or T - ScalpSlopeTF is on OR IsInRange - PASS *default
F or F - ScalpSlopeTF is on OR OutofRange - FAIL *default
ie pass if don't care, or within range if do care.
Thanks for introducing this idea Paul. I will use it in the future.

: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.
fmuir
Trader
Posts: 87
Joined: Sun Apr 01, 2012 7:32 am
Location: Seattle, WA, USA

Re: Bob's Biggest Balls Ever

Post by fmuir »

@ Lifesys,

Thanks for the response. I'll try applying the information to the rest of the if() statements today.

I just have a gut feeling that the code contained in the sieve (collandar), for lack of a better term, might not be industral-strength nor bullet-proof. Please, do not take my remarks personally!!! Steve had said that this section of coding was your's. I understand the difficulties in attempting to mimic somebody else's trading style. I also understand how difficult it is for someone to always be able to uncover all of their own coding errors. A certain amount of personal bias exists. A fresh set of eyes might find elusive errors.

Two questions:
-- Does setting UseFilter_ADX and/or UseFilter_Doji to FALSE turn off or disable those filters?
-- Is the if() statement using UseZeljko and BalancedPairs() constructed correctly?

I'll continue looking at the code!

Best Regards,
-Frank
fmuir
Trader
Posts: 87
Joined: Sun Apr 01, 2012 7:32 am
Location: Seattle, WA, USA

Re: Bob's Biggest Balls Ever

Post by fmuir »

McNish wrote:@ Frank : Thanks for the explanation, I see the point. Real nice work for dissecting the code piece by piece. Now I know why my EA with my set files was not taking trades as you described in your last couple posts. Time for me to step a level higher and grease my hands if I want this monster up and running my way.

Regards,
@ McNish,
Your welcome! But, remember, those posts were referring to only the "Scalping 10.3" portion of the EA. I hope you were also referring to this EA, when you said you would be greasing your hand. :lol:

@ Phaholj,
My posts were referring to the "Scalping 10.3" portion of my copy of BBBE. The official copy of the EA is always found in post #1. The version number is included in the code on line 6.

Regards,
-Frank
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: Bob's Biggest Balls Ever

Post by SteveHopwood »

fmuir wrote: I just have a gut feeling that the code contained in the sieve (collandar), for lack of a better term, might not be industral-strength nor bullet-proof. Please, do not take my remarks personally!!!
Paul might not, but I do. I am not pleased at having the results of a week and a half of coding and coming to grips with some (to me) new coding concepts as 'the sieve'.

If you think you can do better, Frank, do fee free to post your alternative version elsewhere.
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.
fmuir
Trader
Posts: 87
Joined: Sun Apr 01, 2012 7:32 am
Location: Seattle, WA, USA

Re: Bob's Biggest Balls Ever

Post by fmuir »

SteveHopwood wrote:
fmuir wrote: I just have a gut feeling that the code contained in the sieve (collandar), for lack of a better term, might not be industral-strength nor bullet-proof. Please, do not take my remarks personally!!!
Paul might not, but I do. I am not pleased at having the results of a week and a half of coding and coming to grips with some (to me) new coding concepts as 'the sieve'.

If you think you can do better, Frank, do fee free to post your alternative version elsewhere.
@ SteveHopwood,

I am sorry that you feel that way. That comment was just an attempt to lighten the mood. 'Sieve' is not a new or old coding concept. It's actually using a series of if() statements to affect a program's direction in one way or another.

I assume then since I have been invited to post my alternative version elsewhere (read not on your forum) that you also no longer want any of my posts on this thread?! So be it.

Regards,
-Frank
fmuir
Trader
Posts: 87
Joined: Sun Apr 01, 2012 7:32 am
Location: Seattle, WA, USA

Re: Bob's Biggest Balls Ever

Post by fmuir »

Lifesys wrote:Frank
Use a boolean truth table to work out if () logic.
4 conditions in this nested filter line.
*** Remember 'ScalpSlopeTF' is NOT 'ScalpTrading' ***
This is a Slope LEVEL test, NOT whether Scalp trades should be taken.
Default is ON - ScalpSlopeTF = 240;
ScalpSlopeTF == 0; means we do not care whether level is met or not.
Current

Code: Select all

     if (ScalpSlopeTF == 0 || ScalpSlopeVal[cc] >= ScalpBuyLevel)//4
T or T - ScalpSlopeTF is off OR IsInRange - PASS (don't care)
T or F - ScalpSlopeTF is off OR OutofRange - PASS (don't care)
F or T - ScalpSlopeTF is on OR IsInRange - PASS *default
F or F - ScalpSlopeTF is on OR OutofRange - FAIL *default
ie pass if don't care, or within range if do care.

Your suggestion

Code: Select all

     if (ScalpSlopeTF != 0 && ScalpSlopeVal[cc] >= ScalpBuyLevel)//4
T and T - ScalpSlopeTF is on AND IsInRange - PASS
T and F - ScalpSlopeTF is on AND OutofRange - FAIL
F and T - ScalpSlopeTF is off AND IsInRange - FAIL (but shouldn't care)**
F and F - ScalpSlopeTF is off AND OutofRange - FAIL (but shouldn't care)
** - means it will fail even though it shouldn't care (disabled as a filter).
...
Paul
@ Lifesys,
Let me commend you on what a nice piece of work you contributed for the EA. Steve had mentioned that this EA is huge and that there might be errors in it.

Please, remember that the if() statement must be true in order to pass down to the next if() statement. If it's false, then it will fall off the edge of the earth and no trade will be made. :lol: So, the if() statement does actually affect if a potential trade is made, if the following conditions are favorable; it doesn't only affect testing whether a table value is >= a variable as might be assummed. Also, remember that the logical operator || precedes the logical operator && in the order of precedence of logical operators. This is only true for MQL4, which is the opposite of all other programming languages. Note: I might have the order of precedence switched for those two logical operators.

If anybody is interested, Wikipedia has a page that explains all about boolean truth tables. If you are interested, please take a look at:
http://en.wikipedia.org/wiki/Truth_tabl ... _operators

The particular if() statement being referenced actually has three logical operator (||, == and >= | <=). Therefore, the boolean truth table would need to be larger to accomodate all the possibilities. The same point is appropriate for all the other if() statements also.

I had set ScalpSlopeTF equal to 0 (which wasn't the default) as descibed in the introducation to disable checking whether ScalpSlopeVal was above/below a certain level. I had tested Rule 4 (after disbling Rules 3, 5, 6 & 7) with both the current if() statment and with my suggested if() statement. I got 13 scalp trades opened with each. With Rule 3 enabled, I did't get any trades opened (the reasons are obvious).

I will continue looking at the code in LookingForTradingOpportunities. I will test each if() to make sure that it behaves correctly. That is it evaluates to True, so that it will go to the next if() statement, or to False, to discontinue looking at an further if() statements.

Your welcomed to comment, if you wish?

Regards,
-Frank

P.S. This will be my last post on this thread, per Steve's request, and possibly the forum. Sorry!!
hndymann
Trader
Posts: 23
Joined: Sat Nov 19, 2011 4:01 pm

Re: Bob's Biggest Balls Ever

Post by hndymann »

SteveHopwood wrote: Paul might not, but I do. I am not pleased at having the results of a week and a half of coding and coming to grips with some (to me) new coding concepts as 'the sieve'.

If you think you can do better, Frank, do fee free to post your alternative version elsewhere.
I think the term Sieve may have been misunderstood.

In terms of coding, its much like a sieve for sand. The first part of the statement pulls out the more important stuff (the larger grains of sand/shells) and works it way down as you bring in a finer sieve to sift out the less important stuff(even though all of its important :) ).

I can see where Frank might have a valid point. Placing a false for xxx or yyy will cause the statement looking for if(xxx && YYY) to be false but I really have no clue on how it would be recoded. Frank, might you have ideas on how it could be coded differently?
fmuir
Trader
Posts: 87
Joined: Sun Apr 01, 2012 7:32 am
Location: Seattle, WA, USA

Re: Bob's Biggest Balls Ever

Post by fmuir »

hndymann wrote:
SteveHopwood wrote: Paul might not, but I do. I am not pleased at having the results of a week and a half of coding and coming to grips with some (to me) new coding concepts as 'the sieve'.

If you think you can do better, Frank, do fee free to post your alternative version elsewhere.
I think the term Sieve may have been misunderstood.

In terms of coding, its much like a sieve for sand. The first part of the statement pulls out the more important stuff (the larger grains of sand/shells) and works it way down as you bring in a finer sieve to sift out the less important stuff(even though all of its important :) ).

I can see where Frank might have a valid point. Placing a false for xxx or yyy will cause the statement looking for if(xxx && YYY) to be false but I really have no clue on how it would be recoded. Frank, might you have ideas on how it could be coded differently?
@hndymann,
Thanks for the explanation. If Steve hadn't understood what a 'sieve' or 'collander' was, your explanation is sure timely?!

Regarding your question, I don't currently have any ideas?!. I'll know more after I analyze them through boolean truth tables. Sorry, but I can't elaborate!

Regards,
-Frank
phaholj
Trader
Posts: 25
Joined: Thu Aug 16, 2012 6:25 am

Re: Bob's Biggest Balls Ever

Post by phaholj »

@fmuir
Regarding the logical operators && or || in the order of precedence of logical operators, it is best to use the brackets.
I realized that most of the mistakes i made through the code is the order of precedence.
The most reliable one is the use of brackets.

Phaholj
Thanks
Post Reply

Return to “Automated trading systems”