closed QuickAFL in an Analysis Window

0 votes
asked Jul 13 in AmiBroker by Bob
closed Jul 17 by admin
Hi

I am trying very hard and I still cannot make QuickAFL work in an Analysis Window.

I have the following script that can run from an AW.  It is supposed to give results like this, IF QuickAFL is really working:

>>>>>>>>>>>>
bi (local BarIndex)= 200
Absolute Barindex from quickaflfirstdatabar = 1,240
bi (local BarIndex)= 201
Absolute Barindex from quickaflfirstdatabar = 1,241
bi (local BarIndex)= 202
Absolute Barindex from quickaflfirstdatabar = 1,242
bi (local BarIndex)= 203
Absolute Barindex from quickaflfirstdatabar = 1,243
<<<<<<<<<<<<

Unfortunatelly I cannot make it work.  It seems that ALL bars are acounted and this is the result I get:

>>>>>>>>>>>>
bi (local BarIndex)= 1,240
Absolute Barindex from quickaflfirstdatabar = 1,240
bi (local BarIndex)= 1,241
Absolute Barindex from quickaflfirstdatabar = 1,241
bi (local BarIndex)= 1,242
Absolute Barindex from quickaflfirstdatabar = 1,242
bi (local BarIndex)= 1,243
Absolute Barindex from quickaflfirstdatabar = 1,243
<<<<<<<<<<<<

Here is the code:

>>>>>>>>>>>>

procedure _MYTRACE( part_diag_filename, msg )
{
    local fh, fullpath;

    fullpath = "c:\\broker-error\\debug" + part_diag_filename + ".txt";

    msg = msg + "\n";
    fh = fmkdir( "c:\\broker-error\\" );  //  make dir in case it is not already there.
    fh = fopen( fullpath, "a" ); // open file for Append

    if( fh )
    {
        fputs( msg, fh );
        fclose( fh );
    }
    else
    {
        printf( "Error_message failed:  Error opening " + fullpath );
        _TRACE( "Error_message failed:  Error opening " + fullpath );
        _TRACE( msg );
    }
}

part_diag_filename = "bbbtest3";
bi=BarIndex();

msg="bi (local BarIndex)= "+NumToStr(bi,1.0);
printf(msg+"\n");
_MYTRACE( part_diag_filename, msg );

FirstBar = Status( "quickaflfirstdatabar" );
AbsBarIndex = FirstBar + bi;
msg="Absolute Barindex from quickaflfirstdatabar = "+NumToStr(AbsBarIndex,1.0);
printf(msg+"\n");
_MYTRACE( part_diag_filename, msg );

SetBarsRequired(300,0);

<<<<<<<<<<<<<<<<<<<

If somebody could tell me what I am doing wrong.

This was first asked here:

http://forum.amibroker.com/t/quickafl-and-analysis-window/1157/17
closed with the note: Abuse

1 Answer

0 votes
answered Jul 17 by admin (9,260 points)
Use the forum if you already posted on forum. Why are you posting in multiple places ?
commented Jul 17 by bobptz
Hi

The reason is that my last post was 5 days ago and nobody answered.  I don't know what else to do.
commented Jul 17 by admin (9,260 points)
edited Jul 17 by admin
Nobody answered?

What I see is exact opposite. You've got PLENTY OF ANSWERS here:
http://forum.amibroker.com/t/quickafl-and-analysis-window/1157
...