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

RE: [amibroker] Bollinger and ADX scan


  • Date: Mon, 14 Dec 2009 14:37:33 -0500
  • From: Rajiv Arya <rajivarya87@xxxxxxxxxxx>
  • Subject: RE: [amibroker] Bollinger and ADX scan

PureBytes Links

Trading Reference Links



BBdiff=bbandTop-bbandBot;
midiff=pdi(range)-mdi(range);
 
filter=(bbdiff<=5) and (midiff>=5);
 
R
 

To: Technical-Investor@xxxxxxxxxxxxxxx
CC: amibroker@xxxxxxxxxxxxxxx; amibroker.at@xxxxxxxxxxxxxxx
From: deepakpatade@xxxxxxxxx
Date: Mon, 14 Dec 2009 07:42:47 -0800
Subject: [amibroker] Bollinger and ADX scan

Hello,
Please help me writing a scan
there are two simple conditions
cond1=BBtop(minus)BBbot=less than 5
cond2=+DI(minus) -DI=greater than 5
 
Scan should return stocks that meet both the criteria
 
Attaching bollinger BBtop , BBbot, +DI and -DI for easy reference
 
_SECTION_BEGIN("bollinger");
SetChartOptions( 0,chartShowArrows|chartShowDates );
Filename = StrLeft(_DEFAULT_NAME(),StrLen( _DEFAULT_NAME())-2) ;
_N(Title = filename + StrFormat(" - {{INTERVAL}} {{DATE}} \nOpen %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +"
{{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", colorBlack, styleNoTitle | ParamStyle(" Style", styleCandle, maskAll) ); // shows all style options
P = ParamField(" Price field",-1);
Periods = Param("Periods" , 15, 2, 300, 1 );
Width = Param("Width" , 2, 0, 10, 0.05 );
Color = ParamColor(" Color", colorCycle );
Style = ParamStyle(" Style");
bbTop = BBandTop( P, Periods, Width );
bbBot = BBandBot( P, Periods, Width );
Buy = Low <= bbBot;
Sell = High >= bbTop;
Plot( bbTop, "\nBBTop" + _PARAM_VALUES( ), Color, styleLine );
Plot( bbBot, "\nBBBot" + _PARAM_VALUES( ), Color, styleLine );
PlotShapes(Buy * shapeUpArrow, colorGreen, 0, L, -10);
PlotShapes(Sell * shapeDownArrow, colorRed, 0, H, -10);
_SECTION_END();

_SECTION_BEGIN("ADX");
range = Param("Periods", 14, 2, 200, 1 );
Plot( ADX(range), _DEFAULT_NAME(), ParamColor( "ADX color", colorBlue ), ParamStyle("ADX style", styleThick ) );
Plot( PDI(range), "+DI", ParamColor( "+DI color", colorGreen ), ParamStyle("+DI style") );
Plot( MDI(range), "-DI", ParamColor( "-DI color", colorRed ), ParamStyle("-DI style") );
_SECTION_END();
 
Deepak Patade,
Nasik.



Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up now.

__._,_.___


**** 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/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___