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

[amibroker] Re: Question About Save Database



PureBytes Links

Trading Reference Links

Thanks Tomasz, that worked except I got a runtime error on "True". I changed to 

Stock.IsDirty=1;

and it purred.


--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx> wrote:
> Hello,
> 
> Adding
> Stock.IsDirty=true;
> 
> should help:
> 
> EnableScript("jscript");
> ticker = Name();
> <%
> ticker = AFL("ticker");
> AB = AFL.CreateObject("Broker.Application");
> Stocks = AB.Stocks;
> Stock = Stocks(ticker);
> Qty = Stock.Quotations.Count;
> for (i=0; i<Qty; i++){
> Quote = Stock.Quotations(i);
> Quote.Volume = 0;
> }
> Stock.IsDirty=true;
> AB.RefreshAll();
> %>
> Buy = 0;
> 
> Hope this helps.
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message ----- 
> From: "thelunit" <thelunit@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Friday, September 12, 2003 10:56 PM
> Subject: [amibroker] Re: Question About Save Database
> 
> 
> >
> > > > ...  What other changes to the database trigger this?
> > > >
> > > Any change in quotations, stock data, drawings etc.
> > >
> >
> >
> > I've cobbled together the code below to set volume of selected ticker to zero.
> >
> >
> > EnableScript("jscript");
> > ticker = Name();
> > <%
> > ticker = AFL("ticker");
> > AB = AFL.CreateObject("Broker.Application");
> > Stocks = AB.Stocks;
> > Stock = Stocks(ticker);
> > Qty = Stock.Quotations.Count;
> > for (i=0; i<Qty; i++){
> > Quote = Stock.Quotations(i);
> > Quote.Volume = 0;
> > }
> > AB.RefreshAll();
> > %>
> > Buy = 0;
> >
> >
> >
> > After running the code, the quote editor indicates that volume has indeed been set to zero. However, if I then exit AB, I get no
> warning about saving (I have this option set) and sure enough, when I restart all the volume is back.
> >
> > Even if I manually save after running the code, when I restart the volume is back. I have to do 'something' else like draw and
> delete a trendline before saving to make the changes stick.
> >
> > Anyone help out here?
> >
> > Thanks



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/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/