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

Re: [amibroker] IsDirty??



PureBytes Links

Trading Reference Links

It won't save because you are using external database (i.e. FastTrack).
 
Any data you are putting into quotation array will be overwritten by data from FastTrack
on next reading from FastTrack.
 

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Ken Close
Sent: Monday, July 07, 2008 8:29 PM
Subject: [amibroker] IsDirty??

My use of IsDirty flag is not working.  How simple could it be?
 
Tomasz said:
"
You need to know that AB caches data.
If you are writing directly to quote array thru OLE you need to
set "IsDirty" flag, after you are done with writing to given symbol.
 
target.IsDirty = True;
"
 
I put in the flag, as
 

   for( i = 0; i < BarCount; i++ )

   {

      k = 1;  

      for( sig = bo.GetFirstSignal( i ); sig; sig = bo.GetNextSignal( i ) )

      {

//       Line = sig.Symbol + "," + DateTimeToStr(dt[i]) + "," + k + "\n";

//       fputs(Line, fh);

         target = ab.Stocks(sig.Symbol);

         qt = target.Quotations(DateTimeToStr(dt[i]));

         if(qt)

         {

            if(run == 1)

               qt.OpenInt = k;

            else

               qt.OpenInt += k;

         }

         target.isDirty = True;

         k++;

      }

   }

 

 

Result: code processes fine.  Open whatever the current symbol is in the Symbol Editor and the OI field has been changed as the code says.  Click to another symbol (in the same Watchlist) and the OI field is empty.  Click back to the original symbol and the OI field is empty. 

 

I have tried different locations of the target-isdirty = True; statement.  None worked.

 

Obviously, there is something else to do in order to get the OI field to save.  I have tried, Refreshing, also Saving, also exiting the application and clicking Save on exit, also saving the entire db using Save As.  All result in nothing in the OI field although it does get set once.

 

Any suggestions from anyone with experience with this flag?

 

Or, Tomasz??

__._,_.___

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___