How to Compile the AFL code

KelvinHand

Well-Known Member
#2
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.....

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

* TRACE Help Guide
http://www.amibroker.com/guide/afl/afl_view.php?id=222

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

http://www.amibroker.com/guide/w_log.html



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


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

SetChartOptions(0,chartShowArrows|chartShowDates);
_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.

Name:Phone:
Email:City:
State:
Are you a day trader?