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

Boulder's Grind
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4743
Page 4 of 6
Author:  SteveHopwood [ Tue Jun 07, 2016 2:32 pm ]
Post subject:  Boulder's Grind

V 1a is in post 1.

I decided to see if I could track down why trades were not being closed. Coders looking at LookForTradeClosure() would not have found the fault there. The explanation lies in this snippet that I have just added and post here for the self-fixers.

Keep us all on the same line numbers and create a blank line at 988 and copy/paste this in:

Code: Select all

   //The variable Hedged initialises to 'true' to prevent CountOPenTrades()
   //calling LookForTradeClosure() the first time the program runs at
   //start up. Reset the variable if not using hedging.
   if (!UseHedgingWithGrid)
      Hedged = false;
:xm:
Author:  dentiok [ Tue Jun 07, 2016 2:59 pm ]
Post subject:  Boulder's Grind

Boulder » Mon Jun 06, 2016 4:50 pm wrote:How amusing.. as I was writing that last post, the pattern actually occured again.
I've been following your thread with interest.
I would like to give you an idea about patterns if you do not mind.
look up the pattern in Higher TF and then at the the fourth bar (even at the beginning of the third for a more early signal) go to lower TF and start looking your pattern to enter the trade.
I attached a pic for better understanding-
BRegards.
Author:  tomele [ Tue Jun 07, 2016 5:52 pm ]
Post subject:  Boulder's Grind

Hi.

Since upgrading to V1a I am getting error 146 (trade context busy) sometimes. Restarting Empty4 didnt help. Do you have it also or is it only me?

Thomas
Author:  pakeha [ Tue Jun 07, 2016 6:09 pm ]
Post subject:  Boulder's Grind

I have also been following the thread with interest, especially the original MTF method. While I agree completely with Jal811 comments we may need to think about the original method from a slightly different perspective.

The gist of the original Grind method is that if the momentum during the first 5 minutes after the top/bottom of the hour is significantly different (>0.8 histogram value) than the previous 30 minutes then price will continue in that direction (up or down) for the next 2-3 bars (10-15 minutes). Therefore, looking only at the DMI difference between the first 5 min reading and the previous 30 min reading on the histogram is fine for this method.

What you cant do (as Jal811 identified) is use the chart to manually/visually back-test the method as shown in the post #1 charts, because the chart will not show the 5 min histogram bar value, but rather the 30 min value. So forward testing manually, or using an EA, makes a lot of sense.

I had success (fun) playing around with it manually today and will give it a more serious look going forward.
Author:  Boulder [ Wed Jun 08, 2016 2:32 pm ]
Post subject:  Boulder's Grind

tomele » Tue Jun 07, 2016 7:52 pm wrote:Hi.

Since upgrading to V1a I am getting error 146 (trade context busy) sometimes. Restarting Empty4 didnt help. Do you have it also or is it only me?

Thomas
Hey Thomas, my terminals didn't have those errors. I have 6 sets running each with its own magic number (1 to 6 respectively). Perhaps looking here may be of help to you?
pakeha » Tue Jun 07, 2016 8:09 pm wrote:I have also been following the thread with interest, especially the original MTF method. While I agree completely with Jal811 comments we may need to think about the original method from a slightly different perspective.

The gist of the original Grind method is that if the momentum during the first 5 minutes after the top/bottom of the hour is significantly different (>0.8 histogram value) than the previous 30 minutes then price will continue in that direction (up or down) for the next 2-3 bars (10-15 minutes). Therefore, looking only at the DMI difference between the first 5 min reading and the previous 30 min reading on the histogram is fine for this method.

What you cant do (as Jal811 identified) is use the chart to manually/visually back-test the method as shown in the post #1 charts, because the chart will not show the 5 min histogram bar value, but rather the 30 min value. So forward testing manually, or using an EA, makes a lot of sense.

I had success (fun) playing around with it manually today and will give it a more serious look going forward.
Great Pakeha, thanks for your involvement :)! Will be looking forward to it :good:

Steve the trades are indeed being kept for exactly the CandleLifeTime they're set for. Great stuff! The only major issue at the moment is the changing TP. These apparently are changing to higher TP targets than intended - which of course is lethal for this method. Other than that, works a charm.

As I was wandering around yesterday, I thought to myself "Ok although early days BG can make pips. But even more importantly; how do we preserve them better?" Then I realised that we hadn't had set a way of inhibiting opening trades where the spread may prevent the trade to hit its target. Luckily Steve's shell already contains a great spread detection mechanism, based on a TicksToCount and a MultiplierToDetectStopHunt variable. I would even suggest that it just isn't worth entering a trade where the spread is over 3 - 3.5 at the very most (that is for GBPJPY in particular). A way of preventing this is by checking whether the 2 candles that constitute a sufficient Diff have reached/went over a maximum spread of 3 for instance. So even though 2 M5 candles make up for a Diff of say 5, BG should never trigger a trade - without exception - if the spread went over those 3-ish pips over the course of the last 10 minutes. Hugely important I must say. We just want to stay away from these (the bottom indicator is a spread monitor for those wondering).
Screen Shot 2016-06-08 at 14.48.28.png
Screen Shot 2016-06-08 at 14.49.42.png
Furthermore, I also was contemplating about the sustainability of BG on the long run, what we should be looking out for and how exactly one should manage this thing. Immediately recalling the CHF incident of January last year and potential turbulent Brexit scenarios ahead of us (the latter being extremely important for BG), I wondered “Would BG survive such events?”. Couldn’t stop thinking about the many people that got their accounts completely wiped out because their stop losses just didn’t get triggered due to a crashing market. A market moving so fast that there simply were no counterparties to match their stop losses with at that point in time. The more I work with BG, the more confidence I gain that it will survive and stay out of the market should hallucinating disasters like those occur if and only if we provide and gear it up with necessary safety mechanisms. I got reminded of this once more by one of Steve’s recent posts. Superbe tools such as MaxSlippagePips, PostTradeAttemptWaitSeconds and numerous other safety features in Steve's shell EA testify for the level of sophistication. In terms of management: this is not a set-and-forget EA (no EA really is)! Market conditions will indisputably alter over time and will therefore require parameter recalibration and subsequent adjustment by human intervention. An obvious one is the Diff w.r.t. BG. In any case: the thorough way things are done here in terms of testing, teamwork, discipline, awareness, consciousness, conscientiousness and just down-to-earthness in general, will always be the reason I’ll trust and prefer SHF’s EAs over others. Same for BG: if it doesn't work, it doesn't work, we learn from the process what we can and move on to another endeavour.
Author:  tomele [ Wed Jun 08, 2016 4:58 pm ]
Post subject:  Boulder's Grind

Boulder » 08 Jun 2016, 16:32 wrote:
Hey Thomas, my terminals didn't have those errors. I have 6 sets running each with its own magic number (1 to 6 respectively). Perhaps looking here may be of help to you?
Hi Boulder,

thank you for the link. I had already read this. I observed that the terminal sometimes fired a couple of closes in the same second and then they all had this error. Maybe because I had the EA attached to 28 pairs in 1 terminal and there were parallel candlelifetime closes from different charts? I didnt change the magic number, but this shouldnt be a problem.

Anyway, I cancelled the test today. 3000 pips drawdown and all pairs in the red. Seems that my settings were crap (SL 30, TP 10, Inc 2). Will give it a new try when the SL problem is solved. In my terminal the EA always shows SL 30, but sometimes the real SL is set much wider.

Thomas
Author:  rapple [ Thu Jun 09, 2016 7:47 am ]
Post subject:  Boulder's Grind

Hi Boulder

I wonder if the change in the TP is due to the spread. If the spread is large the TP is increased.

I have attached an image of GN for example which shows a large spread and increased TP/SL

Cheers Richard
Author:  Boulder [ Thu Jun 09, 2016 3:51 pm ]
Post subject:  Boulder's Grind

Ok guys I spent quite some time researching and developing. Think this might really interest you.

It started when I saw BG taking this trade.
Screen Shot 2016-06-09 at 12.04.08.png
It exactly did as it was supposed to; going short since the Diff exceeded our threshold of 2.4. As you can witness, price RRT'd, reversed on us and closed out at loss 15-20 minutes later dealing a fair blow to our account. When I saw this an image of Riemann sums and fundamental principles of velocity and acceleration came spontaneously to mind. Suddenly a lot of pieces came together and I think I acquired a most important insight. A sort of 'once-seen-cannot-be-unseen'-thingy if u will. For those not familiar with Riemann sums I won't go into too much detail and the technicals of it as this would digress us unnecessarily. In short it is a mathematical approximation method - pertaining to the discipline of integral calculus - to calculate the 'area' under a function. This is done by dividing the area in N partitions and subsequently summing them up. Pretty straightforward. The higher N, the more precise the value of the 'area'. Needless to say, in its limit (N to positive infinity) it returns the very exact value of the area - otherwise known as an 'integral'. A visualisation makes it much easier to grasp, doesn't it? :) (You'll have to click on it.)
Riemann_integral_regular.gif
"What in the world has this got to do with anything?", you may ask. Let me show you.

Price has wave-like features and properties. We all know this. Turn your everyday candlestick / bar chart into a line chart to see it better. A lot of trading methods are based on these wave-ishness of price action (e.g. Elliott waves). Now let's assume a rather "stable" scenario within which price is trading between well defined S/R levels and is behaving rather well. To do this, let's plot a sine-function and smack on a S/R.
Screen 1.png
There we are. Now let us throw Wilder's DMI into the mix on the M5. To be clear, these are DMI histogram bars.
Screen 2.png
The very schematics in the last picture I manually, amateurishly drew contain the patterns that will occur most often. On first sight it should be immediately clear where the opportunities lie; when price is accelerating and gaining velocity. As you can see, the pattern I already mentioned in previous posts occurred over the first 3 histogram bars. We would've entered on the close of bar 3. and surely hit our TP in the next 5 minutes. The pattern is broken over bar [3,4,5] as Diff_[4,5] is not nearly enough to testify for acceleration. No trade. Diff_[4,5] suggests deceleration and a possibility of a reversal. Think of it as a yellow wavy occurring above that 5th candle. Then price indeed proceeds to fall (as if a blue wavy kicked it in motion) and forms the stairs 5 times with subsequent profit-takings - apart from the last set at point B. This is exactly why we're incorporating a safety-mechanism of no more than 2 - 3 trades in the same direction, for no longer than 10-15-20 minutes a time (we'll have to see what's the better configuration). Immensely important. So when 2 - 3 shorts occur from point A. onwards, we'll forcibly suspend trading and only resume once the stairs-pattern has been broken by a non-stairs pattern. This happens at the top, at point B. Absolutely necessary in order to make this work. Now we're allowing BG to resume its operations - when stairs in either direction get confirmed. I reiterate the technique once more:
Boulder » Mon Jun 06, 2016 11:45 pm wrote:
The process for these secondary trades would go something like this. I define Diff_1 and Diff_2 as the Diffs between respectively the first pair and second pair pertaining to a set of 3 bars.

Go long if:
1. 3 rising histograms
2. Both Diff_1 and Diff_2 between 0.4 and 1.8.
3. Open trade if maximum 1 trade in the same direction has been triggered in the last 10-15 minutes.
4. TP = e.g. 5 pips
5. SL = 35 to avoid disaster
6. If 4. and 5. didn't happen after 15 minutes; exit the trade.

That's it. Analogously for a short.
In essence, we don't want to trade at tops and bottoms. We want to catch and ride the transitions. These transitions contain rather robust DNA. BG cold-bloodedly and unemotionally confirms that DNA and acts accordingly with minimum market exposure, aiming for feasible short & sweet profit targets.

Visually we would be doing this:
giphy.gif
Of course if it were that easy, it wouldn't be any fun now would it? Luckily we have our dearly-beloved market makers around lurking for our stop losses and snatch them whenever they see fit. If you are not aware of these practices, I STRONGLY advise you to read up on CJ's material here. Rather volume-heavy, but I guarantee you won't regret it.

How would we bypass those nasty stop hunts then? Have a look at point C. and D. I noticed these patterns occurring at the top and bottom all the time. Taking care of these will almost surely raise the probability of us avoiding being prey of stop hunts. It appears that the probability of a stop hunt and a subsequent reversal is highest when a 'deformed' stairs-pattern is printed. Diff_[6,7] is much larger relative to the preceding Diff. This increases the chances of, and can be thought of as, market makers reaching out high/low and pulling back. We want to avoid these. The system would go like this:
  • 1. If the Diff_2-to-Diff_1 ratio is bigger than X (e.g. 2), then no trade.
    2. I feel there's an absolute value under the momentum threshold of 2.4 here too to be avoided, though I'm not sure of this. We would not be taking a trade if the Diff falls between, say, 2 and 2.4. Again, not sure about this one.
Point D. also shows a place where trades should be avoided. Operations resume after the non-stairs pattern of [12,13,14] occurs - leading us to the final part of this system. This integrates the primary/momentum trades which I originally came up with and suggested in the first place. These trades follow after price explodes and leaves a large Diff as represented by point E and Diff_[16,17]. It explodes in a certain direction (in casu upwards) and trades again in a certain range. Here's the place where the entire picture clicked and all sorts of scenario's passed in front of my eyes. Range, explosion, range. Range up/down with a gentle slope with plummets/upsurges. Etc, etc, ... All of them could be covered with a rather high probability. Again, I stipulate, nothing is guaranteed. However it is most definitely worth an attempt. In fact I think these stairs should be the primary method of trading of the EA, taking precedence over momentum trades. Considering that momentum trades typically will follow the stairs, now have a look at the trade I posted up top :).
Screen Shot 2016-06-09 at 15.52.00.png
Yes those would be 2 winning trades immediately after each other.

Cheers,

Aram


PS: for those planning on writing a lengthy post - I advise you to save your draft intermittently. I just had to write this entire post from scratch after my internet just bailed on me. :roll:
PSS: the Riemann sums by their visual resemblance to the DMI histograms merely triggered the connection between waves, maths, velocity and acceleration. We won't be calculating integrals or anything of the sort of course :P
Author:  tomele [ Thu Jun 09, 2016 3:57 pm ]
Post subject:  Boulder's Grind

Boulder » 09 Jun 2016, 17:51 wrote:
PS: for those planning on writing a lengthy post - I advise you to save your draft intermittently. I just had to write this entire post from scratch after my internet just bailed on me. :roll:
Hi. Little tip if you are using Firefox or Chrome: Lazarus Form Recovery. Cant tell how often this saved me a lot of time.

Cheers, Thomas
Author:  Boulder [ Thu Jun 09, 2016 4:15 pm ]
Post subject:  Boulder's Grind

tomele » Thu Jun 09, 2016 5:57 pm wrote:
Boulder » 09 Jun 2016, 17:51 wrote:
PS: for those planning on writing a lengthy post - I advise you to save your draft intermittently. I just had to write this entire post from scratch after my internet just bailed on me. :roll:
Hi. Little tip if you are using Firefox or Chrome: Lazarus Form Recovery. Cant tell how often this saved me a lot of time.

Cheers, Thomas
Thomas thanks a million sir. This will surely come in handy!
All times are UTC Page 4 of 6