PureBytes Links
Trading Reference Links
|
<FONT face=Arial color=#0000ff
size=2>Woooooooo!!!
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>d
<FONT
face=Tahoma size=2>-----Original Message-----From: Tomasz Janeczko
[mailto:amibroker@xxxxxx] Sent: Friday, September 12, 2003 4:08
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker]
Re: can you put script into a procedure
Hello,
I am sorry, but JScripts/VBScripts are executed immediatelly
at place where they appear
in the formula text, therefore JScript/VBScript can not be
called from inside AFL
user-defined function.
There will be more support for OLE automation directly in
the AFL soon so
scripts would eventually be no longer needed at
all.
Stay tuned.
Best regards,Tomasz Janeczkoamibroker.com
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
dingo
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Friday, September 12, 2003 3:17
AM
Subject: RE: [amibroker] Re: can you
put script into a procedure
<FONT face=Arial color=#0000ff
size=2>After a little experimentation it looks like it doesn't support
script within a procedure.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>This Runs syntax free:
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>procedure WLTickerAdd(sTicker,WL){
<FONT face=Arial color=#0000ff
size=2>Ticker = sTicker; WLNumber = WL;
<FONT face=Arial color=#0000ff
size=2>}
<FONT face=Arial color=#0000ff
size=2>WLTickerAdd("AAA",20);
<FONT face=Arial color=#0000ff
size=2>Buy = 0;Sell = 0;Short = 0;Cover =
0;
<FONT face=Arial color=#0000ff
size=2>-----------------------------------------------
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>But just adding the enabled script won't:
<FONT face=Arial color=#0000ff
size=2>procedure WLTickerAdd(sTicker,WL){
<FONT face=Arial color=#0000ff
size=2>Ticker = sTicker; WLNumber =
WL;EnableScript("jscript");<%
<FONT face=Arial color=#0000ff
size=2>%>
<FONT face=Arial color=#0000ff
size=2>}
<FONT face=Arial color=#0000ff
size=2>WLTickerAdd("AAA",20);
<FONT face=Arial color=#0000ff
size=2>Buy = 0;Sell = 0;Short = 0;Cover =
0;
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>Have you read the docs and all of the tutorials?
jk
<FONT face=Arial color=#0000ff
size=2>
A
note directly to TJ may be in order.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>d
<FONT
face=Tahoma size=2>-----Original Message-----From: Andrew
[mailto:ae_perrin@xxxxxxxxxxxxxxx] Sent: Thursday, September
11, 2003 8:39 PMTo:
amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: can you put
script into a procedureDingoThis is the error
I get running the procedure:Line 18, Column 1:Ticker =
sTicker; //? is this requiredWLNumber = WL; //? this
alsoEnableScript("jscript");<^Error 23.Syntax
errorProcedure is:procedure
WLTickerAdd(sTicker,WL){Ticker = sTicker; //? is this
requiredWLNumber = WL; //? this
alsoEnableScript("jscript");<%AB =
AFL.CreateObject("Broker.Application");AB.Stocks( AFL("Ticker" )
).WatchListBits |= 1 << AFL( "WLNumber"
);%>}WLTickerAdd("OSH",20);Buy =
1;Appreciate any help you can give.Andrew--- In
amibroker@xxxxxxxxxxxxxxx, "dingo" <dingo@xxxx> wrote:> It
would be helpful if you would post the error that you're
getting...> > d> > -----Original
Message-----> From: Andrew [mailto:ae_perrin@xxxx] > Sent:
Thursday, September 11, 2003 6:04 PM> To:
amibroker@xxxxxxxxxxxxxxx> Subject: [amibroker] can you put script
into a procedure> > > Can someone point out whether
you can put the following > Script (adds ticker to watchlist) into
a procedure. My effort > follows but I continually get an
error.> > Ticker = "OSH";> WLNumber = 20;>
EnableScript("jscript");> <%> AB =
AFL.CreateObject("Broker.Application");> AB.Stocks( AFL("Ticker" )
).WatchListBits |= 1 << AFL( "WLNumber" );> %>>
> My Procedure effort:> > procedure
WLTickerAdd(sTicker,WL)> {> Ticker = sTicker; //? is this
required> WLNumber = WL; //? this also>
EnableScript("jscript");> <%> AB =
AFL.CreateObject("Broker.Application");> AB.Stocks( AFL("Ticker" )
).WatchListBits |= 1 << AFL( "WLNumber" );> %>>
}> > WLTickerAdd("OSH",20);> Buy = 1;>
> And while we're on the subject, has anyone got a script that will
> clear a watchlist. I found this by TJ -"You can erase watch lists
> by assigning zero to both WatchListBits and WatchListBits2 in ALL
> stocks."- Can anyone elaborate?> Thanks>
Andrew> Send BUG REPORTS to
bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page:
<A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend
SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page:
<A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Send
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Yahoo! Groups Sponsor
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|