[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Drummond Geomentry for Amibroker



PureBytes Links

Trading Reference Links

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 amibroker@xxxxxxxxxxxxxxx, "Don Lindberg" <dlindber@xxx> 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.
>



------------------------------------

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL 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:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/