How to Compile the AFL code


Well-Known Member
i read the help
use debug view
and use _TRACE

but i didn't got it
if anybody have time plz elaborate me with example

i would be very grateful to him who could help me.....

eagerly waiting.....
* Purpose: To troubleshoot your AFL script

* TRACE Help Guide

* Setup Trace Window
TRACE by default output to Microsoft DebugView window.
You can switch to internal Log Window under Trace Tab.

* Sample - to find the right most and left most visible bars
play with it. The message must shown in the trace window.

_TRACE( "!CLEAR!" );		//For trouble-shooting

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 

bi = BarIndex();		// Just shorthand
FirstVisibleBar = FirstVisibleValue( bi );
LastVisibleBar = LastVisibleValue( bi );						

VisibleBars = LastVisibleBar - FirstVisibleBar;			//Used in trouble-shooting.
_TRACE( "1st Visible: " + FirstVisibleBar + "    Last Visible: " + LastVisibleBar + "    #bars: " + VisibleBars );

_TRACE( "BarCount: " + BarCount);
_TRACE( "BarIndex: " + bi);
Last edited:

Similar threads

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

Are you a day trader?