Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Gaps for Amibroker (AFL)
na1982
almost 15 years ago
Amibroker (AFL)

Rating:
3 / 5 (Votes 5)
Tags:
amibroker, exploration

This code will search for bars which gap and then close inside the previous bar.

Created by Saiter, 2010

Similar Indicators / Formulas

Three Day Balance Points
Submitted by nvkha over 10 years ago
Deel - Average Dollar Price Volatility
Submitted by kaiji almost 15 years ago
DIX50,20,10
Submitted by morgen over 14 years ago
4-Day-Range Switch
Submitted by santho_sd over 14 years ago

Indicator / Formula

Copy & Paste Friendly
//This code will search for bars which gap and then close inside the previous 
//bar. No copyright blah blah. Created by saiter, 2010.

_SECTION_BEGIN("Gaps");
//Switches
sUp = ParamToggle("Show Gap ups?", "NO|YES", 1);
sDown = ParamToggle("Show Gap downs?", "NO|YES", 1);
f0 = ParamList("Search for:", "Gap down|Gap up", 0);

//Create the arrays
gd=Null;
gu=Null;

//Search for the bars

for(i=1;i<BarCount;i++)
{
	if(O[i]<L[i-1] AND C[i]>L[i-1] AND C[i]<H[i-1])
		gd[i]=1;
	else gd[i]=0;
	if(O[i]>H[i-1] AND C[i]<H[i-1] AND C[i]>L[i-1])
		gu[i]=1;
	else gu[i]=0;
}

//Plot stuff
Plot(C,"Close", colorBlack, styleBar);
if(sDown)
	PlotShapes(IIf(gd, shapeSmallCircle, shapeNone), colorRed, 0, L, -15);
if(sUp)
	PlotShapes(IIf(gu, shapeSmallCircle, shapeNone), colorGreen, 0, H, 15);

//Filters
NumColumns=1;
if(f0=="Gap down")
	Filter=gd;
if(f0=="Gap up")
	Filter=gu;
_SECTION_END();

1 comments

1. judge601

Nice…//

Leave Comment

Please login here to leave a comment.

Back