[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] AFL drives me nuts



PureBytes Links

Trading Reference Links

Title: AFL drives me nuts
You'll need to down load a tool called Debugview and have it running while you execute your AFL with
_TRACE statement interlaced over your program at breakpoints, or what ever. 
 
See the reference program Pivot Finder by Mark.... I've found I have to be selective in what I print out.
since if you put TRACE statement inside your "for loop" you'll get a few thousand bars of out put where you can see if
i goes from 1 to Barcount.
 
Hope this helps'
JOE
 

_TRACE
- print text to system debug viewer

Miscellaneous functions
(AFL 2.4)


SYNTAX _TRACE(
RETURNS NOTHING
FUNCTION Write debug messages from AFL code to system debug viewer. (it calls internally OutputDebugString Win API function). To view debug messages you have to run DebugView freeware program from http://www.sysinternals.com
EXAMPLE _TRACE("This is a test");
SEE ALSO

References:

The _TRACE function is used in the following formulas in AFL on-line library:

More information:

----- Original Message -----
From: Rush
Sent: Wednesday, April 05, 2006 8:22 AM
Subject: RE: [amibroker] AFL drives me nuts

How do you do a trace?

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Joe Landry
Sent: 05 April 2006 15:03
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] AFL drives me nuts

 

Yes, it does look logical to me and if you change your starting result to zero ...result =0;  it generates and array, Whether that is correct or not, I have no way of knowing unless I debug/trace it.


Hope this helps

JOE

----- Original Message -----

From: Rush

Sent: Wednesday, April 05, 2006 7:09 AM

Subject: [amibroker] AFL drives me nuts

 

This looks correct and logical to me, but it doesn’t work.

result = Null;

        for ( i = 1; i < BarCount; i++ ){

                High1 = High[i];

                High2 = High[i-1];

                Low1 = Low[i];

                Low2 = Low[i-1];

                if((High1 > High2 AND Low1 > Low2) OR (High1 > High2 AND Low1 == Low2)){

                        result[ i ] = result[i - 1] + 1;

                }else if((Low1 < Low2 AND High1 < High2) OR (Low1 < Low2 AND High1 == High2)){

                        result[ i ] = result[i - 1] - 1;

                }else{

                        result[ i ] = result[ i - 1];

                }

        }

        Plot( result, "Digger", ParamColor( "Color", colorBlack ), ParamStyle("Style"));

Thanks




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





YAHOO! GROUPS LINKS