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

TD DeMarker Plane for Amibroker (AFL)

Rating:
4 / 5 (Votes 4)
Tags:
amibroker, moving average

here i used the codes by others but wht i have done is adopted for proper combination of indicators.
1. Demarker
2. JMA
3. ALMA
Actually in indicator panel u could see 2 waves one is JMA of Demarker and the other is signal line i.e. ALMA of JMA.

Trading rule so simple

Buy on JMA ,ALMA crossover.
sell on ALMA ,JMA crossover.

the beauty of this indicator is use it in any time frame; it will make sure tht u will almost always end up in profits.

Credits to those original coders….

Screenshots

Similar Indicators / Formulas

Hull Moving Average (HMA)
Submitted by kaiji almost 10 years ago
Beauty
Submitted by sbtc555 over 6 years ago
Smoothed MA (SSMA)
Submitted by kelvinhand over 6 years ago
Trend Scalping System
Submitted by esnataraj over 9 years ago
Volume wieghted moving average
Submitted by kaiji almost 10 years ago
Buff Volume Weighted Moving Averages
Submitted by kaiji almost 10 years ago

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("TD DeMarker Plane");
t=Param("time",13,1,200,1);

highm = IIf( H > Ref( H, -1 ), H - Ref( H, - 1), 0 );
lowm = IIf( L < Ref( L, -1 ), Ref( L, - 1 ) - L, 0 );

DeMarker = 100 *  Sum( highm, t )/( Sum( lowm, t ) + Sum( highm, t ) );

Plot(DeMarker,"DeMarker plane",ParamColor("color",Colorcycle),ParamStyle("style",styleLine));


function JMA( array, per )
{
TN1=MA(array,per);
s1=0;
for( i = 0; i < per; i=i+1 )
{
s1=s1+((per-(2*i)-1)/2)*Ref(array,-i);
}
return TN1+(((per/2)+1)*S1)/((per+1)*per);
}
k=Param("Period",15,1,100,1);
p = ParamField("Price Field");

J=JMA(C,k);
Plot( JMA(p,k), "JMA",ParamColor("color",Colorcycle),ParamStyle("style",styleLine) );


function ALMA(priceField, windowSize, sigma, Offset)
{
	m = floor(Offset * (windowSize - 1));
	s = windowSize / sigma;

	w = 0;
	wSum = 0;

	for(i = 1; i < windowSize; i++)
	{
		w[i] = exp(-((i-m)*(i-m))/(s*s));
		wSum += w[i];
	}

	for(i = 1; i < windowSize; i++)
	{
		w[i] = w[i] / wSum;
	}

	outalma = Null;

	for(j = 0; j < BarCount; j++)
	{
		alSum = 0;

		if(j < windowSize)
		{
			outalma[j] = Null;
		}
		else
		{
			for(i = 1; i < windowSize; i++)
			{
				alSum += priceField[j - (windowSize - 1 - i)] * w[i];
			}

			outalma[j] = alSum;
		}
	}
	
	return outalma;
}

p = ParamField("Price Field");
windowSize = Param("Window Size", 7, 5, 201, 2);
sigma = Param("Sigma", 6, 1, 20);
Offset = Param("Offset", 0.85, 0.05, 1.0, 0.05);

Plot(ALMA(p, windowSize, sigma, Offset), "ALMA", ParamColor("Color",colorBlue), ParamStyle("Style"));

0 comments

Leave Comment

Please login here to leave a comment.

Back