Wow! This is way more than I expected! Thanks a lot. Now I have to learn how to use it. Donald F Lindberg
_____ From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of oceanchimes Sent: Sunday, October 26, 2008 4:24 PM To: amibroker@yahoogroups.com Subject: [amibroker] Re: Drummond Geomentry for Amibroker Don, This maybe along the lines you are looking for. Pls watch out for the broken lines fe dTopCh = HHV(Avg,3); dTopCh = IIf( H>=dTopCh, Null, dTopCh ); dBotCh = LLV(Avg,3); dBotCH = IIf( L<=Ref(dBotCh,-1), Null, dBotCh ); TopCh = HHV(H,3); BotCh = LLV(L,3); wTopCh = TimeFrameCompress( TopCh, inWeekly, compressHigh ); wLvl50 = TimeFrameCompress( Avg, inWeekly ); wBotCh = TimeFrameCompress( BotCh, inWeekly, compressLow ); mTopCh = TimeFrameCompress( TopCh, inMonthly, compressHigh ); mLvl50 = TimeFrameCompress( Avg, inMonthly ); mBotCh = TimeFrameCompress( BotCh, inMonthly, compressLow ); qTopCh = TimeFrameCompress( TopCh, inQuarterly, compressHigh ); qLvl50 = TimeFrameCompress( Avg, inQuarterly ); qBotCh = TimeFrameCompress( BotCh, inQuarterly, compressLow ); /*************************************************************************** ***** CHARTING **************************************************************************** ****/ if( Status("Action")==actionIndicator ) { SetChartOptions(0,chartShowArrows|chartShowDates); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} *** DRUMMOND Geometry ***" + " Open %g, Hi %g, Lo %g," + " Close %g (%.1f%%) Vol " + WriteVal( V, 1.0 ) + "{{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) )); _N(Title = Title +"\n" + EncodeColor(colorRed) + StrFormat("3-day: %0.2f, ", Nz(dTopCh) ) + StrFormat("(Bot): %0.2f, ", Nz(dBotCh) ) + EncodeColor(colorYellow) + StrFormat("3-week: %0.2f, ", Nz(wTopCh) ) + StrFormat("(Bot): %0.2f, ", Nz(wBotCh) ) + EncodeColor(colorBrightGreen) + StrFormat("3-Month: %0.2f, ", Nz(mTopCh) ) + StrFormat("(Bot): %0.2f, ", Nz(mBotCh) ) + EncodeColor(colorTurquoise) + StrFormat("3-Quarter: %0.2f ", Nz(qTopCh) ) + StrFormat("(Bot): %0.2f ", Nz(qBotCh) ) ); Plot( C, "Close", colorWhite, styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) ) { ToolTip=StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g (%.1f%%)" +"\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1 ))); } DilStyle = styleStaircase|styleDashed|styleNoTitle; dVis = Interval()==inDaily; wVis = Interval()==inWeekly; mVis = Interval()==inMonthly; qVis = Interval()==inQuarterly; yVis = Interval()==inYearly; dPlt = dVis OR wVis; wPlt = dVis OR wVis OR mVis; mPlt = dVis OR wVis OR mVis OR qVis; qPlt = mVis OR qVis OR yVis; if(dPlt) { Plot( dTopCh, "3-day", colorRed, DilStyle|styleSwingDots); Plot( dBotCh, "3-day", colorRed, DilStyle); } if(wPlt) { Plot( TimeFrameExpand( wTopCh, inWeekly ), "3-week", colorYellow, DilStyle ); Plot( TimeFrameExpand( wBotCh, inWeekly ), "3-week", colorYellow, DilStyle ); } if(mPlt) { Plot( TimeFrameExpand( mTopCh, inMonthly), "3-Month", colorBrightGreen, DilStyle ); Plot( TimeFrameExpand( mLvl50, inMonthly), "M-50%", colorBrightGreen, DilStyle|styleDots ); Plot( TimeFrameExpand( mBotCh, inMonthly), "3-Month", colorBrightGreen, DilStyle ); } if(qPlt) { Plot( TimeFrameExpand( qTopCh, inQuarterly), "3-Quarter",colorTurquoise,DilStyle ); Plot( TimeFrameExpand( qLvl50, inQuarterly), "Q-50%",colorTurquoise,DilStyle|styleDots ); Plot( TimeFrameExpand( qBotCh, inQuarterly), "3-Quarter", colorTurquoise, DilStyle ); } } --- In [EMAIL PROTECTED] <mailto:amibroker%40yahoogroups.com> ps.com, "Don Lindberg" <[EMAIL PROTECTED]> wrote: > > I have just started studying Drummond Geometry, and I am trying to > understand how I might use in AB. > > In an overly simplistic explaintion, DG requires that a single chart > plots the Highs and Lows of multiple time frames on a SINGLE CHART. > Thus on a Daily Chart I would plot Highs and Lows for Daily, Weekly, > Monthly and Yearly time frames. > > My question - Is this possible? > > Any suggestions would be greatly appreciated. >