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

Weekly Peaky Bob
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5497
Page 1 of 3
Author:  SteveHopwood [ Thu Jul 26, 2018 3:55 pm ]
Post subject:  Weekly Peaky 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:
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 -

-
Author:  Radar [ Thu Jul 26, 2018 10:19 pm ]
Post subject:  Weekly Peaky Bob

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^)
Author:  SteveHopwood [ Thu Jul 26, 2018 10:34 pm ]
Post subject:  Weekly Peaky Bob

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:
Author:  rapple [ Thu Jul 26, 2018 11:22 pm ]
Post subject:  Weekly Peaky Bob

Have a variant of WPB up and running and attached to the database (http://www.stevehopwoodforex.com/phpBB3 ... 18#p162918) :clap: :clap: :clap:
Author:  DigitalCrypto [ Fri Jul 27, 2018 12:45 am ]
Post subject:  Weekly Peaky Bob

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
Author:  DigitalCrypto [ Fri Jul 27, 2018 12:52 am ]
Post subject:  Weekly Peaky Bob

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
Author:  tomele [ Sun Jul 29, 2018 11:02 pm ]
Post subject:  Weekly Peaky Bob

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
Author:  chrisdk2018 [ Wed Aug 01, 2018 8:07 am ]
Post subject:  Weekly Peaky Bob

I suggest replacing template name SPB with WPB and also changing trade comment to WPB.
Author:  SteveHopwood [ Wed Aug 01, 2018 10:12 am ]
Post subject:  Weekly Peaky Bob

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:
Author:  Radar [ Wed Aug 01, 2018 11:21 am ]
Post subject:  Weekly Peaky Bob

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^)
All times are UTC Page 1 of 3