There are many uses for passing variables between JScript/_vbscript_ and AFL. One example I am doing now is passing an external value to an Exploration to do position sizing. Another example is that I need to pass values to an AFL to overwrite Param value. One more example is that an AFL needs to know from which JScript it is invoked and then behave differently. As you said, we can use file to pass data. In fact that's what I am doing now. However, it is becoming more cumbersome when you do it a lot and the code becomes not as clean as I would like it to be. So, it would be natural to use StaticVarSet/Get instead. AFL engine has supported StaticVarSet/Get as a means to record states and pass data between different runs. It is very logical to enable AA Object to do so.
 
----- Original Message -----
From: Fred
Sent: Friday, September 15, 2006 12:16 PM
Subject: [amibroker] Re: OLE/COM: Support StaticVarSet/Get/Remove (and StaticVarSet/GetText as well)

It is difficult to comment on the AB enhancement you are suggesting
as I don't know the context ... If all you are wanting to do is
communicate some info between VBS and AFL and you aren't wanting to
run the AFL 10 times a second then this is easy enough to do using
FSO to write a file from VBS and then use Direct I/O ( fOpen /
fGets / fClose ) in AFL.

--- In [EMAIL PROTECTED]ps.com, "Mark H" <[EMAIL PROTECTED]..> wrote:
>
> It is not surprising to me that the author of BatMan and IO uses
some scripting :-)
>
> ----- Original Message -----
> From: Fred
> To: [EMAIL PROTECTED]ps.com
> Sent: Friday, September 15, 2006 11:29 AM
> Subject: [amibroker] Re: OLE/COM: Support StaticVarSet/Get/Remove
(and StaticVarSet/GetText as well)
>
>
> LOL ... I use it every day ...
>
> --- In [EMAIL PROTECTED]ps.com, "Mark H" <amibroker@> wrote:
> >
> > Never mind. It looks like that wring JScript/_vbscript_ to
automate
> AA and interact with AFL has not become as popular as I thought.
> >
> > ----- Original Message -----
> > From: Mark H
> > To: [EMAIL PROTECTED]ps.com
> > Sent: Thursday, September 14, 2006 3:02 PM
> > Subject: [amibroker] OLE/COM: Support StaticVarSet/Get/Remove
> (and StaticVarSet/GetText as well)
> >
> >
> >
> > I have posted this request in the Feedback Center.
> > http://www.amibroker.com/feedback/view_bug.php?bug_id=468
> >
> > It is basically a fast and easy to pass dynamic variables
between
> JScript (or VBScriot) and AFL.
> > Currently AB is lacking a standard way to do so. Yes, you can
by
> using files/ActiveX/ODBC etc.
> >
> > For example, you can do something like this:
> > In JScript:
> > AA.StaticVarSet("RunInScript1", 1);
> > AA.Explore();
> > AA.Export("orders.csv");
> > AA.Scan();
> > AA.StaticVarRemove("RunInScript1");
> >
> > Inside AFL:
> > if(IsTrue(StaticVarGet("RunInScript1")))
> > {
> > ibc = GetTradingInterface("IB");
> > // send orders here
> > }
> >
> > If you have some good use cases, please post to the Feedback
> Center.
> > Since current AFL engine already support StaticVarSet/Get/Text,
> it would be relatively simple to add COM support.
> > After we get some convincing examples, TJ may do it sooner ;-)
> >
> > - Mark H.
> >
>

__._,_.___

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 other support material please check also:
http://www.amibroker.com/support.html






SPONSORED LINKS
Software support Small business finance Business finance online
Business finance training Business finance course

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

__,_._,___

Reply via email to