Cross Slopey Bob

EA's inspired by nanningbob's work here, especially those based on his 240 Moving Average trend detection filter.
spotdespot
Trader
Posts: 768
Joined: Sun Jan 22, 2012 11:38 pm

Cross Slopey Bob

Post by spotdespot »

SteveHopwood » Thu Nov 13, 2014 10:55 pm wrote:My demo is up just over 10% on its starting balance.

The problem I am seeing is that there are lots of little losers closed that hit the bottom line, then a decent run allows me to close to overcome the losers. The result is that I only move ahead very slowly, and that one day the losers might overwhelm the winners and wipe out all of the profits.

Not sure this bot has a future.

:xm:
Sadly I am coming to the same conclusion. One of those that looks like it should work but when it comes down to actually turning it loose it fails to live up to expectation. Sorry you wasted your time on this one Steve. :uff:
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.

Cross Slopey Bob

Post by SteveHopwood »

spotdespot » Thu Nov 13, 2014 10:04 pm wrote:
Sadly I am coming to the same conclusion. One of those that looks like it should work but when it comes down to actually turning it loose it fails to live up to expectation. Sorry you wasted your time on this one Steve. :uff:
Not to worry. It was worth a try - especially compared with some of the crap custom abortion infested thingies I am usually called upon to code. I will have been testing the M15 this week. I will try the H1 next week and the H4 the week after that. If neither proves successful, I will knock it on the head.

: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.
spotdespot
Trader
Posts: 768
Joined: Sun Jan 22, 2012 11:38 pm

Cross Slopey Bob

Post by spotdespot »

SteveHopwood » Thu Nov 13, 2014 11:16 pm wrote: Not to worry. It was worth a try - especially compared with some of the crap custom abortion infested thingies I am usually called upon to code. I will have been testing the M15 this week. I will try the H1 next week and the H4 the week after that. If neither proves successful, I will knock it on the head.

:xm:
I'll give it a couple more weeks too. I think the way the CSS crossovers work above H1 will be worse as they take such a long time to cross back - you would need some profit locking in place I think.

Cheers,
Dave.
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.

Cross Slopey Bob

Post by SteveHopwood »

Ok mathemeticians, I need a formula.

Please bear in mind that I am a mathematics idiot. Total idiot. I can do basic arithmetic and that is it. I need the big print Janet and John version.

Tebis has pm'd me with an interesting idea. Only take the trade when the threshold of the pairs is 0.6 or above.

Now, I get the threshold - it is the difference between the relative strengths of the pairs. Imagine gbp is strong and usd is weak. gbp is +0.3; usd is -0.3; the difference between them is 0.6 so we can trade.

On the face of it, the calculation is easy. We subtract the smaller number from the bigger. Yet here, we are subtracting a minus number, so we are effectively subtracting 0.3 from 0.3 resulting in zero. Moron that I am, even I get that.

So, what is the formula that will cope with all eventualities?

: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.
User avatar
pips400
Trader
Posts: 279
Joined: Tue Jan 01, 2013 9:03 pm

Cross Slopey Bob

Post by pips400 »

SteveHopwood » Fri Nov 14, 2014 10:20 pm wrote:Ok mathemeticians, I need a formula.

Please bear in mind that I am a mathematics idiot. Total idiot. I can do basic arithmetic and that is it. I need the big print Janet and John version.

Tebis has pm'd me with an interesting idea. Only take the trade when the threshold of the pairs is 0.6 or above.

Now, I get the threshold - it is the difference between the relative strengths of the pairs. Imagine gbp is strong and usd is weak. gbp is +0.3; usd is -0.3; the difference between them is 0.6 so we can trade.

On the face of it, the calculation is easy. We subtract the smaller number from the bigger. Yet here, we are subtracting a minus number, so we are effectively subtracting 0.3 from 0.3 resulting in zero. Moron that I am, even I get that.

So, what is the formula that will cope with all eventualities?

:xm:
Hi Steve, if I have understood your question correctly, then there are a couple of stages
First is the substraction one value from the other, the minus sign will not matter because of stage two, and it won't matter which way round the numbers are subtracted, because in stage two, we use the MathAbs MQL function which will return the modulus or absolute value.

e.g. MathAbs (double1 - double2) == MathAbs (double2 - double1)

If you substract a negative number it is the same as adding e.g. x - -y = x+y hope that makes sense, and apologies if I've missed the point.

Have a great weekend

Pips400
knickalls
Posts: 3
Joined: Tue Nov 15, 2011 10:00 pm

Cross Slopey Bob

Post by knickalls »

pips400 » Fri Nov 14, 2014 4:52 pm wrote:
SteveHopwood » Fri Nov 14, 2014 10:20 pm wrote:Ok mathemeticians, I need a formula.

Please bear in mind that I am a mathematics idiot. Total idiot. I can do basic arithmetic and that is it. I need the big print Janet and John version.

Tebis has pm'd me with an interesting idea. Only take the trade when the threshold of the pairs is 0.6 or above.

Now, I get the threshold - it is the difference between the relative strengths of the pairs. Imagine gbp is strong and usd is weak. gbp is +0.3; usd is -0.3; the difference between them is 0.6 so we can trade.

On the face of it, the calculation is easy. We subtract the smaller number from the bigger. Yet here, we are subtracting a minus number, so we are effectively subtracting 0.3 from 0.3 resulting in zero. Moron that I am, even I get that.

So, what is the formula that will cope with all eventualities?

:xm:
Hi Steve, if I have understood your question correctly, then there are a couple of stages
First is the substraction one value from the other, the minus sign will not matter because of stage two, and it won't matter which way round the numbers are subtracted, because in stage two, we use the MathAbs MQL function which will return the modulus or absolute value.

e.g. MathAbs (double1 - double2) == MathAbs (double2 - double1)

If you substract a negative number it is the same as adding e.g. x - -y = x+y hope that makes sense, and apologies if I've missed the point.

Have a great weekend

Pips400

Steve,

If you are still in need of this, and in case Pips400's comments didn't give you a solution, I have this:

I suspect, and would hope, there is a simpler way, but I haven't been able to work it out. What I have on offer here is still not overly complex. You need two different formulas depending upon whether or not the two variable values are on the same side of zero, or not. If they are, use one formula; if they are not, use the other formula. I am not much of a coder, so I expect that my syntax is incorrect, but I think it's close enough to understand what I'm trying to convey.

If((double1>0 && double2>0) || (double1<0 && double2<0)) {

MathAbs(double1-double2)

}

Else {

MathAbs(double1)+MathAbs(double1)

}

Hope this helps,

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

Cross Slopey Bob

Post by SteveHopwood »

Thanks guys.

I realised how simple it really is as soon as I thought about it properly. All I have to do is subtract the smaller number from the larger one because the difference in the relative strengths is always going to be positive.

Curr1 = -2
Curr2 = 4
Difference = 6

Curr1 = 4
Curr2 = -2
Difference = 6

Curr1 = -4
Curr2 = -2
Difference = 2

So the code CurrDiff = MathAbs(CurrVal1[1] - CurrVal2[1]); does the job.

I am coding in using the difference now and will post it soon.

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

Cross Slopey Bob

Post by SteveHopwood »

V 1f is in post 1. Details in the Currency Slope Strength section of post 1.

: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.
User avatar
Pedigree
Trader
Posts: 226
Joined: Thu Apr 11, 2013 12:09 pm
Location: Buckinghamshire, UK

Cross Slopey Bob

Post by Pedigree »

SteveHopwood » Sat Nov 15, 2014 3:19 pm wrote:Thanks guys.

I realised how simple it really is as soon as I thought about it properly. All I have to do is subtract the smaller number from the larger one because the difference in the relative strengths is always going to be positive.

Curr1 = -2
Curr2 = 4
Difference = 6

Curr1 = 4
Curr2 = -2
Difference = 6

Curr1 = -4
Curr2 = -2
Difference = 2

So the code CurrDiff = MathAbs(CurrVal1[1] - CurrVal2[1]); does the job.

I am coding in using the difference now and will post it soon.

:xm:
I'm not sure this idea is correct Steve. MathAbs may not serve well here because strength is a vector. It has both Magnitude and Direction, and one is just as important as the other. MathAbs takes out the direction aspect, but in subtracting, you absolutely need to know in what direction the net effect is. The subtraction should be purely mathematical with a possibility of a negative value depicting a SELL bias.

In any case, the difference of two strengths simply offers you back the slope value of the pair in question which is always either positive or negative, so why don't you just use that instead of going through the rigors of subtracting strengths? Baluda explains it well in this post http://www.stevehopwoodforex.com/phpBB3 ... 021#p18021
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.

Cross Slopey Bob

Post by SteveHopwood »

Pedigree » Sun Nov 16, 2014 12:02 am wrote: I'm not sure this idea is correct Steve. MathAbs may not serve well here because strength is a vector. It has both Magnitude and Direction, and one is just as important as the other. MathAbs takes out the direction aspect, but in subtracting, you absolutely need to know in what direction the net effect is. The subtraction should be purely mathematical with a possibility of a negative value depicting a SELL bias.

In any case, the difference of two strengths simply offers you back the slope value of the pair in question which is always either positive or negative, so why don't you just use that instead of going through the rigors of subtracting strengths? Baluda explains it well in this post http://www.stevehopwoodforex.com/phpBB3 ... 021#p18021
I am doing the best i can here with something I do not actually understand. You think you can do better, then go right ahead and try.
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.
Post Reply

Return to “Thingy Bob EA's”