| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Pivot Analysis https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1388 |
Page 1 of 2 |
| Author: | Jedster [ Tue Jan 15, 2013 3:23 pm ] |
| Post subject: | Pivot Analysis |
Guys, Before I go off and do a bunch of work, has anyone published any tools to calculate the statistical probabilities of pivot levels being hit. The sort of thing where it says, over x period of time, R1 was hit 52%, R2 was hit 46% of the time and R3 21%, etc, etc. I have searched the forums but can't find anything. Perhaps it was my search criteria, or perhaps it hasn't been done in depth. Thanks J |
|
| Author: | fxarun [ Tue Jan 15, 2013 5:27 pm ] |
| Post subject: | Re: Pivot Analysis |
Statistical analysis of daily pivots, support and resistance levels for EURUSD. http://www.mql5.com/en/forum/2724 Regards, Arun |
|
| Author: | Jedster [ Wed Jan 16, 2013 11:43 am ] |
| Post subject: | Re: Pivot Analysis |
Thanks for your reply. I guess that no one else has done it so I'll post mine when i'm done. |
|
| Author: | Jedster [ Thu Jan 17, 2013 4:48 pm ] |
| Post subject: | Re: Pivot Analysis |
Ok, so attached is an indicator I wrote to calculate the % probabilities that pivot levels will get hit. The indicator works in two modes. Originally I wrote it to look at pivot levels on an hourly basis. I was looking to trade reversals at pivot levels using binaries, hence I needed to know what would happen within an hour of a pivot level being hit. I then changed it to calculate the daily stats, hence why there are two modes. Make sure you leave CalculateDaily set true and CalculateHourly to false. The rest of the properties you should probably also leave at their defaults. The ones that might be worth tweaking are: TolerencePips Default = 2 The value that price must be within to be considered a hit on the level. Set to zero if a precise and absolute hit is required. BarsToProcess Default = 0 means every bar. Set to x to only process the most recent x bars UseStartDate default = false Set to true to use a date range instead of bar count. Note this overrides BarsToProcess StartDate = "2012.04.01"; EndDate = "2012.12.31"; IncludeSundaysInStats default= false. We don't really want to include data from sunday, but you can if you want. Here is a screeen shot of the spreadsheet it produces. The way to read this is as follows: The first column lists the level we are referring to and the "Hit" Column is how many times that level was hit. So the green highlighted cell is the beginning of the row for the pivot point (daily pivot). The yellow cell is simply the number of hits there were. So out of 1672 days where the DO > PP, the pivot was actually hit 1319 times. The rest of the "Count" cells tell you how many times other levels were hit AFTERwards. So for this example row, we are referring to the PP. These are the useful numbers. So for example, the blue cell tells us that after the PP was hit, price went back to R1 514 times and the dark orange cell tells us price went to R2 244 times. Note that the red/pink highlighted cell is zero. When a level is hit, I don't count further hits to that level. So if price hit the PP, then to R1 and then went back to the PP, we don't capture that second hit. So, the value for PP on that row is zero. There are also a whole bunch of percentage columns which I simply find easier to read, rather than looking at raw numbers. They are more telling. The Pivot is hit nearly 80% of the time! I don't think there are any bugs, I've been through it and tested it out on random selections of data, to be sure it is counting and calculating correctly. Of couse, you never can be too sure, it looks ok to me, but if you notice anything please let me know. |
|
| Author: | blazko [ Thu Jan 17, 2013 5:11 pm ] |
| Post subject: | Re: Pivot Analysis |
thank a lot!! |
|
| Author: | MurphyMan [ Thu Jan 17, 2013 7:12 pm ] |
| Post subject: | Re: Pivot Analysis |
Fantastic work! Now, all I have to do is figure out to work it to my advantage! Sam |
|
| Author: | fxarun [ Thu Jan 17, 2013 8:22 pm ] |
| Post subject: | Re: Pivot Analysis |
Nice one Jedster ! Have been Looking for this kind of stuff ! Thanks a lot Mate . Arun |
|
| Author: | davidg29 [ Fri Jan 18, 2013 12:57 am ] |
| Post subject: | Re: Pivot Analysis |
Thanks Jedster, How did you go using Pivot Analysis with BO? David |
|
| Author: | Jemook [ Fri Jan 18, 2013 1:03 am ] |
| Post subject: | Re: Pivot Analysis |
Really liking the progress of this thread and your work Jedster.. I can imagine NB would be alllll over this research. |
|
| Author: | Lifesys [ Fri Jan 18, 2013 2:58 am ] |
| Post subject: | Re: Pivot Analysis |
Well done Jedster. As mentioned in PM, my observations have been that, not only for ranging times (>70%), price reverts DO to DP far more times than away and it is NB's skillful management that gets him the pips. 'Reversion to mean' is majority by definition. I compiled an EA (not bullet proof) which scalps Abs(DP - DO) when > (spread+slippage+MinTrade) for pairs each day at (real) D1 start. Many small +ve trades net av. > 350pip/day, but challenge is protection against trends. Success ratio >80% but R:R is poor, hence TP (or +ve close) av. must be > 1/4 SL (or -ve close) av. Included TMA in reverse. No trade if daily open H1 TMASlope is >0.4 or all ADX-MTF same direction. Not sure this or D1 iAtr() ratio SL helps much as Abs(DP -DO) size depends on larger move prev. day (or last hour) but then usually comes a lull & vice versa. If consistent, net av. > 100pip/day then workable. Was really interested in Jedster's indi. to run through and back test above on numerous pairs. Paul |
|
| All times are UTC | Page 1 of 2 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|