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 amibroker@yahoogroups.com, "danielwardadams" 
<[EMAIL PROTECTED]> wrote:
>
> As a follow-up to my message yesterday, is there any way to 
> programatically write to fields in the information window?
> 
> Dan
> 
> --- In amibroker@yahoogroups.com, 
> "danielwardadams" <danielwardadams@> wrote:
> >
> > Short of using external files, is there any way to keep stock 
> > specific variables (e.g., expectancy) across AB invocations? I've 
> > been doing it manually by sticking some information in unused 
> > Fundamental Information fields in the Information Window and then 
> > retrieving it programatically via GetFnData. 
> > 
> > But since manual entry is time consuming and error prone, I'd 
love 
> to 
> > be able to programatically from an AFL formula (in conjunction 
with 
> > optimizizing and backtesting). A Put Fundamental Data (PutFnData) 
> > function would go a long ways towards making me happy. Having a 
few 
> > extra fields in the Information window for putting variables like 
> > these would also be very nice. Going all out, functions like 
> > "PermanentVarPut and PermanentVarGet (analygous to StaticVarPut 
and 
> > StaticVarGet) would be ideal. These would be entirely under user 
> > control and would remain in place until overwritten or a new 
> database 
> > is created. A "User Information" window to show or enter the data 
> > would complete my ideal solution.
> > 
> > Any additional ideas appreciated.
> > 
> > Dan
> >
>


Reply via email to