Slopey Peaky Bob

Post Reply
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 »

Experimental V 1w is in post 1.

The Recovery code was not quite right - and I am still not certain.

I had recovery to kick in at 4 trades, with at least 1 of them being a loser. What was happening was that the 4th pending was filling and was instantly a loser because of the spread, so SPB was closing the trades immediately.

I have changed the name of one input and added another. From the updated user guide:
  • TradesToStartLookingForRecovery: the number of market trades that need to be open before Slopeyconsiders the position to be in need of Recovery.
  • MinimumLosersToTriggerRecovery: we only need Recovery if we have some losers. This input specifies the number of losing trades to trigger looking to close out at breakeven.
The default TradesToStartLookingForRecovery is 6.

The default MinimumLosersToTriggerRecovery is 2.

Let's see if this makes the function work better.

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

What a day.

Those of us aficionadas of SPB have been stuck in DD for weeks. I still am, but at about a third of what it was at the start of the week.

The sudden strengthening of the GBP did me a lot of favours today. I was still stuck with GJ buys at the start of the week that were about -$1,200 into DD. Absolutely no danger to the account - see my firm conclusions re lot size versus size of account in post 1 - but enough to prevent me taking any further trades.

Here is what happened today:
GBPJPYH1.png
All the stuff on the chart veils the extent of the rise. Here is the same chart drawn out so you can see some detail at the end.
GBPJPYH1 steep rise.png
The steep rise started c. 2.00 pm UK time. As it continued, I gradually offset numbers of winners from the bottom of the heap of umpteen trades against vast losers at the top. This freed up lots of equity and margin.

I had also closed out a couple of other groups of trades at BE plus a few bucks.

It took a few hours but I eventually arrived at a point where I could close those GJ trades at a small loss and still be in overall profit for the day. OK, so I closed the GJ trades at nearly -$60, but bear in mind where they had once been - and I came out in profit over the day.

Now I can easily trade again without worrying about umpteen GJ trades continuing to go against me. No, the account was never in danger as the margin level percent never dropped below 750 but I have learned caution. I do not want it to drop below 1,000%, so the worst was not comfortable.

I still have a number of SPB pair trades deeply into DD. I am dealing with them mostly in the same way I described a few posts up - unless there are only a couple of trades open and the swap is positive.

I am starting to fall in love with the Super Slope D1, H4, H1 combo. I am thinking seriously about adding the two extra SS time frames here.

:xm: :rocket:
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. 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.
trader689
Trader
Posts: 674
Joined: Thu Nov 17, 2011 12:53 am

Slopey Peaky Bob

Post by trader689 »

hey Steve

brilliant, thanks for the update and can second that feedback on my SPB demo's dd after the GBP rise.
Also addition of the two SS timeframes sounds like it would be an exciting development :good:

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

For the codeslingers

Post by SteveHopwood »

Those of you trying the Experimental version and Recovery already know that it is not working.

I returned to the code and found lots that was wrong. Here is a fully commented copy of the updated code. Would you codeslingers run your eyes over it, please, and see if you can spot anything obviously wrong? THe function is called just after the call to CountOpenTrades(symbol, PairIndex), so the bot has a picture of the open position.

Code: Select all

bool HaveWeHitRecoveryTarget(string symbol, int type)
{
   //Calculate the Recovery target and close the trades if the target price is reached.
   
   GetBasics(symbol);//Probably not needed, but no harm to check.
   
   int cc = 0;
   RecoveryTargetPrice = 0;
   
   if (type == OP_BUY)
   {
      //Add together the price of all the market trades
      for (cc = 0; cc < ArraySize(BuyTickets); cc++)
      {
         if (!BetterOrderSelect(BuyTickets[cc], SELECT_BY_TICKET, MODE_TRADES) )
            continue;//Just in case
         
         //Buy ticket numbers are sorted in ascending order at the end of CountOpenTrades()
         if (cc == 0)//Set RecoveryTargetPrice first time around the loop
            RecoveryTargetPrice = OrderOpenPrice();
         else
            RecoveryTargetPrice+= OrderOpenPrice();//Add the next order price to RecoveryTargetPrice
      }//for (cc = 0; cc < ArraySize(BuyTickets); cc++)
      
      //Divide this figure by the ticket array size to arrivc at the breakeven price
      RecoveryTargetPrice/= ArraySize(BuyTickets);
      RecoveryTargetPrice+= (RecoveryProfitP / factor);//Add the lock-in profit pips
      
      //Has the market reached this target? Using bid because buys close at the Bid
      if (bid >= RecoveryTargetPrice)
         return(true);
   
   }//if (type == OP_BUY)

   if (type == OP_SELL)
   {
      //Add together the price of all the market trades
      for (cc = 0; cc < ArraySize(SellTickets); cc++)
      {
         if (!BetterOrderSelect(SellTickets[cc], SELECT_BY_TICKET, MODE_TRADES) )
            continue;//Just in case
         
         //Sell ticket numbers are sorted in descending order at the end of CountOpenTrades()
         if (cc == 0)
            RecoveryTargetPrice = OrderOpenPrice();
         else   
            RecoveryTargetPrice+= OrderOpenPrice();//Subtract the next order price from RecoveryTargetPrice
      }//for (cc = 0; cc < ArraySize(BuyTickets); cc++)
      
      //Divide this figure by the ticket array size to arrivc at the breakeven price
      RecoveryTargetPrice/= ArraySize(SellTickets);
      RecoveryTargetPrice-= (RecoveryProfitP / factor);//Add the lock-in profit pips
      
      //Has the market reached this target? Using ask because sells close at the Ask
      if (ask <= RecoveryTargetPrice)
         return(true);
   
   }//if (type == OP_SELL)
   

   //Got this far, so no closure
   return(false);

}//bool HaveWeHitRecoveryTarget(string symbol, int type)
: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.
FXTrucker
Trader
Posts: 45
Joined: Wed Dec 07, 2011 4:26 am

Slopey Peaky Bob

Post by FXTrucker »

First off... Thanks to Steve , Bob and all the others who have done so much to make this forum such a great resource. I have been following SPB for some time and am still reviewing the program and re reading the forum posts.

I am not a full fledged codeslinger but I have used your programs as a framework to code EAS and INDIS.
Most of what I know about Mq4 I have learned from them.

It looks like you recovery call should work as intended to me
There are 10 kinds of people who understand binary. Those who do and those who don't.
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 »

FXTrucker » Thu Sep 06, 2018 12:39 am wrote:First off... Thanks to Steve , Bob and all the others who have done so much to make this forum such a great resource. I have been following SPB for some time and am still reviewing the program and re reading the forum posts.

I am not a full fledged codeslinger but I have used your programs as a framework to code EAS and INDIS.
Most of what I know about Mq4 I have learned from them.

It looks like you recovery call should work as intended to me
Thanks for looking.

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

Those of you managing your trades manually, check out slipshod's post at http://www.stevehopwoodforex.com/phpBB3 ... 796#p11796

Eherenmat (Mat) has sent me a version of HGCB with support/resistance added and I am just hacking his code to see how it works, so I can add it to SCB. Mat is a great fan of slipshod's indi.

: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.
barry
Trader
Posts: 81
Joined: Thu Mar 01, 2012 5:12 am

Slopey Peaky Bob

Post by barry »

Does anyone here keep a log of changes made to the various updates of SPB? I left a version 1o running, and I have a version 1t and a version 1v running. The newer versions are doing better, but now I don't know whether to attribute that better performance to improvements to the EA or the setfile, or reduced leverage or the luck of starting at a time more suited to the EA. Any ideas?
I know it's generally good practice to keep up with the updates, but the v1o was doing so well for such a long time that I wanted to leave it undisturbed.
User avatar
Priyesh
Trader
Posts: 21
Joined: Thu May 09, 2013 5:24 pm

Slopey Peaky Bob

Post by Priyesh »

Has anyone else noticed that the SPB dashboard is not refreshing?
I have checked all settings and including EventTimeIntervalSecond = 1
BTW I am running the EA on Eaymon's VPS server. and a GP live account.

Regards
Priyesh
luke
Trader
Posts: 17
Joined: Fri Aug 14, 2015 7:03 am

Slopey Peaky Bob

Post by luke »

Priyesh » Mon Sep 17, 2018 12:12 am wrote:Has anyone else noticed that the SPB dashboard is not refreshing?
I have checked all settings and including EventTimeIntervalSecond = 1
BTW I am running the EA on Eaymon's VPS server. and a GP live account.
make sure auto trading is enabled
Post Reply

Return to “Super Slope EA's”