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

Re: [amibroker] Re: When does AmiBroker execute RefreshAll?



PureBytes Links

Trading Reference Links

Title: Re: [amibroker] Re: When does AmiBroker execute RefreshAll?

Thank you Paul/Brian,


I have done/tried all that and, in fact I have written functions that i can call from an Indicator formula that will run AA components. I had limited success with the Commentary window, but that may have been my problem - I will try again. My general solution is, in principle, very simple:


1) Continuously run an external JS Batch file processor that looks for a JS batch file to execute. The batch file processor has to be started manually. I have not found a way to start JS from AFL however I can exit JS by setting a flag in the batch file. 


2) Next I use AFL to create (actually write/compose/format/save JS code) JS batch files. I am using almost the exact functions Paul gave in his email. When AFL saves the Batch file it is immediately executed by the batch file processor, which deletes it when it has been executed. If the batch file exist JS is busy, when it has been deleted AFL can create another one.


So, you may ask, if you have all this running, what is all the fuss about? 


I want to run independent AA sequences in any order, at any frequency, and with tight handshaking, from afl. The problem is that to do this kind of programming successfully requires lots of subtle information about programming in general, about how computer programs work, how AB works, how OLE works, how a scripting language works, how to debug code, and about a thousand other things that have absolutely nothing to do with AmiBroker AFL. 


To acquire this knowledge takes months if not years of experience. It can't be glanced from a single book, tutorial, or Help file. Many solutions referred to on this list as "Easy", "Doable", "Possible", "Might be Possible", "Should be Possible", require this prerequisite type of knowledge. The problem is that >95% of traders do NOT have this knowledge and go through frustrating times trying to acquire it. 


My problems are in areas that require this subtle and evasive type of knowledge that is taken for granted by the experts. Often it takes several weeks just to identify the problem area, or to find out what caused an unknown error message. Usually the solution turns out to be simple, like adding a small delay here or there - which is obvious for experts but can only be solved by time-consuming trial and error by the novice programmer.


Continued development of AFL should have made OLE and scripting redundant long ago, just like it did VB inside AFL. But, perhaps, we are given so much that we start to expect too much. It is not unreasonable that eventually product development slows down and that the developer starts to enjoy the fruits of his labors. I would ;-)


Like Brian, I am in it for the fun, luckily so, else I wouldn't be able to make a living. But the fun is wearing thin...


btw, I am also aware that there are third party tools that addressed some of my needs however I always found them lacking in some respects. 


Best regards,

herman



 






Sunday, November 16, 2008, 2:55:28 AM, you wrote:


> 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/



__._,_.___

**** 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

*********************************




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___