Skip to main content

Trend Indicator for Amibroker (AFL)

Awadesh over 13 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 4)
  • Tags:
    amibroker

Indicates the Trend

Indicator / Formula

Copy & Paste Friendly
K =1;
X1 = 0; Y1 = 60;
GfxSelectSolidBrush( ColorRGB(30,30,30));
GfxSelectPen( colorLavender, 1 );
GfxRectangle( x1, y1-10, X1+210, y1+10 ) ;
TimeFrameSet( inDaily ); 
for (i = BarCount-11; i < BarCount-2; i++){ 
//GfxTextOut(""+K+ " = " + Close[i+1], X1, Y1+(K*15));
if(!IsEmpty(Close[i])){
	if(Close[i] < Close[i+1]){
	GfxSelectPen( colorBrightGreen, 2 );
	GfxSelectSolidBrush( colorBrightGreen );
	GfxCircle( X1+(k*15), Y1, 5 );  }
	else { 
	GfxSelectPen( colorRed, 2 );
	GfxSelectSolidBrush( colorRed );  
	GfxCircle( X1+(k*15), Y1, 5 );  }
}
//loop
k++;
}
GfxSetBkColor ( colorBlue );
GfxTextOut("Today", X1+(K*15), Y1-8);
k++;
if(Close[BarCount-2] < Close[BarCount-1]){
GfxSelectPen( colorBrightGreen, 2 );
GfxSelectSolidBrush( colorBrightGreen );
GfxCircle( X1+30+(k*15), Y1, 5 );  }
else { 
GfxSelectPen( colorRed, 2 );
GfxSelectSolidBrush( colorRed );  
GfxCircle( X1+30+(k*15), Y1, 5 );  }

//GfxTextOut(""+i+ " = " + Close[BarCount-1], X1, Y1+(K*15));
TimeFrameRestore();

3 comments

over 13 years ago

hello awadesh, kindly explain on how do we take entry and exit.
thanks

over 13 years ago

hello awadesh, kindly explain on how do we take entry and exit.
thanks

over 13 years ago

Sir awadesh, kindly explain on how do we take entry and exit Plsssssssssssssssss Sirrrrrrrrrr.

By Elango Tirupur
Email :elango6557@gmail.com

Leave Comment

Please login here to leave a comment.