Weekly Peaky Bob

EA's inspired by nanningbob's work here, especially those based on his 240 Moving Average trend detection filter.
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Weekly Peaky Bob

Post by SteveHopwood »

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:
MAKE SURE YOU READ THIS POST http://www.stevehopwoodforex.com/phpBB3 ... 41#p111241 There was a Forex bloodbath on Jan 15th 2015 that you need to know about.

This is Slopey Peaky Bob but with the HTF trading direction determined by the relationship of the previous day instead of SuperSlope.:
Directional Rules
===============
1) If yesterday closed above last week's close then trade long. If yesterday closed below last week's close then trade short.

2) If trading Monday then last Friday's close obviously uses the prior week's close for direction.
===============

DigitalCrypto sent both the idea and the cod. Brilliant, David. :clap: :clap: :clap: :clap: :clap: :clap:

Here is the PM that David sent me:
DigitalCrypto wrote:Steve,

Just a heads up.

In an attempt to reduce some basket draw downs I made an experimental mod to SPB that recalculates the trade direction based on the daily/weekly close instead of Superslope. This is because SPB will add to losing positions on a weekly pullback which leads us to where we are today with baskets hanging in the balance. While draw downs can't be stopped the trend change can be seen sooner than waiting for SS calculations.

Directional Rules
===============
1) If yesterday closed above last week's close then trade longs. If yesterday closed below last week's close then trade short.

2) If trading Monday then last Friday's close obviously uses the prior week's close for direction.
===============


It's still too early to gauge the success but the negative positions so far have been greatly reduced leaving the basket sitting mostly in profits.

If it looks like this thing has legs I can post it up. Or if you want to do it then I am totally fine with that. At least I know it's done correctly. Feel free to name it.

I'm attaching my code for ReadIndicatorValues() for you. I'm 100% positive you have a better way to do this.

-David

Code: Select all

//Read the HTF SS at the open of each candle
      if (OldHtfIndiReadBarTime[PairIndex] != iTime(symbol, HtfSsTimeFrame, 0) )
      { 
         OldHtfIndiReadBarTime[PairIndex] = iTime(symbol, HtfSsTimeFrame, 0);
         
         
         
         //Read SuperSlope at the open of each new trading time frame candle
         //val = GetSuperSlope(symbol, HtfSsTimeFrame,HtfSsSlopeMAPeriod,HtfSsSlopeATRPeriod,1);
        
         //Changed by tomele. Many thanks Thomas.
         //Set the colours
         HtfSsStatus[PairIndex] = white;
         
         //if (val > 0)  //buy
         //   if (val - HtfSsDifferenceThreshold/2 > 0) //blue
         //      HtfSsStatus[PairIndex] = blue;

         //if (val < 0)  //sell
         //   if (val + HtfSsDifferenceThreshold/2 < 0) //red
         //      HtfSsStatus[PairIndex] = red;
   
         //A more simple way to get trend direction
         if (iClose(symbol,PERIOD_D1,1) > iClose(symbol,PERIOD_W1, 1)) 
            HtfSsStatus[PairIndex] = blue;
         
         //If we look for signal on Monday use Friday's
         if (iClose(symbol,PERIOD_D1,1) == iClose(symbol,PERIOD_W1, 1))
            if (iClose(symbol,PERIOD_D1,1) > iClose(symbol,PERIOD_W1, 2))
               HtfSsStatus[PairIndex] = blue;
                 
         //Going down
         if (iClose(symbol,PERIOD_D1,1) < iClose(symbol,PERIOD_W1, 1)) 
            HtfSsStatus[PairIndex] = red; 
         
         //If we look for signal on Monday use Friday's
         if (iClose(symbol,PERIOD_D1,1) == iClose(symbol,PERIOD_W1, 1))
            if (iClose(symbol,PERIOD_D1,1) < iClose(symbol,PERIOD_W1, 2))
               HtfSsStatus[PairIndex] = red;
               
      }//if (OldHtfIndiReadBarTime != iTime(symbol, HtfSsTimeFrame, 0) )
Everything else is SPB with the display showing "TD" for "Trading Direction." Go to http://www.stevehopwoodforex.com/phpBB3 ... 59#p159559 for the user guide; simply ignore the stuff about SuperSlope.


:xm: :rocket:

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 -

-
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. [email protected] 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.
Radar
Trader
Posts: 437
Joined: Fri Mar 23, 2012 5:39 pm
Location: Round the bend ;)

Weekly Peaky Bob

Post by Radar »

Sweeeet! :)
Will throw it on my demo on the weekend ;) It'll be sharing space with three variations of SPB, though.

Take care,
&
Have fun!
Radar =8^)
Check out my new, (well, old now), manual trade & automatic scale-in manager,
StackManV2
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Weekly Peaky Bob

Post by SteveHopwood »

Radar » Thu Jul 26, 2018 10:19 pm wrote:Sweeeet! :)
Will throw it on my demo on the weekend ;) It'll be sharing space with three variations of SPB, though.

Take care,
&
Have fun!
Radar =8^)
I know the feeling.

:xm: :rocket:
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. [email protected] 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
rapple
Trader
Posts: 277
Joined: Fri Feb 21, 2014 10:56 pm
Location: Sydney, Australia

Weekly Peaky Bob

Post by rapple »

Have a variant of WPB up and running and attached to the database (http://www.stevehopwoodforex.com/phpBB3 ... 18#p162918) :clap: :clap: :clap:
DigitalCrypto
Trader
Posts: 237
Joined: Tue Feb 24, 2015 4:38 am

Weekly Peaky Bob

Post by DigitalCrypto »

Thanks for doing this Steve. Much appreciated.

I've been experimenting with a 20 week ATR and multiple take profits. I'm looking forward to see how WPB plays with SPB. Interesting times ahead gentlemen :D
DigitalCrypto
Trader
Posts: 237
Joined: Tue Feb 24, 2015 4:38 am

Weekly Peaky Bob

Post by DigitalCrypto »

I forgot to mention this earlier. Just a quick heads up for testers. Around line 631. The template line should read like so:

Code: Select all

ChartSaveTemplate(0,StringFormat("ZZT2MTPL-%s-%s-%s-%d-%d-%d-%d","SHF","WPB","MULSYM",Period(),AccountNumber(),TimeCurrent(),MagicNumber));
Note the WPB vs SPB.

This will keep these results separate from Slopey Peaky Bob.

-David
User avatar
tomele
Administrator
Posts: 1166
Joined: Tue May 17, 2016 3:40 pm
Location: Germany, Forest of Odes, Defending the Limes

Weekly Peaky Bob

Post by tomele »

Hi @all.

I have changed the file in post 1 after Richard (@rapple) pointed me to it. This bot is not SPB, it is a new bot named WPB, but still had the database name of SPB. Now, after 119 downloads and uploading results of this bot under the label of SPB, the harm has been done and needs to be confined. Otherwise you will not be able to ever distinguish this bot from SPB and the SPB results will be corrupted.

First, all testers please update to the new version in post 1 with the right name for the database immediately. Second, all testers please contact me telling the account and magic number used for submitting results of this bot. I will try to manually correct the database.

Thank you for cooperating. It is in your own interest.

Cheers
Thomas
Happy pippin, Thomas :-BD

It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so.
(Mark Twain)

Keep the coder going: Donate
chrisdk2018
Trader
Posts: 37
Joined: Tue Jun 07, 2016 10:18 am

Weekly Peaky Bob

Post by chrisdk2018 »

I suggest replacing template name SPB with WPB and also changing trade comment to WPB.
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Weekly Peaky Bob

Post by SteveHopwood »

chrisdk2018 » Wed Aug 01, 2018 8:07 am wrote:I suggest replacing template name SPB with WPB and also changing trade comment to WPB.
I have made those the defaults and uploaded to post 1. I have also reset the version number to V1.

None of this matters a hoot, so don't bother downloading the update. It is just a bit of tidying up.

:xm: :rocket:
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. [email protected] 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.
Radar
Trader
Posts: 437
Joined: Fri Mar 23, 2012 5:39 pm
Location: Round the bend ;)

Weekly Peaky Bob

Post by Radar »

First thing I did before copying the source to empty4 was to search & replace SPB with WPB...
Pretty obvious thing to do after reading David's post from Friday.

Have fun, folks! =8^)
Check out my new, (well, old now), manual trade & automatic scale-in manager,
StackManV2
Post Reply

Return to “Thingy Bob EA's”