Jump to content

Pip Accumulator


Recommended Posts

Thanks for your efforts here, much appreciated and indeed impressive.

 

Waaayy beyond my analysis capabilities, sorry I can't contribute anything useful.

 

Great news wanrayman.

 

Let's hope we can properly re-engineer the indicator before it expires ;)

 

For anyone trying to work out probabilities...

 

It's best to concentrate on the Daily chart for doing this - to get variation to compare against use different pairs. The reason for using the Daily is that the timeframe weighting = 1, which essentially means we can ignore timeframe weighting.

 

All we need to do is ensure that the flags taken from the original indicator have been noted correctly, also note master probability and then try applying the indicator% weightings and shuffle around the flags in different ways to see if we can get back to the same as the master probability.

Link to comment
Share on other sites

  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Hi Conglo - that will be excellent if that's possible. From what I could see they were protected and can't be decompiled, hence all this work to re-engineer :)

 

On the re-engineering front, I've just found something else interesting...

 

If you copy PipAccumulator to your \experts directory, then you can run it in strategy tester in visual mode as if it was an EA - you don't get the boxes, however you do see the probabilities and flags changing (you need to pause and set your background to white and text to black to see them).

Link to comment
Share on other sites

Peldoman - a beer or two would be nice lol.

 

Ok...I think I may be getting a better handle on this probability. I'm not too sure as yet why my numbers aren't 100% correct though they're getting to be a lot closer. This is the current calculation I'm looking at, as you can see theirs comes out at 42 and mine at 46 - though I'm not too sure why there should be a difference:

 

http://i51.tinypic.com/1z5onz6.jpg

 

These calculations make good logical sense to me.

 

I forgot to mention that the Master probability is just the Signal Total / Max Probability * 100. We multiply by 100 to make the fraction back into a percentage.

 

We're always looking at the total number of signals as a proportion of the maximum number of signals. Each bunch of 7 indicators for each timeframe represents 100% (i.e. all the indicator weightings added up). Hence if one timeframe = 100, then we multiply by the number of timeframes which have signals to get the maximum possible probability - i.e. all flags in all timeframes set to 1.

 

This will ensure that our probabilty has a maximum value of 100 and a minimum value of 100 which is exactly what we want.

Edited by soundfx
Link to comment
Share on other sites

Peldoman - a beer or two would be nice lol.

 

Ok...I think I may be getting a better handle on this probability. I'm not too sure as yet why my numbers aren't 100% correct though they're getting to be a lot closer. This is the current calculation I'm looking at, as you can see theirs comes out at 42 and mine at 46 - though I'm not too sure why there should be a difference:

 

http://i51.tinypic.com/1z5onz6.jpg

 

soundfx, i promise to try helping with it in the weekend...

but seems you are too close... :) is it the xls those that you uploaded already?

Link to comment
Share on other sites

Hi musketeer,

 

You can probably disregard the earlier spreadsheet now as that was assuming that we have the additional complication of needing to weight the numbers based on timeframe too - which I've established seems to do nothing. Try changing the timeframe weightings in the parameters and see what happens :).

 

Here's the new spreadsheet that the screenshot came from:

 

http://www.multiupload.com/2QRO4QMUYL

 

Note that the first two pages contain different weighting percentages - I was experimenting with changing these. I could see that RSI was 0 across the board, so I set RSI to 40% and all the rest to 10% which meant that I could see potential calculations more clearly.

 

What I still need help on is the SMA1, EMA1 and EMA2 flags. I'm still not sure why we're getting what are totally whacky values to me given the position of MAs. This will probably require lots of searching through charts of different pairs and timeframes and checking positions of close price and each MA and possibly other stuff like recent crosses etc.

 

When I ran the indicator as a "pseudo EA" in visual mode I could see all the indicators and MAs being used and there were only the 3 MAs we know of (I was wondering if there were possibly checks going on against the 200 SMA or something like that which was hardcoded and not in the parameters).

Link to comment
Share on other sites

it is very possible... if there is added HideTestIndicators=true you (we) will not see them

so, the easiest way is decompiling...

but I have not recent version of, and stuck with it

 

edit: finally got it :) it crashes my MT4 every time... allowing update to the 402 build make the thing

Edited by musketeer
Link to comment
Share on other sites

Well, I think we'd have worked out that the MA flags came from a combination of the 3 MAs crossing and the candle High/Low in the case of SMA (explaining those 0 values).

 

Good to see that RSI and Stochs had levels of 35 and 65 as expected :)

 

Also good to see that the timeframe parameters were unused, however these were also causing the confusion in the probability calcs.

 

It looks as though the developer was originally going to make these parameters and then realised later that another 8 sets of 9 parameters were needed - hence the whole lot was hardcoded with various weighting numbers for each timeframe depending on the timeframe being viewed.

 

I think eventually we'd have worked out these numbers too. I was starting to pinpoint specific indicator calculations by setting the indicator weighting to 100% so that all the rest were ignored. A few more tests like this and we'd have realised that certain constants appeared to be required as further weightings to get back to the correct probability value.

 

Thanks again Conglo, you've saved us a lot more digging around.

 

Now...onto "phase II" of the project. I'll see if I can change that whacky probability indicator into something that we can read and use in manual backtesting. When we have that then we can look at the backtests along with S/R, pivots, Fibs, other indicators etc. and see if we can make any improvements.

Edited by soundfx
Link to comment
Share on other sites

Hi Guys,

 

I've tidied up the code in Trend_Prob indicator and have changed it into a more readable histogram:

 

http://www.multiupload.com/KQZVPVWZJ6

 

However...the problem is that although the current value of the indicator ties in exactly with the current master probability, going back in history shows some suspect values.

 

Why do I think these are suspect? Well, for one they don't make sense based on what I've seen from the master probability in live and also we can prove that they're not correct.

 

The way to do this is to backtest the main Pips_Accumulator indicator in visual mode as I mentioned earlier and to compare the master probability at say 15:50 this afternoon (where it showed as a +ve number in backtest, but remained -ve in the histogram).

 

There's something subtle which is wrong here as the code comes straight from Trend_Prob and there's not an obvious reason why it should give different values to those seen from the main indicator in backtest as they appear to be using the same routines. This is one for you expert coders to check out this weekend ;)

 

Here's a screenshot of II_Prob_Hist for interest:

 

http://i55.tinypic.com/2nlyd1w.jpg

Link to comment
Share on other sites

Here's what I've been doing:

 

Put any EA on the chart for visual testing, just make a template with the PA indis.

 

I visually tested with open prices only and displayed the data window with the cursor on the last bar, then watched the master probability text display against the new indi reading in the data window.

 

Most of the time the indi value would match the master probability reading but would print to the indi one or two bars later. Sometimes it will miss a bar, but most of the time it's just a bar or two late.

 

Using the open prices may have something to do with this, I don't know enough about this stuff.

 

Hope this helps.

Edited by conglo
Link to comment
Share on other sites

Hi Conglo,

 

That makes sense, because backtesting is simulating real-time, so if you attach both indicators then they will tie up most of the time.

 

The thing to do is run the backtest and have the trend/histogram indicator on a different MT4 (or just attach it to a chart in the same MT4 after the backtest and remember to take a screenshot of the backtest ;) ) then compare the values.

 

What we'd normally do in manual backtesting is just attach the trend/histogram indicator to a chart with the main indicator and scroll backwards to look at what the master probability value was when we had the pivot (small box) signals as a "heads up" to enter trades.

 

That's where the problem is. Something is going wrong when the trend/histogram indicator is calculating probability when we scroll back. It's probably some variables not been cleared or something like that though it's not obvious to me where the discrepancies are.

 

Here's an example. This is what the indicator looks like in the backtester in visual mode (which is correct I believe):

 

http://i55.tinypic.com/9a1wlw.jpg

 

...and this is what it looks like when we scroll back:

 

http://i51.tinypic.com/6p9rau.jpg

 

As you can see, we have totally different histograms.

 

I've noticed that when scrolling back, the indicator appears to have a bias for master probability values which are > 0, though as yet I don't know why there should be any difference between doing this and looking at the backtest histograms.

 

BTW guys - despite the "cheesy" marketing, this is sophisticated stuff and wanrayman has already shown that we can do very nicely trading this system :) Just look at the weightings for the timeframes which were hidden in the code - these don't come out of nowhere, someone at sometime has put a lot of effort into determining these weightings. I feel we have a real winner on our hands here and now we are able to "tune" the code (all thanks to conglo) according to our needs, we can definitely make it even better ;)

Edited by soundfx
Link to comment
Share on other sites

musketeer,

 

Well spotted! Of course you're exactly right :) - I should have realised this myself, but got too distracted by the fine detail.

 

The problem is that in backtesting we're always looking at the current closed price in all timeframes.

 

However when we show indicators when scrolling back, we use a candle count from the timeframe we're viewing. So, if we're looking at 5m for example the last closed candle will be the only one which will show correct values.

 

As soon as we count 1 candle back the indicator isn't sophisticated enough to adjust the reads for MACD etc. for each of the timeframes.

 

In a given day, 2 candles back on M5 is not 2 candles back on D1 for example - but the same candle for D1.

 

There are ways to adjust the calculations so that they show correctly when scrolling back, here's one example (though it seems a bit complicated):

 

http://www.desynced.net/fx/eas/mq4script-3301.php

 

Here's another example using iBarShift() thanks to sangmane on other forum - which looks much easier to code:

 

int start()
 {
  int i, shift, counted_bars=IndicatorCounted();
  i = Bars-counted_bars-1;
  while(i>=0)
  {
    shift     = iBarShift(NULL,TimeFrame,Time[i],True)+1;
    Buffer[i] = iMA(NULL,0,MaPeriod,0,MaMethod,AppliedPrice,i);
    MTFBuffer[i] = iMA(NULL,TimeFrame,MaPeriod,0,MaMethod,AppliedPrice,shift);
    i--;
  }
  return(0);
 }

 

and here are his comments:

 

At Time, Buffer which is Ma of current TF will correspond to MTFBuffer. In another words, in your table, Buffer value and MTFBuffer value should be in the same row.

 

Pls note that for MTF shift, I add delay +1 so that MTF value will only updated at the right time.

 

For ex. chart' s TF = H1, MTF = D1. MTF Ma for 2009.01.01 will be updated at 2009.01.02 00:00. If you ommit this delay, you practically trying to get future data. Because we wouldn't know the close price of 2009.01.01 before 2009.01.02 00:00.

Link to comment
Share on other sites

Hi Guys,

 

I've amended the Histogram to include iBarShift() though it's still not working - perhaps this is a non-starter because of the MTF issues, I'm not sure, it's here for anyone who wants to dabble with it:

 

http://www.multiupload.com/NMUOMTVBL1

 

I've amended the II version of the indicator to include the correct MA calculations and the timeframe weightings. I've also changed the flags to coloured boxes which are easier to see (if you want to use them). If you don't want to see the flags you can now turn them off in the parameters. You also have the option to move the text and flags wherever you want on the screen by changing the HPos and VPos parameter settings (for Horizontal Position and Vertical Position). I've removed the account details as that's pretty much useless and just clogs up the screen:

 

http://www.multiupload.com/P9VO5BSVS7

 

Here's an example:

 

http://i53.tinypic.com/e02vdf.jpg

Edited by soundfx
Link to comment
Share on other sites

Guys, I've just been thinking about next steps...

 

Obviously we need to forward test the system as it stands and all results on that will be welcome - if you're going to publish results then please make it clear if you're using other trading methods in addition to the pivot signals (arrows) and the probability being >20 or <-20.

 

Possible enhancements to the main indicator will be alerts - which can made flexible:

 

Conservative Alert - will alert as soon as a new arrow is drawn. This leaves you time to evaluate the market conditions and the probability, or possibly wait for what looks like a retrace coming up before entering etc.

 

Aggressive Alert - will alert as soon as a new buy arrow is drawn and probability is > 20 or as soon as a new sell arrow is drawn and probability is < -20. The idea being that you hear this alert and aim to enter the trade immediately.

 

If the histogram can't be used for backtesting then it may still be useful so that we can can see the general "flow" of probability throughout the day. To do this we'd need to change the indicator so that it plotted histograms only for current prices as long as MT4 is running. We can store these in an array and display them. Each time MT4 is restarted the indicator would be cleared. The idea behind this is that if you get a signal for a Buy trade and you check probability and see it's 23, in some cases it may be handy to know where probability has been before then, for example the previous values could have been 50, 43, 32, 28, 23, so would you now be as tempted to go long? lol.

 

All I'm suggesting at the moment are peripheral tweaks to the indicators to help us in our trading decisions. Until we have some proper results from forward testing we're not going know whether we need to look at enhancements to the core logic or not. As I mentioned earlier, some of the MA flags often didn't make a lot of sense to me, so if at times we find that the probability is unreliable then these are probably the first things to home in on to look at improving.

 

I'm sure that depending on the skills of the trader forward testing we'll get quite different results. I suspect that blindly following the entries will only give a mediocre performance and this is why at the moment, I can't see any value in looking at creating an EA from this system (the same applies to 99.99999% of systems lol). EA's have their place and they can be useful for backtesting ideas or for automatically placing stops and targets.

 

Here's an obvious example of why there will be differences...

 

Price on EURUSD has risen to 1.4500 and dropped and then touched just under the same level with a lower high formed just under 1.4500. Currently price is at 1.4489 and we have a signal to go long where our stop would be at 1.4456 (a handful of pips below the bottom of the last big red box), probability is 21...do we take the trade?

 

Someone blindly following the system signals would take the trade, however because of resistance being tested at 1.4500 and that our target needs to be at least at 1.4522 (to give a 1:1 risk:reward), or preferably better, then a more experienced trader is likely to hold off from entering a trade.

 

It will be interesting to see what results you guys come up with at the end of next week...

 

If wanrayman gets 300% return again - I think we need to take a very close look at how he's trading the system ;)

Link to comment
Share on other sites

SoundFX "Price on EURUSD has risen to 1.4500 and dropped and then touched just under the same level with a lower high formed just under 1.4500. Currently price is at 1.4489 and we have a signal to go long where our stop would be at 1.4456 (a handful of pips below the bottom of the last big red box), probability is 21...do we take the trade? "

 

From what I see ...1.4500 is the 5 day High and 1.4250 is the 5 day Low .......price bounced off the high on the 17th of Aug...off the Low on the 19th of Aug....the 1 hour shows a buy on the macd.... price closed at 1.4395...Could go either way, but I would lean towards the buy...target 100 pips if I followed the "richochet" action of the price movement...

Link to comment
Share on other sites

rick - that was a totally hypothetical example, I was just trying to illustrate a point! lol

 

It all depends in which chart you're trading the system from and your risk/reward and obviously any additional skills that you can throw into the mix as to whether you trade any setup or not.

 

Try trading this system next week and report back how you get on ;)

 

Just to mention for everyone forward testing...

 

The "killer" aspect of this system is the probability number.

 

The MACD crossover arrows are just a "heads up" that a turn in price may be imminent.

 

Think about all the traders trading on all the different timeframes, some using MACD, some using Stochs, some using MA's etc. These are all going to act as triggers of some sort and cause a shift in price. The probability number (with its additional weighting for the timeframe you're trading on) captures the essence of all this activity and gives you a clear point at which to enter a trade.

 

As rick has mentioned, looking at previous S/R, Highs/Lows etc., perhaps we can look into building these into the probability numbers too to give an even more powerful indicator :)

 

Also...I've been mainly looking at 5m charts for signals and I believe most others have done the same too. This goes against the originator's recommendation that the system is traded on 1H or above. It would be interesting to see some forward test results from 1H and 4H.

Edited by soundfx
Link to comment
Share on other sites

rick - that was a totally hypothetical example, I was just trying to illustrate a point! lol

 

It all depends in which chart you're trading the system from and your risk/reward and obviously any additional skills that you can throw into the mix as to whether you trade any setup or not.

 

Try trading this system next week and report back how you get on ;)

 

Just to mention for everyone forward testing...

 

The "killer" aspect of this system is the probability number.

 

The MACD crossover arrows are just a "heads up" that a turn in price may be imminent.

 

Think about all the traders trading on all the different timeframes, some using MACD, some using Stochs, some using MA's etc. These are all going to act as triggers of some sort and cause a shift in price. The probability number (with its additional weighting for the timeframe you're trading on) captures the essence of all this activity and gives you a clear point at which to enter a trade.

 

As rick has mentioned, looking at previous S/R, Highs/Lows etc., perhaps we can look into building these into the probability numbers too to give an even more powerful indicator :)

 

Also...I've been mainly looking at 5m charts for signals and I believe most others have done the same too. This goes against the originator's recommendation that the system is traded on 1H or above. It would be interesting to see some forward test results from 1H and 4H.

 

Glad that was only hypothetical and very good breakdown on your use of the system....would love to try the latest revisions (if any)....could you post the latest download again...thanks in advance

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...