Skip to main content

filter out the noise of the trend for Amibroker (AFL)

hosein_gh over 12 years ago Amibroker (AFL)

  • Rating:
    4 / 5 (Votes 5)
  • Tags:
    amibroker, trend

this indicator is very useful. It filters out the noise of the trend which the open-close data from the prior period and the open-high-low-close data from the current period. This technique of combining the previous and the current period results into a candle which substantially reduces the volatility in the price movement and gives out a clear trend. Unlike their counterpart from which they originate (Normal Candlesticks), It do not have any Bullish-Bearish patterns. These are simply used to identify trending periods, potential reversal points and technical analysis patterns like range breakouts, triangles and rectangles. Nevertheless, when it comes to identifying trend, this works very well.

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("NN Looping ( no AMA() )");
///////////////////////////////////////////////////////////
//
// Calculated Properly with no use of AMA
//
//
//

NNClose[0] = (Open[0]+High[0]+Low[0]+Close[0]) / 4;
NNOpen[0]  = (NNClose[0] + Open[0]) / 2;
NNHigh[0]  = Max( High[0], Max( NNClose[0], NNOpen[0] ) );
NNLow[0]   = Min( Low[0], Min( NNClose[0], NNOpen[0] ) );

for (i=1; i<BarCount; i++)
	{
	NNClose[i] = (Open[i]+High[i]+Low[i]+Close[i]) / 4;
	NNopen[i]  = (NNClose[i-1] + NNOpen[i-1]) / 2; // Here is the problem when using Arrays: Haopen always uses its own previous value
	NNHigh[i]  = Max( High[i], Max( NNClose[i], NNOpen[i] ) );
	NNlow[i]   = Min( Low[i], Min( NNClose[i], NNOpen[i] ) );
}
PlotOHLC( NNOpen, NNHigh, NNLow, NNClose, "NN", colorBlack, styleCandle );

Title = Name()+" "+Date()+" Heikin Ashi -- NNOpen:"+NumToStr(NNOpen,1.2,True)+"
/ NNHigh:"+NumToStr(NNHigh,1.2,True)+" / NNLow:"+NumToStr(NNlow,1.2,True)+"
NNClose:"+NumToStr(NNclose,1.2, True);

_SECTION_END();

5 comments

over 12 years ago

Iam new commer of commodity market.losses huge money,please give one buy sell system which give me 99% success.any way i may promise any condition…

over 12 years ago

pulakesh13, do yourself a favor and stop trading and educate yourself first on the subject.

Leave Comment

Please login here to leave a comment.