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

Re: [amibroker] Input box using VBscript



PureBytes Links

Trading Reference Links

Hi Steve,

First: you have to be aware of the fact that MsgBox, InputBox in VBScript
and alert() in JScript are NOT provided by the language engine but by the container
(in most cases - Internet Explorer). 
They are included in the language description but this is a mistake.

AFL Scripting host is written from the scratch and does not implement these functions
yet. Moreover it would not be a good idea to use the code you have given,
because (if InputBox is implemented) it will display this InputBox as many times
as the formula is evaluated - this means 1000+ times when you scan thru whole exchange.

You can observe this behaviour using following formula:

EnableScript("vbscript");
<%
Set Shell = CreateObject("Wscript.Shell")
Shell.Popup "Popup test", 0, "AmiBroker" 
%>

buy = 0;
sell = 0;


As I guess "the input box" issue is important for you I have to develop
some solution that will ask for parameter ONCE and then cache the response.
Unfortunatelly this is not as easy as it seems because it would be nice
to ask again IF there is a reason for that (for example the formula has changed,
or some parameters have changed)

Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com


----- Original Message ----- 
From: "Steve Wiser" <slwiserr@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, May 22, 2001 12:10 AM
Subject: [amibroker] Input box using VBscript


> Tomasz:
> 
> What is wrong with this:
> 
> EnableScript("vbscript");
> <%
> Dim Input
> Input = InputBox("Enter your MOV period")
> AFL("pds")=Input
> %>;
> 
> /*Gann HiLo5/10 Cross*/
> /*pds=10;*/
> HL=IIf(CLOSE>Ref(Ma(H,pds),-1),
> 
> Thanks
> 
> Steve
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
>