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

[amibroker] Re: When does AmiBroker execute RefreshAll?



PureBytes Links

Trading Reference Links

Herman,
I haven't tested it extensively, but I think it could work and is 
worth a try.
At the present, you are able to write backtest, or scan in afl 
already because of afl support for OLE. for example
The following afl will run backtest 
ab = createobject("Broker.Application");
aa = aa.analysis();
aa.backtest();

The thing that you cant do is to call backtest from with AA/AFL. 
However, there exist this possibility.
Instead of running Jscript controlling AFL running in AA. Using AFL 
in Guru Commentary to control AA. It might be possible change your 
handshake between JS <-> AFL to Guru AFL <-> AA AFL. Of course you 
can pass info between them using StaticVarSet/StaticVarGet. From my 
very limited experimentation, It seems to work OK. Give that a try. 
Of course functions like RunBackKtester, Run Exploration, Run Scan 
can be easily coded with a few lines of AFL.
for example 
function RunExplore(AFLfilestring, StartDateString, EndDateString)
{
    aa.RangeMode = 3;
    aa.RangeFromDate = StratDateString;
    aa.RangeToDate = EndDateString;
    aa.LoadFormula(AFLfilestring);
    aa.Explore();
}
To call the function use the afl below:
ab = createobject("Broker.Application");
aa = aa.analysis();
RunExplore("Myfile", "1/1/2006", "1/1/2007");
One advantage over Jscript is that all OLE calls from Guru are 
inprocess, in other words, it doesn't go outside AB, allowing you to 
run multiple instances of AB. Also it is less likely to encounter 
synchronisation issues that you mention earlier.
Hope you have fun.
/Paul.


------------------------------------

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL 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/