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

[amibroker] TJ / UM - AB & ABtool v0.0.6 beta - Question



PureBytes Links

Trading Reference Links

TJ,

Below is a code snip from a routine to process a table that's already 
been filled ...

After the first statement below th1RowCount can be confirmed to have 
150 in it from looking at the Export of the Table.  However, when 
running Debug View with a couple of imbedded _Trace commands below 
one can see that the "For k" message gets executed only once.  I 
suspect the problem is in my code but I'll be fried if I can see it.

UM, 

With regards to the Bug #2 that I reported about doing a TabelDataGet 
of a String from Table #1 and then trying to put it in Table #2, see 
the code below ... The noted out statement is the one that causes 
problems.  As I stated I can verify that what it got in the 
TableDataGet statement is a string ( Type 3 ).  Any ideas what's 
going on with this ?

=========

th1RowCount = TableGetRowCount(th1);
SelScore = 0;
m = 0;
_TRACE("Got Row Count");
for (k = 1; k < th1RowCount; k++)
{
    _TRACE("For k");
    DebugFld  = th1RowCount;
    CurrDate  = TableDataGet(k, 1, th1);
    CurrScore = TableDataGet(k, 3, th1);
    if ((k = 1) || ((k > 1) && (CurrScore > SelScore)))
    {
        SelTicker = TableDataGet(k, 0, th1);
        SelDate   = TableDataGet(k, 1, th1);
        SelClose  = TableDataGet(k, 2, th1);
        SelScore  = TableDataGet(k, 3, th1);
        SelSignal = TableDataGet(k, 4, th1);
    }
    if ((k = i - 1) || ((k > 1) && CurrDate > PrevDate))
    {
        TableDataAddFloat(DebugFld,  m, 0, th2);
//        TableDataAddStr  (SelTicker, m, 1, th2);
        TableDataAddInt32(SelDate,   m, 2, th2);
        TableDataAddFloat(SelClose,  m, 3, th2);
        TableDataAddFloat(SelScore,  m, 4, th2);
        TableDataAddInt32(SelSignal, m, 5, th2);
        SelScore = 0;
        m = m + 1;
    }
    PrevDate = TableDataGet(k, 1, th1);
}
TableExport("C:/Work/ABTool-Trade.csv", ",", th2);


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/