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

Slopey Peaky Bob
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5389
Page 31 of 84
Author:  SteveHopwood [ Thu Jul 12, 2018 3:07 pm ]
Post subject:  Slopey Peaky Bob

V 1t is in post 1. You only need it if you are using the dynamic basket take profit feature (UseDynamicCashTP=true). If not, hang on because I have had a couple of ideas that I shall implement into the next update.

A happy thingy happened earlier, to expose a flaw in the Friday basket TP calculations we added over the weekend. My basket cash TP is $90 but the position was at +$156. I used the Nuclear Options Script to shut down and turned to the VPS to investigate.

There was no basket cash TP being displayed on the chart - something that can only happen if the target is zero. This is what I have fixed.

Simple DIY folks, because a couple of variables needed initialising inside OnInit(). o to the top of the code and do a search for "if (MinimiseChartsAfterOpening)"

Inset this code above if (MinimiseChartsAfterOpening)

Code: Select all

   OriginalBasketTargetCash=BasketTargetCash;
   OriginalBasketTargetPips=BasketTargetPips;   
so that the code looks something like this:

Code: Select all

   OriginalBasketTargetCash=BasketTargetCash;
   OriginalBasketTargetPips=BasketTargetPips;   
      

   if (MinimiseChartsAfterOpening)
      ShrinkCharts();

   
   //Set up the trading hours
   tradingHoursDisplay=tradingHours;//For display
   initTradingHours();//Sets up the trading hours array
:xm: :rocket:
Author:  SteveHopwood [ Thu Jul 12, 2018 3:15 pm ]
Post subject:  Slopey Peaky Bob

DigitalCrypto » Thu Jul 12, 2018 2:08 pm wrote:Steve,

Regarding the duplicate order timestamp FIFO thingy. The fix I sent you works. It did give two (incoming mail) notices but threw no errors or alerts. All orders and trades closed on Oanda via SPB and new grids put back up on valid trading pairs.

- David
Thanks for reminding me about this, David. I had forgotten. I will include it in the coming update.

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

I noticed in the SendGrid functions there's a short Sleep(500) between orders. Since SPB operates on ticks it is possible that multiple orders can be sent per second.

However, increasing that value to Sleep(1000) would force SPB to wait 1 full second to populate a grid and create unique timestamps on every order for FIFO.

- David
Easy DIY fix. Do a search and replace (Ctrl+H) thus:
Capture.PNG
This will replace two instances of Sleep(500).

:xm: :rocket:
Author:  Zennor [ Thu Jul 12, 2018 6:08 pm ]
Post subject:  Slopey Peaky Bob

Small live account had a record breaking 6 baskets closed today which was sweet.

Demo account has also done well with 2 baskets closing after the recent CAD drawdown. Onwards and upwards.
SPB01.jpg
Demo Account
Author:  SteveHopwood [ Thu Jul 12, 2018 6:42 pm ]
Post subject:  Slopey Peaky Bob

Zennor » Thu Jul 12, 2018 6:08 pm wrote:Small live account had a record breaking 6 baskets closed today which was sweet.
:clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!:
Author:  Zennor [ Thu Jul 12, 2018 7:07 pm ]
Post subject:  Slopey Peaky Bob

Now some of you may be wondering how the hell did I get to get 6 Baskets closed in one day.

Well after a few months of Demo testing I pulled all the figures from the closed trades and started my analysis to see what was working and what was not. l noticed that the pairs with the higher ATR's were doing all the heavy lifting and were producing far far more pips and thus money than the low ATR pairs. Most of these pairs that were producing the most were at ATR of 100 - 140 so I simply split the difference at 120. SPB had a default of a 30 pip grid so I divided that into 120 which gave a figure of 4 to put into the EA as a divisor for the daily grid for all pairs.

So I recently set my small live account to take smaller profits, all pairs Grids were set at a 25% percent of the 20 day ATR and all grids were immediately executed upon a signal.

Now I am not suggesting for one tiny second that this is the way to go but it's just something that I'm experimenting with at the moment both on live and demo.
Author:  Gertje [ Thu Jul 12, 2018 7:10 pm ]
Post subject:  Slopey Peaky Bob

Zennor » Thu Jul 12, 2018 7:07 pm wrote:Now some of you may be wondering how the hell did I get to get 6 Baskets closed in one day.

Well after a few months of Demo testing I pulled all the figures from the closed trades and started my analysis to see what was working and what was not. l noticed that the pairs with the higher ATR's were doing all the heavy lifting and were producing far far more pips and thus money than the low ATR pairs. Most of these pairs that were producing the most were at ATR of 100 - 140 so I simply split the difference at 120. SPB had a default of a 30 pip grid so I divided that into 120 which gave a figure of 4 to put into the EA as a divisor for the daily grid for all pairs.

So I recently set my small live account to take smaller profits, all pairs Grids were set at a 25% percent of the 20 day ATR and all grids were immediately executed upon a signal.

Now I am not suggesting for one tiny second that this is the way to go but it's just something that I'm experimenting with at the moment both on live and demo.
Hehehehe :jump:
You beat me to it.
Just set it up similarly last week as I thought that a fixed grid-distance would not be in favor of low volatile pairs.
:good:
Author:  Zennor [ Thu Jul 12, 2018 7:33 pm ]
Post subject:  Slopey Peaky Bob

Gertje » Thu Jul 12, 2018 8:10 pm wrote:
Zennor » Thu Jul 12, 2018 7:07 pm wrote: Now I am not suggesting for one tiny second that this is the way to go but it's just something that I'm experimenting with at the moment both on live and demo.
Hehehehe :jump:
You beat me to it.
Just set it up similarly last week as I thought that a fixed grid-distance would not be in favor of low volatile pairs.
:good:
Gertje good to know that you are also thinking along the same lines. I have also used the positive swap feature to reduce the number of trades as having smaller grids would hugely increase the number of trades. If that works as it has then I'll keep it like that but due to the feature-rich nature of the EA there is more I can do to further reduce the number of trades should it warrant it.
Author:  Gertje [ Thu Jul 12, 2018 7:37 pm ]
Post subject:  Slopey Peaky Bob

Zennor » Thu Jul 12, 2018 7:33 pm wrote: Gertje good to know that you are also thinking along the same lines. I have also used the positive swap feature to reduce the number of trades as having smaller grids would hugely increase the number of trades. If that works as it has then I'll keep it like that but due to the feature-rich nature of the EA there is more I can do to further reduce the number of trades should it warrant it.
As the baskets will seldom run overnight, I see no point in positive swap limiting.
Nor with PoS. Even with the 1Y demo, swap is less than commission overall, with trades averaging over 10days in running time.

Then “trade currency twice”and such seems more appropiate.

Time will tell, exciting times ahead!
:!!:
Author:  Baluda [ Thu Jul 12, 2018 8:18 pm ]
Post subject:  Slopey Peaky Bob

After testing SPB with various settings for several weeks I built up enough confidence to let SPB loose on my live account using Sam's (Murphy Man) set file. It has been only twelve (12!) market days and my account is up over €1,000. A big thank you goes out to Steve who makes it all possible.

I do not know how many money is traded by SPB as a total of the balances of all live accounts it is trading, but it is probably more than we all think. Which means SPB is a serious and important EA. Maybe it is time to lock its feature set. All changes and additions to the code can be done to a new 'branch' which then will only be added to the main SPB after debugging and forward testing.

That said, I am missing a 'UseBasketTrailingStopPercentage' setting and the accompanying 'BasketTrailingStopStartValuePercent' and 'BasketTrailingStopGapValuePercent'. The settings I would like to set these to are 'true', '0.5%' and '0.1%', meaning a 0.1% trailing stop loss kicks in when 0.5% profit (of the balance) is reached.

Great stuff, Steve! Thank you again.
Author:  SteveHopwood [ Thu Jul 12, 2018 8:36 pm ]
Post subject:  Slopey Peaky Bob

Baluda » Thu Jul 12, 2018 8:18 pm wrote:After testing SPB with various settings for several weeks I built up enough confidence to let SPB loose on my live account using Sam's (Murphy Man) set file. It has been only twelve (12!) market days and my account is up over €1,000. A big thank you goes out to Steve who makes it all possible.
Paul, you are a modest man so I do not expect you to understand what a thrill it gives me to read your post. You are one of a tiny group of Elite contributors here. This group makes SHF the force it is. Your programming skills are epic and make me feel like the worm that I really am. Knowing that you have made some cash from my use of your fantastic work is just out of this world for me. It is my 67th birthday today. Your post is one of the best birthday presents I have ever received.
I do not know how many money is traded by SPB as a total of the balances of all live accounts it is trading, but it is probably more than we all think. Which means SPB is a serious and important EA. Maybe it is time to lock its feature set. All changes and additions to the code can be done to a new 'branch' which then will only be added to the main SPB after debugging and forward testing.
Excellent idea, and one that I will implement come my next update. Best not to fix it until it is bust. :arrrg:
That said, I am missing a 'UseBasketTrailingStopPercentage' setting and the accompanying 'BasketTrailingStopStartValuePercent' and 'BasketTrailingStopGapValuePercent'. The settings I would like to set these to are 'true', '0.5%' and '0.1%', meaning a 0.1% trailing stop loss kicks in when 0.5% profit (of the balance) is reached.
'Twill be done. To be honest, the single malt is good tonight, so I understand little of this and will be in touch for clarification soon. School has broken up for the summer, so I will have time on my hands and my OCCD will be kicking in big time and I will be up for some coding.

Gertje and Zennor, go birdy via PM if you want me to make additions. I will adopt Paul's suggestion so we know we cannot bugger thingies up.

:xm: :rocket:
All times are UTC Page 31 of 84