I was going to use it as value in a composite ticker then after the 
run use the new single field in a commentary.
i did  fiqure out how to do it in ole
but notice that there is a bug
volume and openint are int values 
not single as stated.
also when using this and when trying the add to composite method 
(which i couldnt get working) the open and close must be equal or 
between the high and low value(make sense). Also why is the volume 
from yahoo trunicated by 100

here the way to update the composite database

st=Status("barinrange");
b=SetForeign("~nick");
if (b==0)
{
AddToComposite(0 ,"~nick", "X",16);  //set composite
}
Filter=Close>=0;
b=SetForeign("~nick");
if (b=1)
{
for( i = 0; i < BarCount; i++ )
{
if (Filter[i]==1 AND st[i]==1)
{
AB = CreateObject("Broker.Application"); 
AA = AB.Stocks();                         //aa.count=numberof tickers
stocklast=AA.item(AA.Count-1);            //last stock is now the 
object usually your composite
loc1=stocklast.Quotations(BarCount-1);    //quote location of where 
you want to change
loc2=stocklast.Quotations(BarCount-2);    //quote location of where 
you want to change
loc3=stocklast.Quotations(BarCount-3);    //quote location of where 
you want to change
loc4=stocklast.Quotations(BarCount-4);    //quote location of where 
you want to change
loc1.OpenInt=loc1.OpenInt+1;
loc2.volume=90.10;
loc3.low=900.1;
loc4.high=8.90;
}
}
}

NumColumns=1;





--- In [email protected], "Tomasz Janeczko" <[EMAIL PROTECTED]> 
wrote:
>
> Hello,
> 
> It works but is stores the value in the Close array which is 
relevant
> only to current AFL run. Underlying data in the database are not 
affected
> by you overwritting the OHLC arrays in AFL.
> This is done for purpose to prevent for accidential database 
corruption,
> especially because of the fact that overwriting OHLC arrays is a 
> common technique of running "indicator-like" functions on data 
different than prices.
> For example you can get RSI  or ADX on any non-price data by 
overwriting
> these temporary OHLC arrays and you don't need to worry that
> you will corrupt the database.
> 
> If you really want to write to the database, you need to use 
Quotations collection
> from OLE interface, and it can be done from AFL level as well
> http://www.amibroker.com/guide/objects.html
> And this extra step required protects from doing accidential damage.
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message ----- 
> From: "nickhere" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Sunday, December 09, 2007 1:14 AM
> Subject: [amibroker] Re: CLOSE value can it be change via a afl 
scan. if so how i would i do it
> 
> 
> > TRY IT
> > sound like it would
> > it doesnt save to the databse
> > nick
> > 
> > --- In [email protected], "Ara Kaloustian" <ara1@> wrote:
> >>
> >> Once you decide the new value, simply assign it to the array 
> > element.
> >> 
> >> Close[Arrayelement] = NewValue;
> >> 
> >> ----- Original Message ----- 
> >> From: "nickhere" <nickhere@>
> >> To: <[email protected]>
> >> Sent: Saturday, December 08, 2007 2:39 PM
> >> Subject: [amibroker] CLOSE value can it be change via a afl 
scan. 
> > if so how 
> >> i would i do it
> >> 
> >> 
> >> > if so please show how
> > 
> > 
> > 
> > 
> > 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
> > 
> > Yahoo! Groups Links
> > 
> > 
> > 
> > 
> >
>


Reply via email to