Slopey Peaky Bob

Post Reply
BobbyT
Trader
Posts: 232
Joined: Thu Aug 21, 2014 1:34 am
Location: Seattle

Slopey Peaky Bob

Post by BobbyT »

I've been patiently waiting for the Friday closures to kick in over the past few weeks but it has never come despite having either individual pairs or the entire account in profit.

I finally cracked open the source file and found that

Code: Select all

ShutDownForTheWeekend()
is never called.

Where should this be called...OnTimer?

Cheers,
BobbyT
Procrastination provides exponentially negative returns - BobbyT
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.

Slopey Peaky Bob

Post by SteveHopwood »

BobbyT » Sat Apr 14, 2018 11:43 pm wrote:I've been patiently waiting for the Friday closures to kick in over the past few weeks but it has never come despite having either individual pairs or the entire account in profit.

I finally cracked open the source file and found that

Code: Select all

ShutDownForTheWeekend()
is never called.

Where should this be called...OnTimer?

Cheers,
BobbyT
Nice one BobbyT. Thanks. :clap: :clap: :clap: I will correct this over the weekend. Damn, it is the weekend. I have imbibed at the time of writing this, so please nag if a fix does not appear tomorrow. Imbibing and coding do not mix. Nor do imbibing and promising to code.

: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. 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.
BobbyT
Trader
Posts: 232
Joined: Thu Aug 21, 2014 1:34 am
Location: Seattle

Slopey Peaky Bob

Post by BobbyT »

SteveHopwood » Sat Apr 14, 2018 5:57 pm wrote: Nice one BobbyT. Thanks. :clap: :clap: :clap: I will correct this over the weekend. Damn, it is the weekend. I have imbibed at the time of writing this, so please nag if a fix does not appear tomorrow. Imbibing and coding do not mix. Nor do imbibing and promising to code.

:xm: :rocket:
But imbibing and :party: .....all the damn way :yahoo:

I'll try and remind you on Monday if I don't see an update.

It really does seem everyone is basket trading SPB. Otherwise someone would have mentioned it by now. I'm testing it 'fully' OOTB just for fun. No SL, default TP, no baskets (pairs or global). The only things I have changed is useZeljko = T and converted your limey time settings to hippy settings (PST).

Just completed week three of testing :) Looking much better than the last test which was 100% fully OOTB and killed a 10k demo at GP in a matter of weeks :roll:
You do not have the required permissions to view the files attached to this post.
Procrastination provides exponentially negative returns - BobbyT
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.

Slopey Peaky Bob

Post by SteveHopwood »

The demo account that had an open balance of $500 on the 7th of Feb 2018 has a current balance of $1141. OOTB settings except for:
  • TreatAllPairsAsBasket=true;
  • BasketTargetCash=30;
  • UseForexKiwi=true;
  • FkMinimumMarginPercent=500;
I have taken $1,000 from my main trading account and opened a separate one, purely to trade SPB. I will let you guys know how it gets on.

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

Slopey Peaky Bob

Post by SteveHopwood »

I am posting this here because most of you will be testing out Peaky.

There are new versions of each member of the Slopey family in post 1 of their respective threads, including the shell code. Thomas sent me versions with enhanced screen display for these four:
  • Griddy
  • Buddha
  • Reverse Buddha
  • Peaky
All of them have the FridayCloseAllHour and SaturdayCloseAllHour code implemented. The family all had the inputs and the requisite functionality; I forgot to add the relevant call to the function.

Bloody good job mind. The code was total bollocks and would have been a disaster. :arrrg: :arrrg: :arrrg: :arrrg: :arrrg:

Don't rush the update onto your live account folks. Test it on demo first just in case I have introduced something stupid. Again.

I have not updated the version numbers, so you might want to delete/rename your current version before downloading the update.

Here is how to make the updates yourselves if you want to preserve your hard-coded inputs:
Do a search for "void ShutDownForTheWeekend" (turn off 'Match whole word only').
Copy this over the top of the existing function:

Code: Select all

void ShutDownForTheWeekend()
{

   //Close/delete all trades to be flat for the weekend.
   
   int day = TimeDayOfWeek(TimeLocal() );
   int hour = TimeHour(TimeLocal() );
   bool CloseDelete = false;
   
   //Friday
   if (day == 5)
   {
      if (hour >= FridayCloseAllHour)
         if (TotalCashUpl < MaxAllowableCashLoss)//MaxAllowableCashLoss is a negative number
            CloseDelete = true;
   }//if (day == 5)
 
   //Saturday
   if (day == 6)
   {
      if (hour >= SaturdayCloseAllHour)
         if (TotalCashUpl < MaxAllowableCashLoss)//MaxAllowableCashLoss is a negative number
            CloseDelete = true;
   }//if (day == 6)
   
   if (CloseDelete)
   {
      CloseAllTrades(AllSymbols, AllTrades);
      if (ForceTradeClosure)
         CloseAllTrades(AllSymbols, AllTrades);
      if (ForceTradeClosure)
         CloseAllTrades(AllSymbols, AllTrades);
   }//if (CloseDelete)
      

}//End void ShutDownForTheWeekend()
Do a search for, "void AutoTrading()" to take you to the top of the relevant function. Scroll down a few lines until you get to, "CountTotalsForDisplay();". Somewhere underneath, "CountTotalsForDisplay();" insert this snippet:

Code: Select all

   //Can we shut down for the weekend
   if (TotalOpenTrades > 0)
      ShutDownForTheWeekend();
I have put mine underneath the basket trading code when the EA is a basket trader such as Peaky, or directly underneath in the others.

Thanks for spotting the missing stuff, Bill. :clap: :clap: :clap:

: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. 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.
pandaboy
Trader
Posts: 50
Joined: Wed Nov 13, 2013 2:13 pm

Slopey Peaky Bob

Post by pandaboy »

One week demo. Default settings except for the lot size. I have been following Steve's progress with this EA and thought that he was getting around 1500 pips a week, which made me close the positions manually when it reached around 1700 and the next batch of 300 pips before friday (no open trades).
The weekly swing had more juice in it and could have doubled the pips if i had left it till thursday
(Yeah.. I know). :jump:

Steve, Thank You! :hi:


CHFJPYH1.png
You do not have the required permissions to view the files attached to this post.
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.

Slopey Peaky Bob

Post by SteveHopwood »

V 1g is in post 1 in response to this:
tomele wrote:Hi Steve.

Bill pointed me to that:
Dragonian wrote: Hello Thomas,

I've noticed that on the latest version of SPB the "Tradable Pairs Unrealized P/L" column seems to show all pairs, not just tradable pairs. Or am i missing something?
Looking through the code, I saw that tradingstatus[] is no more used and populated. ChartAutomation() and my view on tradable pairs have ceased to work. Shouldnt both use the new PeakyStatus?

Cheers
Thanks for bringing it up Dragonian. I had not noticed because SPB is doing his thingy on VPS so I have not used the display features.

This is a simple DIY. Do a search for:
"if (WhatToShow=="TradablePairs" && tradingStatus[PairIndex]==untradable)"

and copy this over the top:
if (WhatToShow=="TradablePairs" && (PeakyStatus[PairIndex]==peakylonguntradable || PeakyStatus[PairIndex]==peakyshortuntradable || HtfSsStatus[PairIndex] == white))

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

Slopey Peaky Bob

Post by SteveHopwood »

Newcomers might not understand our references to 'Peaky' here, so I have written a pdf with a full explanation: http://www.stevehopwoodforex.com/phpBB3 ... 102&t=5443

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

Weekend Closures

Post by Radar »

Hey Steve,

I had a basket close for over $200.00 on Saturday morning, (MaxAllowableCashLoss is set to -20), so had a look at the code, and I think I found the culprit...

Code: Select all

   if (TotalCashUpl < MaxAllowableCashLoss)//MaxAllowableCashLoss is a negative number
   CloseDelete = true;
I've changed the code to...

Code: Select all

   if (TotalCashUpl < 0)
   {
	if (TotalCashUpl >= MaxAllowableCashLoss)//MaxAllowableCashLoss is a negative number
        CloseDelete = true;
   } // End if (TotalCashUpl < 0)
It sounds crazy to say it, but I hope I have another bad week, to test if the change works as desired ;)

Take care,
&
Have fun! =8^)
Check out my new, (well, old now), manual trade & automatic scale-in manager,
StackManV2
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.

Slopey Peaky Bob

Post by SteveHopwood »

Thanks radar.

if (TotalCashUpl >= MaxAllowableCashLoss) was the original code and I changed it without thinking about it properly.

I will make the necessary changes tomorrow.

: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. 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.
Post Reply

Return to “Super Slope EA's”