Thanks for the info ... will try the code. Wave~Trader
--- In [email protected], "Tomasz Janeczko" <gro...@...> wrote: > > Hello, > > I disagree with statement that "linear interpolation [...] needs to be done". > It is *your private* need, not everyone else need. > Interpolated prices create "artificial reality" (a.ka. fiction) and not > everyone wants > fictional prices. > > General rule for markets that are closed for trading is that LAST actually > traded price is used > and this rule is applied in AmiBroker. > > > If you have private need for interpolation, you can write your own formula to > do this > - detect those bars with volume = 0 and interpolate between bars with > non-zero volume. > > You like linear interpolation, the others may want polynomial, bi-cubic, > Lagrange, band-limited and other kind of > interpolations. One would like to use (H/L)/2 the other one would like to > connect last close with next open. > I could spend months on adding different interpolation methods for 1 or 2 > users > who need specifically that or another. > But there is no one-size-fits-all, you should implement it in your own > formula, if you need that particular realisation. > > Best regards, > Tomasz Janeczko > amibroker.com > ----- Original Message ----- > From: "wavetrader2005" <wave-tra...@...> > To: <[email protected]> > Sent: Friday, August 07, 2009 8:35 PM > Subject: [amibroker] Pad Non-trading Days Feature > > > > Hello TJ, > > > > I've just tried out the "Pad non-trading days" feature in 5.26.5. When > > conducting a cycle analysis on daily data, it's important > > to account for all non-trading days and this feature is a step in the right > > direction. > > > > However, as discussed in an earlier email, when adding the non-trading > > days, a linear interpolation calculation using median price > > ( (H+L/2) ) needs to be done to populate the price fields for those added > > days. Your current method of using just the closing > > price of the bar preceding the "gap" causes problems with the cycle > > indicators I use, as they require a linear interpolated median > > price to calculate on for the added non-trading days (otherwise they will > > plot incorrectly). > > > > The linear interpolation is simple enough: > > 1. Take the difference between the median price of the bar preceding the > > gap and the bar subsequent to the gap. > > 2. Divide this difference by the number of days in the gap PLUS 1; so, for > > a two day gap, the divisor would be 3. > > 3. Add this result to the median price of the bar preceding the gap and use > > this value to populate the price field for the first > > gap; add this same result to the newly calculated price for the first gap > > price, and so on, until all gaps have a calculated > > price. > > > > Could you change your current method over to this method so the cycle > > indicators will work correctly? > > > > Regards, > > > > David Preston > > a.k.a. Wave~Trader > > > > > > > > ------------------------------------ > > > > **** IMPORTANT PLEASE READ **** > > This group is for the discussion between users only. > > This is *NOT* technical support channel. > > > > TO GET TECHNICAL SUPPORT send an e-mail directly to > > SUPPORT {at} amibroker.com > > > > TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at > > http://www.amibroker.com/feedback/ > > (submissions sent via other channels won't be considered) > > > > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > > http://www.amibroker.com/devlog/ > > > > Yahoo! Groups Links > > > > > > >
