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

[amibroker] Re: Keeping variables across AB invocations



PureBytes Links

Trading Reference Links

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@xxxxxxxxxxxxxxx, "danielwardadams" 
<danielwardadams@xxx> 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@xxxxxxxxxxxxxxx, 
> "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
> >
>




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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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