Thanks. Yes, that's what I have for a 20 period Donchian (which I have no 
problems with), but a '4 week' Donchian is a little bit different. i.e. Today 
being Thurs, the Channel high would be the highest high of the last 4 weeks 
(compared to the highest high of the last 20 periods). Just a slight 
difference. =)

Any more suggestions?

 


--- In amibroker@yahoogroups.com, "Lionel Issen" <lis...@...> wrote:
>
> Hi Ram Vel:
> 
> Thanks for this posting.
> 
> The Formula  URL link leads to a page that no longer exists.
> 
> However
> 
> The  Details URL link has all the necessary information.
> 
>  
> 
> Regards
> 
>  
> 
> Lionel
> 
>  
> 
>  
> 
> From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On Behalf 
> Of ram vel
> Sent: Wednesday, August 11, 2010 6:05 AM
> To: amibroker@yahoogroups.com
> Subject: Re: [amibroker] Donchian 4 week high, 2 week low plot
> 
>  
> 
>   
> 
> 
> SEE HERE
> 
> ORIGINAL FORMULA BY R. Bertematto 
> 
> //Keywords: donchian channel
> 
> // Level: basic
> 
> // Flags: indicator
> 
> // Formula URL: http://www.amibroker.com/library/formula.php?id=285
> 
> // Details URL: http://www.amibroker.com/library/detail.php?id=285
> 
> //
> 
> //------------------------------------------------------------------------------
> 
> //
> 
> // This plots a Donchian Channel, similar to a Bollinger Band but based on
> 
> // highs and lows. Good for support/resistance.
> 
> //
> 
> //------------------------------------------------------------------------------
> 
> // Plots a 20 period Donchian channel
> 
> pds=
> 
> 20; 
> 
> DonchianUpper =
> 
> HHV(Ref(H,-1),pds); 
> 
> DonchianLower = 
> 
> LLV(Ref(L,-1),pds); 
> 
> DonchianMiddle = (DonchianUpper+DonchianLower)/
> 
> 2; 
> 
>  
> 
> Plot
> 
> (DonchianUpper,"DU",colorBlue,styleLine); 
> 
> Plot
> 
> (DonchianMiddle,"DM",colorGreen,styleLine); 
> 
> Plot
> 
> (DonchianLower,"DL",colorRed,styleLine); 
> 
> _SECTION_BEGIN
> 
> ("Price"); 
> 
> SetChartOptions
> 
> (0,chartShowArrows|chartShowDates); 
> 
> _N
> 
> (Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, 
> Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )); 
> 
> Plot
> 
> ( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | 
> ParamStyle("Style") | GetPriceStyle() ); 
> 
> _SECTION_END
> 
> (); 
> 
>  
> 
> JUST ADD TIMEFRAME IN CORRECT WAY
> 
> ford
> 
> --- On Wed, 8/11/10, warbaby33x <warbaby...@...> wrote:
> 
> 
> From: warbaby33x <warbaby...@...>
> Subject: [amibroker] Donchian 4 week high, 2 week low plot
> To: amibroker@yahoogroups.com
> Date: Wednesday, August 11, 2010, 4:40 AM
> 
>   
> 
> Have been trying to plot the original Donchian 4 week/2 week system instead 
> of the usual 20 period/10 period channels. However, every time I plot them, 
> and go to the 'daily' chart, the chart seemed to be 'displaced' to the right? 
> What am I doing wrong?
> 
> TimeFrameSet( inWeekly );
> DHigh = Ref(HHV(H, 4), -1);
> DLow = Ref(LLV(L, 2), -1);
> TimeFrameRestore();
> 
> DHighW = TimeFrameExpand( DHigh, inWeekly );
> DLowW = TimeFrameExpand( DLow, inWeekly );
> 
> Plot(C, "Price", colorBlack, styleCandle);
> Plot(DHighW, "Weekly AvgLevel", colorGreen, styleThick );
> Plot(DLowW, "Weekly AvgLevel", colorRed, styleThick );
> 
> I also tried,
> 
> DHigh = HHV(H, 4);
> DLow = LLV(L, 2);
> 
> ...but didn't get far. Any help please?
>


Reply via email to