stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Cross Slopey Bob
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3917
Page 1 of 7
Author:  SteveHopwood [ Wed Nov 05, 2014 6:01 pm ]
Post subject:  Cross Slopey Bob

SERIOUS WARNING
  • Most Forex traders lose all their money.
  • Using the robot posted here in trading Forex does not guarantee success.
  • Trading this robot could lead to serious financial loss.
  • Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
  • This is not a set-and-forget ea; there is no such thing and anyone who tries to claim there is, is either stupid or lying. This ea requires frequent manual intervention.
  • At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
  • To trade this robot, you have to understand:
    • How to use EA's.
THIS EA IS EXPERIMENTAL AND IS NOT YET BEING USED ON OUR LIVE ACCOUNTS

Intro

I received this pm from spotdespot a couple of weeks ago:
spotdespot wrote:Hi Steve,

Just came across an idea for a new toy that I am pretty sure hasn't been done before even though it is very simple.

Simple rules:
  • Bob's 240 LWMA on H4 timeframe dictates the trend.
  • We trade whenever the currency slope strength lines cross in agreement with that trend on the timeframe we have chosen.
  • Close the trade on a recross.
I have spent a lot of time working with the CSS and use it daily in my manual trading and it is much misunderstood imo. There have been lots of slopey EA's but none of them have ever done well as the rules for higher timeframes are very different from lower timeframes. Using the +0.8/-0.8 etc is relevant for D1+ but for lower timeframes it doesn't matter - angle or crossing of the slopes is much more relevant than value.

Anyway - I appreciate you are very busy so no worries if you don't have time or think it's a crap idea. I have attached a couple of M15 screen shots showing the potential trades - the MA shown is effectively the H4 240 LWMA displayed on an M15 chart. I have also attached the version of Baluda's indi that I used, although I am guessing you would just use his library.

In the current naming themes it might work well as Cross Slopey Bob :smile:

Cheers,
Dave.
This is what I have coded in Cross Slopey Bob. Take the trade in the direction shown by Bob's trend-detection filter when the primary currency in the pair crosses the CSS value of 0. Close it if there is a recross.

Everything takes place at the close of the candle, so a CSS cross upwards, for example, is: Close(2) < 0; Close(1) > 0.

Other Bob stuff
It is all there along with the usual other stuff, so read the attached user guide for details. You can combine the above with Slope, RSI2 etc. Take your pick. Use different time frames and play to your hearts content. I have included big/round numbers so we can see if they might make a difference; there is no consideration of them in CSB.

What is CurrencySlopeStrength?
CurrencySlopeStrength is the creation of that incomparable coder Baluda. It uses a formula to convert price movement into an indication of strength for each individual currency in the pair.

Take EURUSD as an example:
  • EUR > 0 means the currency is gaining strength.
  • EUR < 0 means the currency is getting weaker.
Even if the value of the strength reading is dropping, the currency is still gaining strength if it is > 0 - just more slowly. Bob uses a wonderful analogy for this. Imagine you get into your car. At first, it is not moving - its 'strength' is zero. You start the engine and press the accelerator. Your car moves forward with increasing speed - it is getting 'stronger'. You see a need to slow down and possibly stop, so you start to depress the brake pedal. The car slows but is still moving forward. It is still getting 'stronger' but the rate at which it is strengthening is dropping. Only once you have stopped and then started moving backwards, the car is 'weakening'.

Swap a currency going up for the car 'strengthening' or down for the car 'weakening' and you will get the idea.

There is a copy of the indicator attached. You do not need it on your charts as the ea has the code subsumed within itself. You will need to ensure that the relevant inputs are the same if you want CSB and the CSS indi to display the same values. CSB's inputs are explained in the attached shell user guide.

CSB versions from 1f onwards have an additional use for CSS, arising from this PM from Tebis:
I tested the CrossSlopeyBob and it can only be succesfull on H4. With crosses on a lower TF we get problems in ranging phases. I checked another and better Entry setup.
We use crosses too, we buy strong against weak currency, but for an entry we wait till a Treshold of "0.6" is reached. Green treshold background for buy, maroon background for sells. This could filters out the ranges and false entries. That means that we get enough power for a trade direction with a minimum limit of the treshold for further strength. Even a Pair like EURGBP shows good results. I would do the analysing for using a specific MM and TimeManagement (Tradinghours) for a timeperiod of a month
There are three inputs that allow us to use this feature:
  • MustBeDiverging: this tells CSB not to trade the cross unless one of the currencies is accelerating away from the other. It works independently of the next two inputs.
  • These two inputs tell CSB how long he can look back in time to detect a tradable cross, and what is your minimum allowable divergence (remember they are independent of MustBeDiverging):
    • MaxBarsBackToCross: this is the furthest back that a cross can be deemed tradable once the divergence between the two currencies meets the minimum threshold. Tebis' reasoning is that they can cross and be diverging, but that divergence may falter and there can be a recross. This input allows the cross time to become established before we enter a trade. The default of 5 is pure guesswork. The currencies must:
      • be diverging.
      • the divergence must be growing:
        • the two 'Difference' readings on the chart are at the close(2) and close(1). Ignore the currency strength values, which are those taken when the cross was detected or CSB had readed the limit of how far back it can look.
    • MinimumDivergence: the smallest acceptable divergence you will accept. The default is 0.6. The minimum divergence that CSB will calculate is zero, so use a negative number to disable this feature. Some examples:
      • gbp = 0.2; usd = -0.2: divergence is only 0.4, so no trade.
      • gbp = 0.2; usd = -0.4: divergence is 0.6, so we can trade.
The TradingTimeFrame input
This must be the time frame you intend to trade as the EA bases all of its calculations on it. This allows you to change time frames on your chart to view different scenarios without disturbing the bot. The downside of getting this wrong is something you will discover to your cost.

Chart screenshots
The EA can take a picture of your chart when it opens or closes a trade. Use this to post pictures here if you suspect that the EA has not behaved as expected. There is a section of inputs just underneath the minimum pips section, with inputs to turn this featureon/ off and to adjust the height and width of the snap. Files are saved with the name "ChartScreenShot" and the ticket number, when the EA opens or closes a trade. Navigate to the files via File/Open Data Folder/MQL4/Files. Remember to delete these files from time to time to avoid clogging up your disk drive.

Keeping track with iHistory
The attached iHistory indi is the indi I use to keep track of my progress and generate the pictures I post here. Copy it in your platform's Indicators folder. Open a chart you do not trade, add the Blank template to it and drag iHistory onto the chart. It works with the information you have in your History tab. Sometimes it needs reloading before showing any information, especially at the weekends.

In conclusion
No idea if this has any legs. SBB might want treating as a basket; the trades might be best left as individual trades. The default M15 time frame might be rubbish. All you can do is play with it and see what happens. Have fun.

:xm:


Setting up your charts
Pay a quick visit to http://www.stevehopwoodforex.com/phpBB3 ... =48&t=3860 and download Art's 'Charts Into Alphabetical Order script'. This script will save you hours of faffing around; instructions for use in the post.

Matters of general interest
Go here to download and run the script that will fill your platform's missing chart history: http://www.stevehopwoodforex.com/phpBB3 ... f=15&t=254
Read this post:
http://www.stevehopwoodforex.com/phpBB3 ... p?f=6&t=78 Newbie traders, read this for inspiration and warning. Those of you who have suffered losses, read it for inspiration.

Masterly summary of hedging: http://www.forexfactory.com/showthread. ... ost4977179

EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here. If you want me to code your EA without sharing, then my fee is $100 payable into my paypal account. I explain why at http://www.stevehopwoodforex.com/phpBB3 ... ?f=15&t=79, at the bottom of the post.

Useful utilities/EA's/scripts -
Author:  spotdespot [ Wed Nov 05, 2014 6:29 pm ]
Post subject:  Cross Slopey Bob

Nice one Steve - I will get it set up now - thanks for this.

I am pretty sure that this will work best as a basket but time will tell.

Cheers,
Dave.

EDIT: Attached one of the screen shots I sent so people can visualize the idea.
Author:  pacinvest [ Wed Nov 05, 2014 8:57 pm ]
Post subject:  Cross Slopey Bob

Wow fellas this has some potential great to see the follow through with Baluda's great work. Need more hours in the day to test all this stuff. Thanks for the opportunity.
Author:  SteveHopwood [ Wed Nov 05, 2014 11:41 pm ]
Post subject:  Cross Slopey Bob

There are some huge oopsies in the code that Dave has pointed out to me. Fixes coming up as soon as he has sent them to me.

:xm:
Author:  SteveHopwood [ Thu Nov 06, 2014 12:00 am ]
Post subject:  Cross Slopey Bob

All the oopsies fixed in v 1a in post 1, sent to me by Dave. Thanks Dave. :clap:

It seems I might have misunderstood the CSS cross thingy as well, so I leave it up to Dave to post an explanation. Once he has posted, I will smugly pinch his explanation and add it to post 1 as though I understood all along. 546 pages down the line, nobody will notice.

:xm:
Author:  spotdespot [ Thu Nov 06, 2014 12:16 am ]
Post subject:  Cross Slopey Bob

SteveHopwood » Thu Nov 06, 2014 1:00 am wrote:All the oopsies fixed in v 1a in post 1, sent to me by Dave. Thanks Dave. :clap:

It seems I might have misunderstood the CSS cross thingy as well, so I leave it up to Dave to post an explanation. Once he has posted, I will smugly pinch his explanation and add it to post 1 as though I understood all along. 546 pages down the line, nobody will notice.

:xm:
Mmmmm - re-reading the PM explanation I sent you I can totally understand why you coded it as you did....the PM explanation was....errrr.....crap.

So ignore the part of the explanation that mentions zero - it didn't convey what was intended.

Simply put:
  • Bob's 240 LWMA on H4 timeframe dictates the trend.
  • We trade whenever the currency slope strength lines cross in agreement with that trend on the timeframe we have chosen.
e.g. if we are trading on the M15 timeframe, EURUSD price is below the 240 LWMA H4, we take a trade when the EUR line crosses down through the USD line and the bar closes.

The trade will close on a cross in the other direction but that is a fail safe really, however it does mean that stops aren't that important. Trade management can be any of the usual suspects including trading this as a basket trader.

Hopefully that is a bit clearer. :oops:

Cheers,
Dave.
Author:  spotdespot [ Thu Nov 06, 2014 12:30 am ]
Post subject:  Cross Slopey Bob

Sorry guys but I overlooked something else in the closure routine so those (3?) people who have downloaded again since the update from Steve - please hold fire and use the latest version whenever Steve posts it.

Essentially the trade closure was not quite right so if you relied on that on a recross of the CSS lines it wouldn't work correctly.

Apologies again.

Dave.
Author:  spotdespot [ Thu Nov 06, 2014 7:32 am ]
Post subject:  Cross Slopey Bob

Clearly quite a few people missed the last post as only 3 people had downloaded the EA at that point - now 24 have :arrrg:

I have attached the amended EA here and will remove it when Steve has had a chance to update post one (EDIT: Now removed).

It seems to be working fine now. I set it up with no TP/SL but use Baluda's MPBM with no comment or magic number to use an adaptive BE and jumping stop (currently just guesswork at AdaptivePipsBreakeven of 10 with a lock of 2 and AdaptiveJumpingPips of 5). It seemed to do all right with this last night.

Anyone who has downloaded before this post will need to do so again.

Image
Author:  SteveHopwood [ Thu Nov 06, 2014 9:17 am ]
Post subject:  Cross Slopey Bob

Fixed version added to post 1 - V1b.

:xm:
Author:  SteveHopwood [ Thu Nov 06, 2014 6:35 pm ]
Post subject:  Cross Slopey Bob

How is it going on your demo, Dave.

I left my M15 entirely alone today, for individual trades to close on a CSS recross. The account is down c. 450 pips. The current position has a lot of open trades and a plus of c. 400 pips. CSB caught the >100 GU sell very nicely.

:xm:
All times are UTC Page 1 of 7