Cross Slopey Bob

EA's inspired by nanningbob's work here, especially those based on his 240 Moving Average trend detection filter.
Post Reply
User avatar
Pedigree
Trader
Posts: 226
Joined: Thu Apr 11, 2013 12:09 pm
Location: Buckinghamshire, UK

Cross Slopey Bob

Post by Pedigree »

SteveHopwood » Sun Nov 16, 2014 1:38 am wrote: I am doing the best i can here with something I do not actually understand.
And it is greatly appreciated, not just for this but for several other projects.

SteveHopwood wrote: You think you can do better, then go right ahead and try.
You are doing a great job and must remain firmly in the driving seat! Yesterday was my first time reading this thread. I have no idea what the project is all about. My response was just to the last few posts I happened to view. If the suggestion is of no relevance it should simply be regarded as a distraction and ignored.
User avatar
pips400
Trader
Posts: 279
Joined: Tue Jan 01, 2013 9:03 pm

Cross Slopey Bob

Post by pips400 »

FWIW, if considering the slope as well as the difference in the currencies then a further calculation would be needed. I still think the simple expression MathAbs (Cur1 - Cur2) will provide the solution to the first part, the beauty of MathAbs is that it doesn't matter which number is subtracted from which because it will always return a positive number, thus eliminating the need for any other code to determine which value is higher than the other.

The second part of determining slope is more complex and there's probably a few ways to do it, but what comes to mind would be using
1. an array to store the currency strength values (if not alredy), then
2. using something like
if ( Currency1slope[1] - Currency1slope[2] > Currency2slope[1] - Currency2slope[2] ) to compare values
of course further variables and code could be added to give other information depending upon what was trying to be achieved. But the basic idea is using an array to hold historical values then calculations can be made accordingly.

e.g.

Code: Select all

bool extrabuysignal () {
if (MathAbs (Currency1slope[1] - Currency2slope[1]) >= 0.6 && ( Currency1slope[1] - Currency1slope[2] > Currency2slope[1] - Currency2slope[2]  ) )
return true;
else return false;

}
Again apologies if not helpful

Pips400
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 »

pips400 » Sun Nov 16, 2014 9:15 am wrote:FWIW, if considering the slope as well as the difference in the currencies then a further calculation would be needed. I still think the simple expression MathAbs (Cur1 - Cur2) will provide the solution to the first part, the beauty of MathAbs is that it doesn't matter which number is subtracted from which because it will always return a positive number, thus eliminating the need for any other code to determine which value is higher than the other.

The second part of determining slope is more complex and there's probably a few ways to do it, but what comes to mind would be using
1. an array to store the currency strength values (if not alredy), then
2. using something like
if ( Currency1slope[1] - Currency1slope[2] > Currency2slope[1] - Currency2slope[2] ) to compare values
of course further variables and code could be added to give other information depending upon what was trying to be achieved. But the basic idea is using an array to hold historical values then calculations can be made accordingly.

e.g.

Code: Select all

bool extrabuysignal () {
if (MathAbs (Currency1slope[1] - Currency2slope[1]) >= 0.6 && ( Currency1slope[1] - Currency1slope[2] > Currency2slope[1] - Currency2slope[2]  ) )
return true;
else return false;

}
Again apologies if not helpful

Pips400
Most helpful. Thanks very much. :clap:

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

Even more useful than I thought. I had to look at the code again and spotted an error in looking back in time to spot the cross.

: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 1g is in post 1.

I realised what was needed as soon as I thought about it with a clear head. The difference at close(1) needs to be > our chosen minimum, and needs to be > than that of close(2), otherwise the lines might be converging again.

Get an eyeful of this little lot guys:
XAGUSDH1.png
There were a lot of small losers - that is what the latest version is trying to cut out. The pips came from closing the entire position 3 times to ensure a shed-load of profits did not disappear. The final one was on Friday so the EA could be flat for the weekend. The profit represents c. 16% of the account balance on trading for the week. Phenominal.

:xm:
You do not have the required permissions to view the files attached to this post.
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.
alfarunner
Trader
Posts: 10
Joined: Sun Aug 17, 2014 5:47 am

Cross Slopey Bob

Post by alfarunner »

Why do I get these messages with version 1g?
http://www.staffanmalmberg.se/photos/i- ... qSh-X2.jpg

S
spotdespot
Trader
Posts: 768
Joined: Sun Jan 22, 2012 11:38 pm

Cross Slopey Bob

Post by spotdespot »

Have you got ECN broker set to false on an ECN broker? It's the only thing I can think of.
alfarunner
Trader
Posts: 10
Joined: Sun Aug 17, 2014 5:47 am

Cross Slopey Bob

Post by alfarunner »

Do you mean the parameter IsGlobalPrimeOrECNCriminal?
S
spotdespot
Trader
Posts: 768
Joined: Sun Jan 22, 2012 11:38 pm

Cross Slopey Bob

Post by spotdespot »

alfarunner » Mon Nov 17, 2014 2:25 pm wrote:Do you mean the parameter IsGlobalPrimeOrECNCriminal?
S
Yes - that's the one. If you are using Global Prime then I am definitely wrong as it doesn't matter (there are other code checks for Global Prime), but if you are using another ECN broker then this must be set to true.
alfarunner
Trader
Posts: 10
Joined: Sun Aug 17, 2014 5:47 am

Cross Slopey Bob

Post by alfarunner »

Ok, but to me it should be the other way around. For me the parameter says "are you using Global Prime?". So the obvious answer should be false. But I'm not, I use Alpari.
S
Post Reply

Return to “Thingy Bob EA's”