| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Cross Slopey Bob https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3917 |
Page 4 of 7 |
| Author: | spotdespot [ Thu Nov 13, 2014 10:04 pm ] |
| Post subject: | Cross Slopey Bob |
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. |
|
| Author: | SteveHopwood [ Thu Nov 13, 2014 10:16 pm ] |
| Post subject: | Cross Slopey Bob |
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. |
|
| Author: | spotdespot [ Thu Nov 13, 2014 10:51 pm ] |
| Post subject: | Cross Slopey Bob |
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. |
|
| Author: | SteveHopwood [ Fri Nov 14, 2014 10:20 pm ] |
| Post subject: | Cross Slopey Bob |
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? |
|
| Author: | pips400 [ Fri Nov 14, 2014 10:52 pm ] |
| Post subject: | Cross Slopey Bob |
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 |
|
| Author: | knickalls [ Sat Nov 15, 2014 2:02 pm ] |
| Post subject: | Cross Slopey Bob |
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 |
|
| Author: | SteveHopwood [ Sat Nov 15, 2014 2:19 pm ] |
| Post subject: | Cross Slopey Bob |
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. |
|
| Author: | SteveHopwood [ Sat Nov 15, 2014 4:32 pm ] |
| Post subject: | Cross Slopey Bob |
V 1f is in post 1. Details in the Currency Slope Strength section of post 1. |
|
| Author: | Pedigree [ Sun Nov 16, 2014 12:02 am ] |
| Post subject: | Cross Slopey Bob |
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 |
|
| Author: | SteveHopwood [ Sun Nov 16, 2014 12:38 am ] |
| Post subject: | Cross Slopey Bob |
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. |
|
| All times are UTC | Page 4 of 7 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|