LOL ... I didn't think we were arguing ... In any case, while I would agree of course that the pupose of the development of any system or indicator is about improving one's trading and about making money in the markets, usually a step that plays a part in determining whether or not some tool is usable involves objective backtesting ...
--- In [email protected], Andy Davidson <[EMAIL PROTECTED]> wrote: > > Semantics aside, I think we're arguing the same point here. I also use a > correlation to the data to select the cycle parameters. > > As I said the difference, in terms of output, between our methods is > that you get all the cycles in one go and I have to be a bit more > 'manual' to get the full picture. The answers we get should end up being > approximately the same. > > Your approach (providing it really does work!) is superior, no doubt > about it, because of that one difference. Obviously, being able to > back-test either method would be the ultimate goal. However, my > experience is that (a) I don't yet have the technical and/or > mathematical expertise to achieve that and, as you say, (b) any attempts > I have made so far have made the run-time very slow indeed. I'm working > on (a) but my feeling is that to get over (b) we are either going to > need a leap of ingenuity or a leap in computing power. It will be > interesting to see which comes first and when! > > So having reached these conclusions myself a long time ago I decided to > either just keep it as an academic exercise and plod on with it when I > have the free time or to just go ahead and use what I've got, > backtesting validation or not. I'm personally glad that I did the > latter. From real trading results I now have faith in the method and > also in my application of it. Therefore, things should only be able to > get better if I can improve the indicator(s). > > So when you say "it is about being able to objectively backtest" I have > to, respectively, disagree again. It is about inmproving one's trading > and about making money in the markets. > > Unitl later then, > Andy > > > Fred wrote: > > > > No argument about Millard except that I would liken his doubly > > smoothed CMA to a regular CMA by making each of the components of > > Millards shorter ergo my 2/3, 1/3 comment so that they are measuring > > roughly the same thing ... > > > > If you don't like the word "dominant" then how bout ... "most > > prevelant" or the one that is arrived at as a result of it having the > > highest correlation to the data ... It's the last methodology I am > > using at the moment ... It's expensive in terms of run time but seems > > to be worth it. > > > > To me it is not necessarily about mechanical or nothing ... it is > > however about being able to objectively backtest ... > > > > With regards to divergence ... agreed ... many forms of this make for > > decent pattern recognition solutions ... > > > > Although there are Trigonometric ( as in Hurst's Appendix 6 ) > > methodologies to extract all cycles at once ( like an FFT would ) > > this is not the methodology I employed. They may all be done in the > > same AFL but in essence via multiple passes ... See my original > > English write up ... > > > > Regarding over/under engineering ... I agree ... It is hard to tell > > though without objective backtesting whether one has carried some > > approach far enough or too far or hopefully somewhere in between. > > > > --- In [email protected] <mailto:amibroker% 40yahoogroups.com>, > > Andy Davidson <AndyDavidson@> > > wrote: > > > > > > A standard CMA has lag 17 bars for n=35 > > > > > > Millard's Smoothed is an n-period MA smoothed by an n/2-period MA. > > So > > > the lag is (n-1)/2 + (n/2-1)/2 > > > For n=35 this equals (35-1)/2 + (17-1)/2 = 17+8 = 25 > > > > > > In his book Millard calculates an 11-week average of a 21-week > > average. > > > See his Table 7.2 > > > > > > He also states further on that "a 15-week smoothed average would > > cause > > > the loss of 10 points at the end of the plot" > > > If n=15 then the lag is (15-1)/2 + (7-1)/2 = 10 > > > A centred SMA of n=15 would have lag of just 7 > > > > > > I don't agree with what you say in 1). Millard uses this CMA stuff > > in a > > > build up to his Cycle Highlighter (CH) indicator in Chapter 9. This > > > indicator does not attempt to extract the "dominant cycle" per se. > > When > > > I hear that phrase it reminds me of Ehler's language > > in "Cybernetic..." > > > but I won't divert onto that here. > > > > > > There are lots of cycles present in most price series, once you > > allow > > > for the noise and for long-term fundamental-driven trends and they > > can > > > all be "dominant" depending on what time-frame you are looking at > > and > > > what you are trading on. For example, I might be trading a 21- day > > cycle > > > and you might be more interested in a 52-WEEK cycle, depending on > > our > > > trading styles. So, *IF those cycles are present to trade on AND > > are > > > strong enough not to get lost in noise* then the CH indicator > > should be > > > able to pick EITHER of them out, depending on how you set the > > parameters. > > > > > > None of this is "touchy feely". *USED CORRECTLY* it works. I've > > traded > > > with it and I've had repeated success doing so. (Please, no calls > > for > > > trading records!) The success I have had though is through > > incorporating > > > it into my overall strategy. I do not rely on one indicator and I > > most > > > definitely do not automate. I agree that there needs to be some > > element > > > of automation in there, if for no other reason than for > > > scanning/exploring for suitable issues that show good cyclic > > behaviour. > > > To that end I have tried to automate the CH indicator as I > > discussed in > > > previous posts. So I think I answered your point 2) already. Let me > > know > > > if you need further clarification. > > > > > > However, I don't subscribe to the "Mechanical Or Nothing" school of > > > thought. Yes, the CH indicator works in a "general way"...and that > > is > > > good enough for me. It is not "very" general though. One of my > > other > > > analyses is based on divergence. Divergence works very well indeed, > > when > > > it works at all. And therein lies a problem. My own divergence > > indicator > > > probably has a 50-60% hit rate. I could make this work on its own > > with > > > decent money management rules, but when I combine it with an > > > *appreciation* of the cycles that hit rate number goes up quite > > > significantly. So you can see that I am using mechanical signals > > from > > > one method and then applying a discretionary filter based on my > > > appreciation of the cycle I wish to trade on. I do not need to > > be "no > > > hands"...I like my hands! > > > > > > A while back you sent a chart.png of the work you had been doing to > > > extract all the cycles from a waveform using Cleeton's methods. > > > Conceptually, there's no real difference between what you are > > trying to > > > do there and what the CH indicator does. The differences are that > > (a) > > > the CH indicator extracts cycles one-at-a-time whereas your tries > > to do > > > them all at once, and (b) there are no fancy mathematics (YET!) for > > > extrapolating to the right-hand edge. The extrapolation method I > > have is > > > quite crude...but please remember that cycles are quite crude too. > > The > > > amplitude and wavelengths are *never* constant. Over-engineering > > > something can sometimes be as dangerous as under-engineering. > > > > > > Regards, > > > Andy > > > > > > Fred wrote: > > > > > > > > Andy, > > > > > > > > In looking at your spreadsheet I understand what's there except > > > > for ... > > > > > > > > I'm not sure why a Millards smoothed should have more lag then a > > > > standard CMA ... > > > > > > > > Although I thought an even number would be required i.e. 34 or 38 > > > > instead of 35 ... > > > > > > > > Millard would have calc'ed a 23 bar CMA and then a 11 bar of > > > > that ... or 25 and 13 if you prefer ... the lag would have been > > 11 + 5 > > > > = 16, or 12 + 6 = 18 respectively ... where'd you get a lag of 25 > > for > > > > 35 bars ? > > > > > > > > In any case what all these seem ? to be missing imho is ... > > > > > > > > 1. I don't think the dominant cycle is enough to do the job in > > > > terms of extrapolation and/or prediction by itself except in a > > very > > > > general way ... > > > > 2. What at least semi automated ( no touchy feely allowed ) > > > > method are you gonna use to determine the CMA length to be used > > and > > > > then > > > > 3. How to process that info ... > > > > > > > > The AFL I have for Trig Fit, the output of which I posted on AB > > takes > > > > care of all 3 of the above with no hands ... run time is of > > course a > > > > different issue > > > > > > > > --- In [email protected] > > <mailto:amibroker%40yahoogroups.com> <mailto:amibroker% > > 40yahoogroups.com>, > > > > Andy Davidson <AndyDavidson@> > > > > wrote: > > > > > > > > > > Fred, > > > > > > > > > > Long post I'm afraid, but bear with me... > > > > > > > > > > Since our last conversation I've been doing some head- > > scratching on > > > > > which method of CMA is best for extracting cycles. After re- > > reading > > > > > Millard and then trying to theorise my way in ever- decreasing > > > > circles > > > > > about what *should* be the best way, I decided to try to > > experiment > > > > and > > > > > find out what works best *in practice*. I've attached the > > results > > > > in the > > > > > form of plots and a summary spreadsheet for your (or anyone > > else's) > > > > > interest. Here's the logic behind the method (AFL code posted > > below > > > > for > > > > > sake of completeness) : > > > > > > > > > > 1. I created two independant sine waves and a 'noise' component. > > > > These > > > > > individual components are plotted in the top pane. > > > > > 2. I then added these together to create a composite 'price- > > like' > > > > plot - > > > > > plotted in grey in the bottom pane. > > > > > 3. Four different kinds of Centred-MA (see below) were then > > plotted > > > > on > > > > > the bottom pane, with the composite as an input. The aim was to > > > > select a > > > > > periodicity for each CMA that would filter out the noise and the > > > > shorter > > > > > wavelength cycle (cycle 2), leaving the closest possible > > > > representation > > > > > of the longer cycle 1. > > > > > 4. The lag, wavelength and amplitude of this CMA plot were then > > > > > *measured* (i.e. they weren't deduced theoretically, but were > > > > actual > > > > > observed values). > > > > > 5. The values were compared on the spreadsheet. > > > > > > > > > > The four different CMAs were based on: > > > > > (a) Simple MA. The most basic centred SMA > > > > > (b) Millard's "Smoothed Average" from Chapter 7...i.e. an MA of > > > > > n-periods which has been smoothed again by an MA of n/2 periods. > > > > > (c) Triangular MA. This is an n/2 MA of an n/2 MA > > > > > (d) Custom MA. This is per your last email with the first MA > > being > > > > > n*0.75 and the second being half that. > > > > > > > > > > The Triangular MA has the same lag characteristics as a Simple > > MA. > > > > > However, in order to get the same *filtering* effect (i,e, to > > take > > > > out > > > > > cycle 2 completely) you have to near-enough double the > > periodity, > > > > which > > > > > then obviously takes the lag up. Experimenting seems to suggest > > > > that you > > > > > don't actually have to double it, which I guess is why I > > settled on > > > > a > > > > > multiplying factor of 1.5 for my Cycle Highlighter indicator. I > > > > think I > > > > > originally settled on 1.5 after mis-reading Millard's section on > > > > the > > > > > "Weighted MA" and have therefore been using something which was > > > > > nearly-correct but for the wrong reasons! Oh well, at least I > > have > > > > a > > > > > better idea now. However, the results of this seem to suggest > > that > > > > 1.75 > > > > > would be a better number, so I've changed my indicator > > accordingly. > > > > I'm > > > > > sure there's good theory behind why this should be so, but I > > can't > > > > think > > > > > it through. Can you? > > > > > > > > > > So anyway, all that testing seems to show is that Millard's > > > > Smoothed > > > > > Average is the best for this purpose. My triangular MA seems to > > > > have > > > > > been suffering too much lag than necessary, for an output which > > > > also > > > > > suffers more damping. There seems to be nothing to choose > > between > > > > your > > > > > "Custom" CMA and the "Smoothed Average". This is obviously > > because > > > > they > > > > > are basically the same thing. Both are MAs smoothed by another > > MA > > > > half > > > > > the first's length. The fact that the "Smoothed Average" starts > > off > > > > with > > > > > and n-period MA and the "Custom" one starts with n- periods*0.75, > > > > just > > > > > means that the latter has to have "n" ramped up to provide the > > same > > > > > filtering/smoothing effect. > > > > > > > > > > OK, so far so good. I've decided to ditch the Tri-CMA in favour > > of > > > > the > > > > > "Smoothed CMA". But here's another question. Millard states > > > > ("Weighted > > > > > Average" section) that for those of us with computers(!!) it is > > > > > preferable to chose a centrally-weighted MA. Anyone know how to > > do > > > > that > > > > > without slowing things down even more? Is that the same as the > > > > geometric > > > > > mean?? My maths really is too rusty. The standard WMA function > > is > > > > no > > > > > good as it applies the maximum weighting to the *most recent* > > bar. > > > > We > > > > > would need, for example, in a 7-bar MA to have a weighting > > sequence > > > > of > > > > > 1-2-3-4-3-2-1 > > > > > > > > > > That'll do for now. Tomorrow's job is to add a third, longer, > > cycle > > > > and > > > > > see how extracting the middle cycle goes. > > > > > > > > > > Cheers, > > > > > Andy > > > > > > > > > > > > > > > Fred wrote: > > > > > > > > > > > > You won't need the math texts to get though Hurst's course > > > > > > material ... What you will need is time and patience ... > > > > > > > > > > > > The 2 / 3 factor is in essence I thought what you were > > advocating > > > > > > i.e. the first cycle length being twice the second ...and the > > lag > > > > > > being the combo of 1 less then half of both ... Millard > > suggests > > > > such > > > > > > a methodology in chapter 7. > > > > > > > > > > > > The Hurst "Like" DE AFL I posted in the library was an > > interesting > > > > > > project ... It seems however that the points could be better > > > > picked > > > > > > then by using CMA's ... But that's another exercise ... > > > > > > > > > > > > --- In [email protected] > > <mailto:amibroker%40yahoogroups.com> > > > > <mailto:amibroker%40yahoogroups.com> <mailto:amibroker% > > > > 40yahoogroups.com>, > > > > > > Andy Davidson <AndyDavidson@> > > > > > > wrote: > > > > > > > > > > > > > > Don't worry Fred, straight talk is good for us all :-) > > > > > > > > > > > > > > I'll think about that 2/3 factor tomorrow - it's late here > > and > > > > my > > > > > > brain > > > > > > > is aching. > > > > > > > > > > > > > > I ordered the Cleeton book a while back but it still hasn't > > > > > > arrived. I > > > > > > > think it'll make for a nice relaxing Xmas read! I've got the > > > > book > > > > > > by > > > > > > > Hurst (Profit Magic), but I froze when I got to Appendix 6 > > and > > > > so I > > > > > > > think I need Cleeton as you suggest! The Hurst course is on > > the > > > > > > list as > > > > > > > well, but first I think I'll have to get some old Maths > > texts > > > > out > > > > > > of the > > > > > > > attic and get the grey matter working again in that > > respect. My > > > > > > maths is > > > > > > > sadly lacking also and I feel it's really not adequate to > > take > > > > me > > > > > > any > > > > > > > further than I've got without some hard graft. Oh well, > > needs > > > > must > > > > > > I > > > > > > > suppose. > > > > > > > > > > > > > > As far as channels go, I had a look at your Hurst DE quickly > > > > today. > > > > > > I > > > > > > > played with Hurst-like channel trading myself a while back > > > > (when I > > > > > > was > > > > > > > still a naive Metastock user - yeah, I know, but it was OK > > for > > > > at > > > > > > least > > > > > > > that). I found that my skills were below that needed to > > tackle > > > > the > > > > > > > extrapolation problem and so it was simply a matter of using > > > > > > discretion > > > > > > > and 'eyeballing' a la Hurst. > > > > > > > > > > > > > > That was when I found Millard's book and latched on to his > > Cycle > > > > > > > Highlighter. To me it was (and still is) a simple and > > effective > > > > way > > > > > > of > > > > > > > determining the cycles if you have a bias towards > > discretionary > > > > > > trading > > > > > > > as I currently do. And by nature it is a normalised plot, > > so it > > > > > > seemed > > > > > > > logical to me to go about extrapolating on that plane > > before I > > > > > > tried to > > > > > > > tackle the price plot. However, I am now convinced (thanks > > in no > > > > > > small > > > > > > > part to yourself) that it is worth pursuing further with the > > > > > > ultimate > > > > > > > aim of automating the whole cycle-extraction process. > > > > > > > > > > > > > > So here's to the next step of the journey...hard graft and > > all. > > > > > > > > > > > > > > > > > > > > > Fred wrote: > > > > > > > > > > > > > > > > Thanks for the description ... It wasn't a sarcastic > > comment > > > > per > > > > > > > > se ... It is imho a benefit to be able to hear from > > authors of > > > > > > code > > > > > > > > what the process is that is going on as opposed to someone > > > > > > > > unfamiliar with the code having to dig it out ... > > > > > > > > > > > > > > > > I agree with your comments in 1 & 2 ... I had initially > > > > > > implemented > > > > > > > > Millard's CMA in the Hurst DE I posted in the library this > > > > way ... > > > > > > > > > > > > > > > > Lag = int(Period / 2); > > > > > > > > CMA = Ref(MA(MA(Data, Lag), Lag), Lag); > > > > > > > > > > > > > > > > It would seem though after reading Millard more carefully > > > > that a > > > > > > > > better implementation is something like > > > > > > > > > > > > > > > > CMAL1 = Int(Period * 2 / 3); > > > > > > > > if (CMAL1 < 5) > > > > > > > > CMAL1 = 5; > > > > > > > > If (CMAL1 % 2 == 0) > > > > > > > > CMAL1 = CMAL1 + 1; > > > > > > > > CMAL2 = Period - CMAL1; > > > > > > > > If (CMAL2 % 2 == 0) > > > > > > > > CMAL2 = CMAL2 + 1; > > > > > > > > Lag = (CMAL1 - 1) / 2 + (CMAL2 - 1) / 2; > > > > > > > > > > > > > > > > CMA = Ref(MA(MA(Data, CMAL1), CMAL2), Lag) > > > > > > > > > > > > > > > > The only potential problem I see with this approach is it > > > > makes > > > > > > the > > > > > > > > minimum overall CMA Length 8. > > > > > > > > > > > > > > > > For the current AFL I implemented a simple CMA ... no > > muss / > > > > > > > > fuss ... The reason is that the CMA would be sampled and > > > > > > potentially > > > > > > > > smoothed again ... > > > > > > > > > > > > > > > > I don't know whether or not you have Hurst's PM but he > > covers > > > > ( > > > > > > very > > > > > > > > quickly ) the topic of pulling out the coeff's for > > multiple > > > > cycles > > > > > > > > simultaneously in what is to me any way some rather > > complex > > > > math > > > > > > in > > > > > > > > Appendix 6 ... But then I'm hardly a math Wiz ... If you > > are > > > > > > > > interested in this kind of thing I would strongly > > recommend > > > > > > > > Cleeton's book which while out of print is still readily > > > > available > > > > > > > > at Amazon and other places for a few bucks used. He > > discusses > > > > how > > > > > > > > to perform a similar operation for one cycle and for > > multiple > > > > > > cycles > > > > > > > > simultaneously with one of the early steps being sampling > > of > > > > the > > > > > > > > CMA ... He uses those points directly and as you can tell > > > > from my > > > > > > > > description I opted for this approach more or less as well > > > > which > > > > > > > > seems to produce some interesting results without > > requiring > > > > > > Gaussian > > > > > > > > Elimiation to solve multiple simultaneous equations. > > > > > > > > > > > > > > > > --- In [email protected] > > <mailto:amibroker%40yahoogroups.com> > > > > <mailto:amibroker%40yahoogroups.com> > > > > > > <mailto:amibroker%40yahoogroups.com> <mailto:amibroker% > > > > > > 40yahoogroups.com>, > > > > > > > > Andy Davidson <AndyDavidson@> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > Hi Fred, > > > > > > > > > > > > > > > > > > It's good to be able to get back on this subject again, > > > > > > especially > > > > > > > > as it > > > > > > > > > looks like there's a few of us who are 'into' cycles. > > > > > > > > > > > > > > > > > > Your work-in progress looks very interesting I must > > say. I > > > > > > > > particularly > > > > > > > > > like the idea in step 5 to reduce the data before > > finding a > > > > > > > > > fit...brilliant in its simplicity. I also think your > > > > equation in > > > > > > > > step 6 > > > > > > > > > will help me out...but without getting into that, > > here's the > > > > > > > > general > > > > > > > > > logic of my approach for comparison (and I take the > > > > sarcastic(?) > > > > > > > > comment > > > > > > > > > about explaining in English...I didn't do a good job of > > > > notating > > > > > > > > the > > > > > > > > > script properly!) > > > > > > > > > > > > > > > > > > 1. Calculate *two* CMAs using triangular-smoothed MAs. > > CMA1 > > > > is > > > > > > n- > > > > > > > > periods > > > > > > > > > length and CMA2 is n/2-periods. Both periods are > > rounded up > > > > to > > > > > > the > > > > > > > > > nearest odd number. > > > > > > > > > 2. CMA1 allows wavelengths > n-periods to pass and > > filters > > > > out < > > > > > > > > > n-period waves. CMA2 allows through all cycle > > wavelengths > > > > > n/2- > > > > > > > > periods > > > > > > > > > and filters out those < n/2. Therefore, subtracting CMA2 > > > > from > > > > > > CMA1 > > > > > > > > will > > > > > > > > > give us the cycle (or combination of cycles if we're > > unlucky > > > > > > > > enough, or > > > > > > > > > have our value of n wrong) that lies between n/2 and n. > > > > > > > > > > > > > > > > > > Steps 1 and 2 are as per Millard's "Cycle Highlighter" > > (CH), > > > > > > > > except he > > > > > > > > > states that the best results are obtained with CMA1 > > being > > > > an SMA > > > > > > > > and > > > > > > > > > CMA2 being a Weighted MA. He also says CMA1 periods > > should > > > > be > > > > > > > > *equal* to > > > > > > > > > the wavelength to be isolated. This does work but, > > through > > > > > > > > > experimenting, I have found that Triangular-MAs are > > best for > > > > > > both > > > > > > > > as > > > > > > > > > they offer the superior smoothing-to-lag trade off. > > > > Furthermore, > > > > > > > > the > > > > > > > > > periodicity of CMA1 should be x1.5 the cycle you want > > > > (making > > > > > > CMA2 > > > > > > > > > therefore x0.75). The logic still holds up and the > > results > > > > are > > > > > > > > better > > > > > > > > > IMO, with a more sine-like output. > > > > > > > > > > > > > > > > > > 3. Based on user-inputs (see below) I then generate an > > > > > > artificial > > > > > > > > sine > > > > > > > > > wave. This is *anchored to the CH at its most recent > > (i.e. > > > > > > > > confirmed) > > > > > > > > > peak or trough*. > > > > > > > > > 4. Correlation coefficients are calculated between (a) > > the > > > > sine > > > > > > > > wave and > > > > > > > > > the CH (or price - depending on user input) over > > > > the 'lookback' > > > > > > > > period > > > > > > > > > (see below) and (b) the sine wave and the price in > > the 'end > > > > > > zone' > > > > > > > > (i.e. > > > > > > > > > the no-data zone for the CH at the right-hand edge). > > > > > > > > > > > > > > > > > > Inputs: > > > > > > > > > "SINE WAVELENGTH" - this determines if the wavelength > > of the > > > > > > sine > > > > > > > > is (a) > > > > > > > > > "as per the base cycle (CH)" (i.e. there is no attempt > > > > to 'fit' > > > > > > > > the two > > > > > > > > > curves beyond the anchor point) or (b) a "best fit". In > > the > > > > > > second > > > > > > > > case, > > > > > > > > > the sine wavelength will depend on: > > > > > > > > > "BEST FIT # RECENT CYCLES" - this is the number of full, > > > > > > completed > > > > > > > > > cycles of the CH where the correlation is measured. The > > > > start > > > > > > > > point of > > > > > > > > > X-cycles back is shown by a blue and red tick on the > > > > indicator. > > > > > > If > > > > > > > > > option (b) is chosen above the average wavelength of > > the CH > > > > is > > > > > > > > measured > > > > > > > > > in the zone from the blue tick to the end of its plot. > > This > > > > > > value > > > > > > > > is > > > > > > > > > assigned to the sine plot. If option (a) above then we > > just > > > > get > > > > > > X- > > > > > > > > cycles > > > > > > > > > back of both plots at the same periodicity. > > > > > > > > > > > > > > > > > > All the above is as per the first indicator I posted. > > The > > > > > > > > following > > > > > > > > > loops are done in the auto-fit version: > > > > > > > > > > > > > > > > > > 5. A loop from "Wavelength Min" to "Wavelength Max" is > > > > performed > > > > > > > > to find > > > > > > > > > the highest total correlation coefficient (a weighted > > > > average of > > > > > > > > the > > > > > > > > > 'CH/sine' and the 'sine/end-zone price' values). > > > > > > > > > 6. The series of loops is repeated for "#Cycles Min" > > > > lookback up > > > > > > > > to 5 > > > > > > > > > cycles lookback. I chose 5 as an arbitrary number...it's > > > > slow > > > > > > > > enough as > > > > > > > > > is and very rarely do you get a decent correlation going > > > > that > > > > > > far > > > > > > > > back. > > > > > > > > > Obviously though when you do, you take notice. > > > > > > > > > > > > > > > > > > That's as much as I can tell you right now about the > > logic. > > > > Does > > > > > > > > it > > > > > > > > > work? Well, with the usual caveats blah-blah-blah, I > > would > > > > say > > > > > > > > that it > > > > > > > > > has been a very useful tool for me for a while now *in > > > > > > conjunction > > > > > > > > with > > > > > > > > > other confirming and entry methods* > > > > > > > > > > > > > > > > > > Bear in mind that the purpose of the indicator is to > > find > > > > the > > > > > > > > *clearest* > > > > > > > > > cycle amongst those present, i.e. the one that conforms > > most > > > > > > > > closely to > > > > > > > > > a sine wave, and is therefore tradeable *on that time > > > > frame*. I > > > > > > > > will > > > > > > > > > manually switch between time-frames to get the various > > major > > > > > > > > cycles > > > > > > > > > (e.g. 1-hour, 4-hour, daily and weekly charts). Work > > > > on 'auto- > > > > > > ing' > > > > > > > > all > > > > > > > > > that would be very processor intensive and requires > > further > > > > > > > > thinking. > > > > > > > > > > > > > > > > > > The plot you sent seems to bear out a further truth > > about > > > > > > trading > > > > > > > > with > > > > > > > > > cycles, one that I've experienced with this indicator > > more > > > > than > > > > > > > > once: > > > > > > > > > i.e. short-term cycles (measured in hours and a few > > days) > > > > are > > > > > > less > > > > > > > > > tradeable than longer-term ones (measured in a few days > > > > upwards > > > > > > to > > > > > > > > weeks > > > > > > > > > & months). Certainly, in the plot you sent, most of the > > > > smoothed > > > > > > > > price > > > > > > > > > behaviour can be explained by the interaction of the two > > > > longest > > > > > > > > > measured cycles (dark blue and cyan). > > > > > > > > > > > > > > > > > > Anyway, I look forward to ploughing through all the good > > > > stuff > > > > > > > > you've > > > > > > > > > already posted and hope you can help keep this thread > > going. > > > > > > > > There's > > > > > > > > > lots of really cool stuff going on here. > > > > > > > > > > > > > > > > > > Cheers for now, > > > > > > > > > Andy > > > > > > > > > > > > > > > > > > > > > > > > > > > Fred Tonetti wrote: > > > > > > > > > > > > > > > > > > > > Andy, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Can you describe in English what your AFL does ? ... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I've been playing with a Trig Fit a la Claud Cleeton > > the > > > > steps > > > > > > > > for > > > > > > > > > > which I would describe as follows ... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 1. Optional - Normalize the input i.e. Data = log10 > > ((H + > > > > L) / > > > > > > 2) > > > > > > > > > > > > > > > > > > > > 2. Calc an arbitrary length ( Parameterized but 11 at > > the > > > > > > > > moment ) > > > > > > > > > > centered moving average ( CMA ) of the data > > > > > > > > > > > > > > > > > > > > 3. Calc a 1st order least squares fit ( LSF ) of the > > CMA > > > > over > > > > > > > > the > > > > > > > > > > period desired ( from / to range marker ) > > > > > > > > > > > > > > > > > > > > 4. Subtract the LSF points from the data points > > resulting > > > > in > > > > > > > > detrended > > > > > > > > > > data. > > > > > > > > > > > > > > > > > > > > 5. Take an n-bar sampling of the detrended data. This > > > > array > > > > > > > > with > > > > > > > > > > "holes" or "gaps" in it needs either to be compressed > > or > > > > have > > > > > > > > the > > > > > > > > > > "gaps" filled ... I elected ( for the moment ) to > > calc a > > > > cubic > > > > > > > > spline > > > > > > > > > > to fill the gaps ( interpolation ) ... > > > > > > > > > > > > > > > > > > > > 6. Calc a LSF of the detrended data resulting in the > > > > coeffs > > > > > > for > > > > > > > > the > > > > > > > > > > Trig equation Y = A Cos wX + B * Sin wX > > > > > > > > > > > > > > > > > > > > 7. Calc the correlation of the resulting sin wave to > > the > > > > > > > > original > > > > > > > > > > detrended data. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Repeat steps 5 & 6 varying n from 1 to ? looking for n > > > > where > > > > > > the > > > > > > > > > > correlation is the highest. This should yield the > > > > equation or > > > > > > > > data > > > > > > > > > > points that most closely correlate to the detrended > > data. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 8. Subtract the points in the sin wave from the > > detrended > > > > data > > > > > > > > > > resulting in a modified detrended data. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Repeat steps 5 - 8 looking for the next most > > significant > > > > > > cycle. > > > > > > > > This > > > > > > > > > > can be done repeatedly until overall correlation stops > > > > getting > > > > > > > > better > > > > > > > > > > and usually results in 2 - 6 cycles ... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > See attached ... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The white line in the upper graph is detrended > > price ... > > > > > > > > > > > > > > > > > > > > The alternating green / red line is the trig fit, in > > > > sample up > > > > > > > > to the > > > > > > > > > > vertical line and out of sample projection > > afterwards ... > > > > > > > > > > > > > > > > > > > > The lines in the bottom section are the individual > > cycles > > > > > > found > > > > > > > > in the > > > > > > > > > > data. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Sometimes the projections are almost clairvoyant ... > > run > > > > time > > > > > > > > however > > > > > > > > > > is anything but quick ... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -------------------------------------------------- ---- > > ---- > > > > > > > > ------- > > > > > > > > > > I am using the free version of SPAMfighter for private > > > > users. > > > > > > > > > > It has removed 8649 spam emails to date. > > > > > > > > > > Paying users do not have this message in their emails. > > > > > > > > > > Try SPAMfighter <http://www.spamfighter.com/go.asp? > > <http://www.spamfighter.com/go.asp?> > > t=249 > > > > <http://www.spamfighter.com/go.asp?t=249 > > <http://www.spamfighter.com/go.asp?t=249>> > > > > > > <http://www.spamfighter.com/go.asp?t=249 > > <http://www.spamfighter.com/go.asp?t=249> > > > > <http://www.spamfighter.com/go.asp?t=249 > > <http://www.spamfighter.com/go.asp?t=249>>> > > > > > > > > <http://www.spamfighter.com/go.asp?t=249 > > <http://www.spamfighter.com/go.asp?t=249> > > > > <http://www.spamfighter.com/go.asp?t=249 > > <http://www.spamfighter.com/go.asp?t=249>> > > > > > > <http://www.spamfighter.com/go.asp?t=249 > > <http://www.spamfighter.com/go.asp?t=249> > > > > <http://www.spamfighter.com/go.asp?t=249 > > <http://www.spamfighter.com/go.asp?t=249>>>>> for > > > > > > > > free now! > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: http://www.amibroker.com/devlog/ For other support material please check also: http://www.amibroker.com/support.html Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/amibroker/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
